class DLFolderResolversImpl implements DLFolderResolvers {

    @Override
    public DataFetcher<DLFolder> updateDLFolderDataFetcher() {
        return environment -> {
            long folderId = util.getLongArg(environment, "folderId");
            long parentFolderId = util.getLongArg(environment, "parentFolderId", DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);
            String name = util.getStringArg(environment, "name");
            String description = util.getStringArg(environment, "description");
            long defaultFileEntryTypeId = util.getLongArg(environment, "defaultFileEntryTypeId");
            long[] fileEntryTypeIds = util.getLongArrayArg(environment, "fileEntryTypeIds");
            int restrictionType = util.getIntArg(environment, "restrictionType", DLFolderConstants.RESTRICTION_TYPE_INHERIT);
            ServiceContext serviceContext = new ServiceContext();

            return dlFolderLocalService.updateFolder(
                    folderId,
                    parentFolderId,
                    name,
                    description,
                    defaultFileEntryTypeId,
                    Arrays.stream(fileEntryTypeIds)
                            .boxed()
                            .collect(Collectors.toList()),
                    restrictionType,
                    serviceContext);
        };
    }

}