class DLFileEntryTypeResolversImpl implements DLFileEntryTypeResolvers {

    @Override
    public DataFetcher<DLFileEntryType> createDLFileEntryTypeDataFetcher() {
        return environment -> {
            long userId = util.getLongArg(environment, "userId", util.getDefaultUserId());
            long groupId = util.getLongArg(environment, "groupId");
            String fileEntryTypeKey = util.getStringArg(environment, "fileEntryTypeKey");
            Map<Locale, String> nameMap = util.getTranslatedArg(environment, "nameMap");
            Map<Locale, String> descriptionMap = util.getTranslatedArg(environment, "descriptionMap");
            long[] ddmStructureIds = util.getLongArrayArg(environment, "ddmStructureIds");
            ServiceContext serviceContext = new ServiceContext();

            return dlFileEntryTypeLocalService.addFileEntryType(
                    userId,
                    groupId,
                    fileEntryTypeKey,
                    nameMap,
                    descriptionMap,
                    ddmStructureIds,
                    serviceContext);
        };
    }

}