class JournalFeedResolversImpl implements JournalFeedResolvers {

    @Override
    public DataFetcher<JournalFeed> createJournalFeedDataFetcher() {
        return environment -> {
            long userId = util.getLongArg(environment, "userId", util.getDefaultUserId());
            long groupId = util.getLongArg(environment, "groupId");
            String feedId = util.getStringArg(environment, "feedId");
            boolean autoFeedId = util.getBooleanArg(environment, "autoFeedId");
            String name = util.getStringArg(environment, "name");
            String description = util.getStringArg(environment, "description");
            String ddmStructureKey = util.getStringArg(environment, "ddmStructureKey");
            String ddmTemplateKey = util.getStringArg(environment, "ddmTemplateKey");
            String ddmRendererTemplateKey = util.getStringArg(environment, "ddmRendererTemplateKey");
            int delta = util.getIntArg(environment, "delta");
            String orderByCol = util.getStringArg(environment, "orderByCol");
            String orderByType = util.getStringArg(environment, "orderByType");
            String targetLayoutFriendlyUrl = util.getStringArg(environment, "targetLayoutFriendlyUrl");
            String targetPortletId = util.getStringArg(environment, "targetPortletId");
            String contentField = util.getStringArg(environment, "contentField");
            String feedFormat = util.getStringArg(environment, "feedFormat");
            double feedVersion = util.getDoubleArg(environment, "feedVersion");
            ServiceContext serviceContext = new ServiceContext();

            return journalFeedLocalService.addFeed(
                    userId,
                    groupId,
                    feedId,
                    autoFeedId,
                    name,
                    description,
                    ddmStructureKey,
                    ddmTemplateKey,
                    ddmRendererTemplateKey,
                    delta,
                    orderByCol,
                    orderByType,
                    targetLayoutFriendlyUrl,
                    targetPortletId,
                    contentField,
                    feedFormat,
                    feedVersion,
                    serviceContext);
        };
    }

}