Class ExplorerRightsManager
- java.lang.Object
-
- com.jalios.jcmsplugin.explorer.rights.ExplorerRightsManager
-
- All Implemented Interfaces:
com.jalios.util.JPropertiesListener
public class ExplorerRightsManager extends java.lang.Object implements com.jalios.util.JPropertiesListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExplorerRightsManager.FolderRightsState
A POJO representing theCategory
rights (Label / Icon)static class
ExplorerRightsManager.PublicationRightsState
A POJO representing thePublication
rights (Label / Icon)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canPublish(com.jalios.jcms.Member member, java.lang.Class<?> clazz, com.jalios.jcms.workspace.Workspace ws, java.util.Map<java.lang.String,?> contextMap)
boolean
canPublishSome(com.jalios.jcms.Member member, java.lang.Class<?> clazz, com.jalios.jcms.workspace.Workspace ws, java.util.Map<java.lang.String,?> contextMap)
java.lang.Class<? extends com.jalios.jcms.FileDocument>
getFirstDocumentClassAuthorized(com.jalios.jcms.Member member, com.jalios.jcms.workspace.Workspace workspace, java.lang.String contentType, java.util.Map<java.lang.String,?> contextMap)
FolderInheritedRightsInformation
getFolderFullRightsInformation(com.jalios.jcms.Member member, com.jalios.jcms.workspace.Workspace workspace, generated.PortletExplorer explorer, com.jalios.jcms.Category cat)
ExplorerRightsManager.FolderRightsState
getFolderRightsState(com.jalios.jcms.Category cat)
static ExplorerRightsManager
getInstance()
ExplorerRightsManager.PublicationRightsState
getPublicationRightState(com.jalios.jcms.Publication pub, com.jalios.jcms.workspace.Workspace workspace, com.jalios.jcms.Category parentFolder, java.util.Set<com.jalios.jcms.Category> rootCategories)
java.util.Set<com.jalios.jcms.Group>
getUseGroupSet(com.jalios.jcms.Category cat)
java.util.Set<com.jalios.jcms.Member>
getUseMemberSet(com.jalios.jcms.Category cat)
boolean
isAnyParentFolderHasRights(com.jalios.jcms.Category folder, java.util.Set<com.jalios.jcms.Category> rootCategories)
boolean
isCategoryRightsPropagateRightsEnabled()
boolean
isCatUseFeatureEnabled()
boolean
isFolderControlledByCrp2OrCrp3(com.jalios.jcms.Category cat)
boolean
isFolderHasManagementRights(com.jalios.jcms.Category cat)
boolean
isFolderHasReadRights(com.jalios.jcms.Category cat)
boolean
isFolderHasRights(com.jalios.jcms.Category cat)
boolean
isFolderHasUseRights(com.jalios.jcms.Category cat)
boolean
isPropagateReadRightsEnabled(com.jalios.jcms.Category cat)
boolean
isPropagateRightsEnabled(com.jalios.jcms.Category cat)
boolean
isPublicationHasRights(com.jalios.jcms.Publication pub)
void
propertiesChange(com.jalios.util.JProperties properties)
boolean
showBreadcrumbRightLink(com.jalios.jcms.Member mbr, com.jalios.jcms.Category category)
-
-
-
Method Detail
-
getInstance
public static ExplorerRightsManager getInstance()
-
propertiesChange
public void propertiesChange(com.jalios.util.JProperties properties)
- Specified by:
propertiesChange
in interfacecom.jalios.util.JPropertiesListener
-
isCatUseFeatureEnabled
public boolean isCatUseFeatureEnabled()
-
isCategoryRightsPropagateRightsEnabled
public boolean isCategoryRightsPropagateRightsEnabled()
-
getFolderRightsState
public ExplorerRightsManager.FolderRightsState getFolderRightsState(com.jalios.jcms.Category cat)
-
isAnyParentFolderHasRights
public boolean isAnyParentFolderHasRights(com.jalios.jcms.Category folder, java.util.Set<com.jalios.jcms.Category> rootCategories)
- Parameters:
folder
- theCategory
rootCategories
- the root Categories of an explorer- Returns:
- true if given folder has rights, or if one of its parent has any rights set
- Since:
- explorer-4.6
-
showBreadcrumbRightLink
public boolean showBreadcrumbRightLink(com.jalios.jcms.Member mbr, com.jalios.jcms.Category category)
- Parameters:
mbr
- theMember
category
- theCategory
- Returns:
- true if right link must be shown on breadcrumb item
-
isFolderHasRights
public boolean isFolderHasRights(com.jalios.jcms.Category cat)
- Parameters:
cat
- theCategory
- Returns:
- true if given Category has any rights (Use / Manage / Read) by checking its state with CRP Plugin (It will return false if not controlled by CRP)
- Since:
- explorer-4.6
-
isFolderHasUseRights
public boolean isFolderHasUseRights(com.jalios.jcms.Category cat)
- Parameters:
cat
- theCategory
- Returns:
- true if given Category has any use rights (10SP6)
- Since:
- explorer-4.6
-
canPublishSome
public boolean canPublishSome(com.jalios.jcms.Member member, java.lang.Class<?> clazz, com.jalios.jcms.workspace.Workspace ws, java.util.Map<java.lang.String,?> contextMap)
-
canPublish
public boolean canPublish(com.jalios.jcms.Member member, java.lang.Class<?> clazz, com.jalios.jcms.workspace.Workspace ws, java.util.Map<java.lang.String,?> contextMap)
- Parameters:
member
- theMember
performing the actionws
-cat
- theCategory
- Returns:
- true if given member can publish given class
-
isPropagateRightsEnabled
public boolean isPropagateRightsEnabled(com.jalios.jcms.Category cat)
- Parameters:
cat
- theCategory
- Returns:
- true if rights are propagated on given Category
-
isPropagateReadRightsEnabled
public boolean isPropagateReadRightsEnabled(com.jalios.jcms.Category cat)
- Parameters:
cat
- theCategory
- Returns:
- true if given
Category
is controlled by CategoryRightsPlugin (using crp2 control)
-
isFolderControlledByCrp2OrCrp3
public boolean isFolderControlledByCrp2OrCrp3(com.jalios.jcms.Category cat)
-
isPublicationHasRights
public boolean isPublicationHasRights(com.jalios.jcms.Publication pub)
- Parameters:
pub
- thePublication
- Returns:
- true if given publication has any rights set (read or update)
- Since:
- explorer-4.6
-
getPublicationRightState
public ExplorerRightsManager.PublicationRightsState getPublicationRightState(com.jalios.jcms.Publication pub, com.jalios.jcms.workspace.Workspace workspace, com.jalios.jcms.Category parentFolder, java.util.Set<com.jalios.jcms.Category> rootCategories)
- Parameters:
pub
- thePublication
parentFolder
- the current parent folder of the Publication (depending on current navigation in explorer)rootCategories
- the root Categories of an explorerworkspace
- the workspace where the explorer is located- Returns:
- the
ExplorerRightsManager.PublicationRightsState
for given Publication and context provided - Since:
- explorer-4.6
-
getUseMemberSet
public java.util.Set<com.jalios.jcms.Member> getUseMemberSet(com.jalios.jcms.Category cat)
- Parameters:
cat
- theCategory
- Returns:
- useMemberSet of given Category
- Since:
- explorer-4.6
-
getUseGroupSet
public java.util.Set<com.jalios.jcms.Group> getUseGroupSet(com.jalios.jcms.Category cat)
- Parameters:
cat
- theCategory
- Returns:
- useGroupSet of given Category
- Since:
- explorer-4.6
-
isFolderHasReadRights
public boolean isFolderHasReadRights(com.jalios.jcms.Category cat)
- Parameters:
cat
- theCategory
- Returns:
- true if given Category has any read rights
- Since:
- explorer-4.6
-
isFolderHasManagementRights
public boolean isFolderHasManagementRights(com.jalios.jcms.Category cat)
- Parameters:
cat
- theCategory
- Returns:
- true if given Category has any management rights
- Since:
- explorer-4.6
-
getFirstDocumentClassAuthorized
public java.lang.Class<? extends com.jalios.jcms.FileDocument> getFirstDocumentClassAuthorized(com.jalios.jcms.Member member, com.jalios.jcms.workspace.Workspace workspace, java.lang.String contentType, java.util.Map<java.lang.String,?> contextMap)
- Parameters:
member
- theMember
performing the actionworkspace
- the currentWorkspace
contentType
- the type of uploaded filecontextMap
- the current context map- Returns:
- the class that given member can upload based on context
-
getFolderFullRightsInformation
public FolderInheritedRightsInformation getFolderFullRightsInformation(com.jalios.jcms.Member member, com.jalios.jcms.workspace.Workspace workspace, generated.PortletExplorer explorer, com.jalios.jcms.Category cat)
- Parameters:
member
- theMember
getting infosworkspace
- theWorkspace
explorer
- thePortletExplorer
cat
- theCategory
- Returns:
FolderInheritedRightsInformation
which provides all informations about inherited rights for given cat explorer and workspace- Since:
- explorer-4.6.2
-
-