public static void check( ModelResourcePermission<?> modelResourcePermission, PermissionChecker permissionChecker, long groupId, long primaryKey, String actionId) throws PortalException { if (primaryKey == _DEFAULT_PARENT_PRIMARY_KEY) { PortletResourcePermission portletResourcePermission = modelResourcePermission.getPortletResourcePermission(); portletResourcePermission.check( permissionChecker, groupId, actionId); } else { modelResourcePermission.check( permissionChecker, primaryKey, actionId); } }
public static void check( PermissionChecker permissionChecker, long groupId, String actionId) throws PortalException { _portletResourcePermission.check(permissionChecker, groupId, actionId); }
public static void check( PermissionChecker permissionChecker, long scopeGroupId, String actionId) throws PrincipalException { _portletResourcePermission.check( permissionChecker, scopeGroupId, actionId); }
/** * Subscribes the user to changes in elements that belong to the web content * article's DDM structure. * * @param groupId the primary key of the folder's group * @param userId the primary key of the user to be subscribed * @param ddmStructureId the primary key of the structure to subscribe to */ @Override public void subscribeStructure( long groupId, long userId, long ddmStructureId) throws PortalException { _portletResourcePermission.check( getPermissionChecker(), groupId, ActionKeys.SUBSCRIBE); journalArticleLocalService.subscribeStructure( groupId, userId, ddmStructureId); }
/** * Unsubscribes the user from changes in elements that belong to the web * content article's DDM structure. * * @param groupId the primary key of the folder's group * @param userId the primary key of the user to be subscribed * @param ddmStructureId the primary key of the structure to subscribe to */ @Override public void unsubscribeStructure( long groupId, long userId, long ddmStructureId) throws PortalException { _portletResourcePermission.check( getPermissionChecker(), groupId, ActionKeys.SUBSCRIBE); journalArticleLocalService.unsubscribeStructure( groupId, userId, ddmStructureId); }
@Override public DDMFormInstance addFormInstance( long groupId, long ddmStructureId, Map<Locale, String> nameMap, Map<Locale, String> descriptionMap, DDMFormValues settingsDDMFormValues, ServiceContext serviceContext) throws PortalException { _portletResourcePermission.check( getPermissionChecker(), groupId, DDMActionKeys.ADD_FORM_INSTANCE); return ddmFormInstanceLocalService.addFormInstance( getUserId(), groupId, ddmStructureId, nameMap, descriptionMap, settingsDDMFormValues, serviceContext); }
@Override public DDMFormInstance addFormInstance( long groupId, Map<Locale, String> nameMap, Map<Locale, String> descriptionMap, DDMForm ddmForm, DDMFormLayout ddmFormLayout, DDMFormValues settingsDDMFormValues, ServiceContext serviceContext) throws PortalException { _portletResourcePermission.check( getPermissionChecker(), groupId, DDMActionKeys.ADD_FORM_INSTANCE); return ddmFormInstanceLocalService.addFormInstance( getUserId(), groupId, nameMap, descriptionMap, ddmForm, ddmFormLayout, settingsDDMFormValues, serviceContext); }
@Override public DDMDataProviderInstance addDataProviderInstance( long groupId, Map<Locale, String> nameMap, Map<Locale, String> descriptionMap, DDMFormValues ddmFormValues, String type, ServiceContext serviceContext) throws PortalException { _portletResourcePermission.check( getPermissionChecker(), groupId, DDMActionKeys.ADD_DATA_PROVIDER_INSTANCE); return ddmDataProviderInstanceLocalService.addDataProviderInstance( getUserId(), groupId, nameMap, descriptionMap, ddmFormValues, type, serviceContext); }
@Override public JournalFeed addFeed( long groupId, String feedId, boolean autoFeedId, String name, String description, String ddmStructureKey, String ddmTemplateKey, String ddmRendererTemplateKey, int delta, String orderByCol, String orderByType, String targetLayoutFriendlyUrl, String targetPortletId, String contentField, String feedType, double feedVersion, ServiceContext serviceContext) throws PortalException { _portletResourcePermission.check( getPermissionChecker(), groupId, ActionKeys.ADD_FEED); return journalFeedLocalService.addFeed( getUserId(), groupId, feedId, autoFeedId, name, description, ddmStructureKey, ddmTemplateKey, ddmRendererTemplateKey, delta, orderByCol, orderByType, targetLayoutFriendlyUrl, targetPortletId, contentField, feedType, feedVersion, serviceContext); }