class OAuth2ApplicationScopeAliasesResolversImpl implements OAuth2ApplicationScopeAliasesResolvers {

    @Override
    public DataFetcher<OAuth2ApplicationScopeAliases> createOAuth2ApplicationScopeAliasesDataFetcher() {
        return environment -> {
            long companyId = util.getLongArg(environment, "companyId");
            long userId = util.getLongArg(environment, "userId", util.getDefaultUserId());
            String userName = util.getStringArg(environment, "userName");
            long oAuth2ApplicationId = util.getLongArg(environment, "oAuth2ApplicationId");
            String[] scopeAliasesList = util.getStringArrayArg(environment, "scopeAliasesList");

            return oAuth2ApplicationScopeAliasesLocalService.addOAuth2ApplicationScopeAliases(
                    companyId,
                    userId,
                    userName,
                    oAuth2ApplicationId,
                    Arrays.asList(scopeAliasesList));
        };
    }

}