Package io.meeds.social.cms.service
Interface CMSService
public interface CMSService
-
Method Summary
Modifier and TypeMethodDescriptiongetSetting(String settingType, String settingName) booleanhasAccessPermission(org.exoplatform.services.security.Identity identity, String pageReference, long spaceId) Checks whether the user has access permission or not to an application content referenced inside a page usingPageKeyand usingSpaceidentifier.booleanhasAccessPermission(org.exoplatform.services.security.Identity identity, String settingType, String settingName) Checks whether the user has access permission or not to an application content referenced using its setting type and name in order to retrieve its page reference and correspondingSpaceidentifier.booleanhasEditPermission(org.exoplatform.services.security.Identity identity, String pageReference, long spaceId) Checks whether the user has edit permission or not to an application content referenced using its setting type and name in order to retrieve itsPageKeyand usingSpaceidentifier.booleanhasEditPermission(org.exoplatform.services.security.Identity identity, String settingType, String settingName) Checks whether the user has edit permission or not to an application content referenced inside a page usingPageKeyand usingSpaceidentifier.booleanisSettingNameExists(String settingType, String settingName) voidsaveSettingName(String settingType, String settingName, String pageReference, long spaceId, long userCreatorId) Saves the Page reference and corresponding space identifier to the setting content type and name
-
Method Details
-
hasAccessPermission
boolean hasAccessPermission(org.exoplatform.services.security.Identity identity, String pageReference, long spaceId) Checks whether the user has access permission or not to an application content referenced inside a page usingPageKeyand usingSpaceidentifier. If the user has access to the page or is member of the designated space (if id > 0), then this will return true, else return false.- Parameters:
identity-Identityuser ACL identity to checkpageReference-PageKey.format()of format TYPE::OWNER::NAMEspaceId-Space.getId()technical identifier- Returns:
- true if has access else false
-
hasAccessPermission
boolean hasAccessPermission(org.exoplatform.services.security.Identity identity, String settingType, String settingName) Checks whether the user has access permission or not to an application content referenced using its setting type and name in order to retrieve its page reference and correspondingSpaceidentifier. If the user has access to the page or is member of the designated space (if id > 0), then this will return true, else return false.- Parameters:
identity-Identityuser ACL identity to checksettingType- Setting content type (notes, attachment, links...)settingName- Setting content name- Returns:
- true if has access else false
-
hasEditPermission
boolean hasEditPermission(org.exoplatform.services.security.Identity identity, String pageReference, long spaceId) Checks whether the user has edit permission or not to an application content referenced using its setting type and name in order to retrieve itsPageKeyand usingSpaceidentifier. If the user has edit permission to the page (member of /platform/administrators or publisher:/platform/web-contibutors) or is manager|publisher of the designated space (if id > 0), then this will return true, else return false.- Parameters:
identity-Identityuser ACL identity to checkpageReference-PageKey.format()of format TYPE::OWNER::NAMEspaceId-Space.getId()technical identifier- Returns:
- true if has edit access else false
-
hasEditPermission
boolean hasEditPermission(org.exoplatform.services.security.Identity identity, String settingType, String settingName) Checks whether the user has edit permission or not to an application content referenced inside a page usingPageKeyand usingSpaceidentifier. If the user has edit permission to the page (member of /platform/administrators or publisher:/platform/web-contibutors) or is manager|publisher of the designated space (if id > 0), then this will return true, else return false.- Parameters:
identity-Identityuser ACL identity to checksettingType- Setting content type (notes, attachment, links...)settingName- Setting content name- Returns:
- true if has edit access else false
-
saveSettingName
void saveSettingName(String settingType, String settingName, String pageReference, long spaceId, long userCreatorId) throws org.exoplatform.commons.ObjectAlreadyExistsException Saves the Page reference and corresponding space identifier to the setting content type and name- Parameters:
settingType- Setting content type (notes, attachment, links...)settingName- Setting content namepageReference-PageKey.format()of format TYPE::OWNER::NAMEspaceId-Space.getId()technical identifier- Throws:
org.exoplatform.commons.ObjectAlreadyExistsException- when the setting already exists
-
isSettingNameExists
- Parameters:
settingType- Setting content type (notes, attachment, links...)settingName- Setting content name- Returns:
- true is setting name for corresponding type exists, else false
-
getSetting
- Parameters:
settingType- Setting content type (notes, attachment, links...)settingName- Setting content name- Returns:
CMSSettingif exists elase null
-