class AssetVocabularyResolversImpl implements AssetVocabularyResolvers {

    @Override
    public DataFetcher<AssetVocabulary> createAssetVocabularyDataFetcher() {
        return environment -> {
            long userId = util.getLongArg(environment, "userId", util.getDefaultUserId());
            long groupId = util.getLongArg(environment, "groupId");
            String title = util.getStringArg(environment, "title");
            Map<Locale, String> titleMap = util.getTranslatedArg(environment, "nameMap");
            Map<Locale, String> descriptionMap = util.getTranslatedArg(environment, "descriptionMap");
            String settings = util.getStringArg(environment, "settings");
            ServiceContext serviceContext = new ServiceContext();

            return assetVocabularyLocalService.addVocabulary(
                    userId,
                    groupId,
                    title,
                    titleMap,
                    descriptionMap,
                    settings,
                    serviceContext);
        };
    }

}