Class ExplorerRightsManager

  • All Implemented Interfaces:
    com.jalios.util.JPropertiesListener

    public class ExplorerRightsManager
    extends java.lang.Object
    implements com.jalios.util.JPropertiesListener
    • Method Detail

      • propertiesChange

        public void propertiesChange​(com.jalios.util.JProperties properties)
        Specified by:
        propertiesChange in interface com.jalios.util.JPropertiesListener
      • isCatUseFeatureEnabled

        public boolean isCatUseFeatureEnabled()
      • isCategoryRightsPropagateRightsEnabled

        public boolean isCategoryRightsPropagateRightsEnabled()
      • isAnyParentFolderHasRights

        public boolean isAnyParentFolderHasRights​(com.jalios.jcms.Category folder,
                                                  java.util.Set<com.jalios.jcms.Category> rootCategories)
        Parameters:
        folder - the Category
        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 - the Member
        category - the Category
        Returns:
        true if right link must be shown on breadcrumb item
      • isFolderHasRights

        public boolean isFolderHasRights​(com.jalios.jcms.Category cat)
        Parameters:
        cat - the Category
        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 - the Category
        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 - the Member performing the action
        ws -
        cat - the Category
        Returns:
        true if given member can publish given class
      • isPropagateRightsEnabled

        public boolean isPropagateRightsEnabled​(com.jalios.jcms.Category cat)
        Parameters:
        cat - the Category
        Returns:
        true if rights are propagated on given Category
      • isPropagateReadRightsEnabled

        public boolean isPropagateReadRightsEnabled​(com.jalios.jcms.Category cat)
        Parameters:
        cat - the Category
        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 - the Publication
        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 - the Publication
        parentFolder - the current parent folder of the Publication (depending on current navigation in explorer)
        rootCategories - the root Categories of an explorer
        workspace - 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 - the Category
        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 - the Category
        Returns:
        useGroupSet of given Category
        Since:
        explorer-4.6
      • isFolderHasReadRights

        public boolean isFolderHasReadRights​(com.jalios.jcms.Category cat)
        Parameters:
        cat - the Category
        Returns:
        true if given Category has any read rights
        Since:
        explorer-4.6
      • isFolderHasManagementRights

        public boolean isFolderHasManagementRights​(com.jalios.jcms.Category cat)
        Parameters:
        cat - the Category
        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 - the Member performing the action
        workspace - the current Workspace
        contentType - the type of uploaded file
        contextMap - 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 - the Member getting infos
        workspace - the Workspace
        explorer - the PortletExplorer
        cat - the Category
        Returns:
        FolderInheritedRightsInformation which provides all informations about inherited rights for given cat explorer and workspace
        Since:
        explorer-4.6.2