Class Group

    • Field Detail

      • name

        protected java.lang.String name
      • nameML

        protected java.util.HashMap<java.lang.String,​java.lang.String> nameML
      • description

        protected java.lang.String description
      • order

        protected int order
      • rightFromClassMap

        protected java.util.HashMap<java.lang.String,​DataRight> rightFromClassMap
      • cookieMaxAge

        protected int cookieMaxAge
      • useCategorySet

        protected java.util.TreeSet<Category> useCategorySet
      • webdavAccess

        protected boolean webdavAccess
      • parentSet

        protected java.util.HashSet<Group> parentSet
      • visibility

        protected int visibility
      • declaredManager

        protected Member declaredManager
      • declaredManagerDBID

        protected java.lang.String declaredManagerDBID
      • assistant

        @Deprecated
        protected Member assistant
        Deprecated.
      • assistantDBID

        @Deprecated
        protected java.lang.String assistantDBID
        Deprecated.
      • assistantSet

        protected java.util.TreeSet<Member> assistantSet
      • assistantSetDBID

        protected java.util.HashSet<java.lang.String> assistantSetDBID
      • ldapDN

        protected java.lang.String ldapDN
      • ldapSync

        protected boolean ldapSync
      • lastLdapSynchro

        protected java.util.Date lastLdapSynchro
      • cookieMaxAgeResolved

        protected transient int cookieMaxAgeResolved
      • typeReferrerCount

        protected transient int typeReferrerCount
      • typeReferrer

        protected transient java.lang.String typeReferrer
    • Constructor Detail

      • Group

        public Group()
      • Group

        public Group​(Group other)
    • Method Detail

      • canRead

        @Deprecated
        public boolean canRead​(Category cat)
        Deprecated.
        since JCMS-8579
        This convenient method check if a group can read a category.
        Parameters:
        cat - the category
        Returns:
        true if this group can read the category
        Since:
        jcms-4.1
        See Also:
        Category.canBeReadBy(Group, boolean)
      • canRead

        @Deprecated
        public boolean canRead​(Publication pub)
        Deprecated.
        since JCMS-8577
        This convenient method check if a group can read a publication.
        Parameters:
        pub - the publication
        Returns:
        true if this group can read the publication
        Since:
        jcms-2.1
        See Also:
        Publication.canBeReadBy(com.jalios.jcms.Group)
      • canEditCategories

        public boolean canEditCategories()
      • getRight

        public DataRight getRight​(java.lang.Class<?> clazz)
        Retrieve the DataRight associated with the specified class for this group.
        Parameters:
        clazz - the publication type of which to find the DataRight
        Returns:
        the DataRight associated with the given class or null if no right has been specified.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Data
      • canBeReadBy

        public final boolean canBeReadBy​(Member member,
                                         boolean searchInGroups,
                                         RightInfo rightInfo)
        Checks if the specified member is authorized to read this Group.

        This method is the implementation of Data read right control for Group.

        Current implementation delegates to canBeReadBy(member, true, true).

        Overrides:
        canBeReadBy in class Data
        Parameters:
        member - the member to check (may be null for anonymous user)
        searchInGroups - set to true to check for read right authorization using Member's group(s).
        rightInfo - a RightInfo instance in which explanation of read right authorization acceptance or refusal will be indicated. Value is required and cannot be null.
        Returns:
        true if the member can read this Group, false otherwise
        Since:
        jcms-10.0.0
      • internalCanBeReadBy

        protected boolean internalCanBeReadBy​(Member mbr)
      • getCookieMaxAgeResolved

        public int getCookieMaxAgeResolved()
        Returns the cookie max-age value to use for this group.
        I.E. if cookieMaxAge value of this group has not been defined (== 0) then the value of the "cookie.max-age" property is returned, otherwise the cookieMaxAge value of this group is returned.
        Returns:
        the cookie max-age value to use for this group in seconds.
        Since:
        jcms-5.0.0
      • toCSV

        public java.lang.String toCSV​(java.lang.String lang)
        Returns a CSV view of this object
        Overrides:
        toCSV in class Data
        Parameters:
        lang - the output language
        Returns:
        a CSV view of this object
        Since:
        jcms-5.0.0
      • getCSVHeader

        public static java.lang.String getCSVHeader​(java.lang.String lang)
        Returns the CSV header of this object
        Parameters:
        lang - the output language
        Returns:
        the CSV header of this object
        Since:
        jcms-5.0.0
      • exportXmlField

        public void exportXmlField​(java.lang.StringBuffer sb,
                                   int indentLevel)
        Description copied from class: Data
        Fills the given StringBuffer with Xml export of fields of this data.
        Overrides:
        exportXmlField in class Data
        Parameters:
        sb - the StringBuffer
        indentLevel - the indent level
      • exportXmlRelated

        protected void exportXmlRelated​(java.lang.StringBuffer sb,
                                        java.lang.String related,
                                        int indentLevel)
        Overrides:
        exportXmlRelated in class Data
      • canPublish

        public boolean canPublish​(java.lang.Class<? extends Publication> clazz)
        Check if this group can publish object of the given class.
        Parameters:
        clazz - the class
        Returns:
        true if this group can publish object of the given class.
        Since:
        jcms-3.0
      • canUpdateOther

        public boolean canUpdateOther​(java.lang.Class<? extends Publication> clazz)
        Check if this group can update object of the given class.
        Parameters:
        clazz - the class
        Returns:
        true if this group can update object of the given class.
        Since:
        jcms-3.0
      • canDeleteOther

        public boolean canDeleteOther​(java.lang.Class<? extends Publication> clazz)
        Check if this group can delete object of the given class.
        Parameters:
        clazz - the class
        Returns:
        true if this group can delete object of the given class.
        Since:
        jcms-3.0
      • canUseCategory

        @Deprecated
        public boolean canUseCategory​(Category cat)
        Deprecated.
        since JCMS-8579
        Check if this group can use the given category.
        Parameters:
        cat - the category to check
        Returns:
        true if this group can use the given category.
        Since:
        jcms-4.0
      • checkWrite

        public ControllerStatus checkWrite​(int op,
                                           Member mbr,
                                           boolean checkIntegrity,
                                           java.util.Map context)
        Checks if the given write operation can be performed
        Overrides:
        checkWrite in class Data
        Parameters:
        op - the operation (OP_CREATE, OP_UPDATE, ...)
        mbr - the member which requests the write operation
        checkIntegrity - if true, requires the constraints integrity to be checked
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
        Since:
        jcms-5.7.3
      • belongsToRole

        public WKRole belongsToRole()
        Retrieve the first WKRole instance this groups belongs to.
        Returns:
        the first WKRole the member belongs to, or null if no WKRole is associated with this group.
        Since:
        jcms-4.1
      • belongsToRole

        public boolean belongsToRole​(WKRole role)
        Checks if this group is defined in the specified WKRole.
        Parameters:
        role - a WKRole (can be null)
        Returns:
        true if member belongs to the WKRole, false otherwise and when specified role is null
        Since:
        jcms-4.1
      • canReceiveMail

        @Deprecated
        public boolean canReceiveMail​(boolean checkDisable,
                                      boolean notUsed)
        Deprecated.
        since jcms-6.0.2 see canReceiveMail(boolean), will be removed for jcms-6.1
        Checks if at least one member of the group can receive a valid email.
        Parameters:
        checkDisable - check the disable account property
        notUsed - NOT USED ANYMORE
        Returns:
        true if one member's email is valid
        Since:
        jcms-5.0.0
      • canReceiveMail

        public boolean canReceiveMail​(boolean checkDisable)
        Checks if at least one member of the group can receive a valid email.
        Parameters:
        checkDisable - check the disable account property
        Returns:
        true if one member's email is valid
        Since:
        jcms-6.0.2
      • isGlobalGroup

        public boolean isGlobalGroup()
        Checks if this group is a global group or not.
        Returns:
        true if this is global group (workspace == null), false otherwise
        Since:
        jcms-5.5.0
      • getChildrenSet

        public java.util.Set<Group> getChildrenSet()
        Return the set of groups which have this group has parent.
        Returns:
        a set of Group, never return null.
        Since:
        jcms-5.6.0
      • hasChildren

        public boolean hasChildren()
        Checks if this group has at least one children.
        Returns:
        true if this group has at least one children.
        Since:
        jcms-5.6.0
      • isSubGroup

        public boolean isSubGroup()
        Returns true if this group belongs to at least one parent group.
        Returns:
        true if this group belongs to at least one parent group.
        Since:
        jcms-5.6.0
      • hasMultipleParent

        public boolean hasMultipleParent()
        Returns true if this group is attached to 2 or more parent groups.
        Returns:
        true if this group is attached to 2 or more parent groups.
        Since:
        jcms-5.6.0
      • addParent

        public void addParent​(Group group)
        Adds the given group to the parent set of this group.

        To invoke this method on an update instance of a Group, make sure you clone the parentSet prior to invocation :

           Group groupUpdated = (Group) group.getUpdateInstance();
           if (group.getParentSet() != null) {
             groupUpdated.setParentSet(new HashSet<Group>(group.getParentSet()));
           }
           groupUpdated.addParent(...);
           groupUpdated.performUpdate(admin);
         
        Parameters:
        group - to be added.
        Since:
        jcms-5.6.0
      • removeParent

        public void removeParent​(Group group)
        Removes the given group form the parent set of this group.

        To invoke this method on an update instance of a Group, make sure you clone the parentSet prior to invocation :

           Group groupUpdated = (Group) group.getUpdateInstance();
           if (group.getParentSet() != null) {
             groupUpdated.setParentSet(new HashSet<Group>(group.getParentSet()));
           }
           groupUpdated.removeParent(...);
           groupUpdated.performUpdate(admin);
         
        Parameters:
        group - to be removed.
        Since:
        jcms-5.6.0
      • isDescendant

        public boolean isDescendant​(Group group)
        Returns true if the given group is a descendant of this group.
        Parameters:
        group - the group
        Returns:
        true if the given group is a descendant of this group.
        Since:
        jcms-5.6.0
      • getDescendantSet

        public java.util.Set<Group> getDescendantSet()
        Returns the descendant groups of this group.
        Returns:
        the descendant groups of this group.
        Since:
        jcms-5.6.0
      • isAncestor

        public boolean isAncestor​(Group group)
        Returns true if given group is an ancestor of this group or is the same object as this group.
        Parameters:
        group - the group to be checked.
        Returns:
        true if given group is an ancestor of this group or is the same object as this group.
        Since:
        jcms-5.6.0
        See Also:
        getAncestorSet(boolean)
      • getAncestorSet

        public java.util.Set<Group> getAncestorSet​(boolean includeMyself)
        Returns the ancestors of this group.
        Parameters:
        includeMyself - if true, the ancestor set contains this group.
        Returns:
        the ancestors of this group.
        Since:
        jcms-5.6.0
      • getDataIcon

        public java.lang.String getDataIcon()
        Description copied from class: Data
        Returns source information for the icon associated to this Data, either a relative path or sprite classes name.

        If this method behavior has not been overriden by subclass, the default icon can be declared using property types.{Type}.icon, where {Type} is the short class name of the type concerned.

        • Either by specifying a relative image path :
          types.Article.icon: images/jalios/icon/abstract.gif 
        • or else by using a sprite icon :
          types.Article.icon: ss_sprite ss_date
        Overrides:
        getDataIcon in class Data
        Returns:
        a relative path (eg images/jalios/icon/abstract.gif) or sprite classes name (eg ss_sprite ss_date).
        See Also:
        Data.getDataIconHtml(String)
      • getIcon

        public java.lang.String getIcon()
        Returns:
        String the image path for the icon
        Since:
        jcms-5.0.0
      • getIcon

        public java.lang.String getIcon​(java.lang.String userLang,
                                        boolean imgTag)
        Return the img tag for the icon
        Parameters:
        userLang - the icon language
        imgTag - boolean indicate to return an <img> tag
        Returns:
        the img tag for the icon
        Since:
        jcms-5.0.0
      • getDataName

        public java.lang.String getDataName​(java.lang.String language)
        Description copied from class: Data
        Return the name of this Data, every sub class Data which will be displayed to user should implements this method already.
        • The Title (multi-language) for a Publication.
        • The Name (multi-language) for a Category.
        • The Name for a Group, a Member.
        • The Title (multi-language) for a Workspace.
        Can be seen as a smart multi-language toString(), but never returning null.
        Default behaviour is to return toFullString() of Data or empty string if toFullString is null.
        Overrides:
        getDataName in class Data
        Parameters:
        language - the language in which to return the name if multilang available for the data.
        Returns:
        name of Group or empty String if not specified.
        Since:
        jcms-5.1
        See Also:
        getName(), Data.getDataName(String)
      • getName

        public java.lang.String getName​(java.lang.String lang)
        Get the value of name bound to the given language.
        Parameters:
        lang - the language to get the name
        Returns:
        name in the given language.
        Since:
        jcms-7.0.0
      • getName

        public java.lang.String getName​(java.lang.String lang,
                                        boolean useDefault)
        Get the value of name bound to the given language.
        Parameters:
        lang - the language to get the name
        useDefault - should main language used as default language if name does not exist in the given language
        Returns:
        name in the given language.
        Since:
        jcms-7.0.0
      • getName

        public java.lang.String getName()
        Get the value of name.
        Returns:
        Value of name.
      • setName

        public void setName​(java.lang.String v)
        Set the value of name.
        Parameters:
        v - Value to assign to v.
      • getNameML

        public java.util.HashMap<java.lang.String,​java.lang.String> getNameML()
        Get the value of nameML.
        Returns:
        Value of nameML.
        Since:
        jcms-7.0.0
      • setNameML

        public void setNameML​(java.util.HashMap<java.lang.String,​java.lang.String> v)
        Set the value of nameML.
        Parameters:
        v - Value to assign to nameML.
        Since:
        jcms-7.0.0
      • setName

        public void setName​(java.lang.String lang,
                            java.lang.String value)
        Convenient method to set the value of the Name field in any language (default site language or any other).
        This method will set the proper field value (setName(String) or setNameML(HashMap)) depending on the specified language.
        Parameters:
        lang - the language (ISO 639 code) in which to set the value
        value - the value to set.
        Since:
        jcms-7.0.0
        See Also:
        setName(String), setNameML(HashMap)
      • getDescription

        public java.lang.String getDescription()
        Get the description of this group.
        Returns:
        a string value, never return null.
        Since:
        jcms-9.0.1 -- JCMS-4405
      • setDescription

        public void setDescription​(java.lang.String desc)
        Set the description of this group.
        Parameters:
        desc - the description to set
        Since:
        jcms-9.0.1 -- JCMS-4405
      • getOrder

        public int getOrder()
        Get the order value of this group.
        The order value may be used to sort severals groups in a set.
        Returns:
        the order defined for this group.
      • setOrder

        public void setOrder​(int order)
        Set the order of this group.
        The order value may be used to sort severals groups in a set.
        Parameters:
        order - an integer.
      • getWebdavAccess

        public boolean getWebdavAccess()
        Checks if member of this group are allowed to access the site using WebDAV.
        Returns:
        true if WebDAV access is allowed, false otherwise.
        Since:
        jcms-5.5.0
      • setWebdavAccess

        public void setWebdavAccess​(boolean webdavAccess)
        Set the authorization for member of this group to access the site using WebDAV.
        Parameters:
        webdavAccess - true to authorize WebDAV access, false otherwise.
        Since:
        jcms-5.5.0
      • getWorkspace

        public Workspace getWorkspace()
        Retrieves the Workspace defined for this group.
        Returns:
        the workspace of this group, may be null for global groups.
      • setWorkspace

        public void setWorkspace​(Workspace workspace)
        Sets the Workspace of this group.
        Parameters:
        workspace - the Workspace to define for this group. If null, this group will be a global group.
      • getCookieMaxAge

        public int getCookieMaxAge()
        Return the cookie maximum age value of this group (in seconds).
        Returns:
        the cookie max-age value in seconds.
        Since:
        jcms-2.1
      • setCookieMaxAge

        public void setCookieMaxAge​(int cookieMaxAge)
        Set the cookie maximum age value to use for member of this group (in seconds).
        Default is 0. When set to 0, the default value specified by the property "cookie.max-age" will be used by getCookieMaxAgeResolved().
        Parameters:
        cookieMaxAge - a duration in seconds indicating the time of validity of the cookie
        Since:
        jcms-2.1
      • getVisibility

        public int getVisibility()
        Returns:
        the visibility
        Since:
        jcms-7.1.0
      • setVisibility

        public void setVisibility​(int v)
        Sets the visibility
        Parameters:
        v - the visibility
        Since:
        jcms-7.1.0
      • getRightFromClassMap

        public java.util.HashMap<java.lang.String,​DataRight> getRightFromClassMap()
        Retrieves the map associating DataRight instance to the publication type (class name) on which they must applied.
        Returns:
        a HashMap with class names for keys (String) and DataRight instances for values, can return null if rights have not been defined for this group.
      • setRightFromClassMap

        public void setRightFromClassMap​(java.util.HashMap<java.lang.String,​DataRight> rightFromClassMap)
        Set the map associating DataRight instance to the publication type (class name) on which they must be applied.
        For example, here is a map giving full access to WebPages an none to Articles :
         HashMap rightMap = new HashMap();
         DataRight fullRight = channel.getDataRight(true, true, true, true);
         DataRight noRight = channel.getDataRight(false, false, false, true);
         rightMap.put(WebPage.class.getName(), fullRight);
         rightMap.put(Article.class.getName(), noRight);
         group.setRightFromClassMap(rightMap);
         
        Parameters:
        rightFromClassMap - a HashMap with class names for keys (String) and DataRight instances for values.
      • getParentSet

        public java.util.HashSet<Group> getParentSet()
        Get the parent groups of this groups in a Set.
        Returns:
        a HashSet of Group (maybe null or empty).
        Since:
        jcms-5.6.0
      • setParentSet

        public void setParentSet​(java.util.HashSet<Group> parentSet)
        Set the parent groups of this group.
        This method will removes any cycle dependencies or null reference the specified Set may contains.
        Parameters:
        parentSet - HashSet of Group, can be null or empty.
        Since:
        jcms-5.6.0
      • getMemberSet

        public java.util.Set<Member> getMemberSet()
        Retrieves Set of members (Store only) who belongs to this group (or to any child group of this group).
        Returns:
        a internal (transient index) Set of Member, do not modify the content of the returned value. Never return null.
      • getMemberSet

        public java.util.Set<Member> getMemberSet​(boolean searchInDB)
        Retrieves Set of members (DBMember or Member) who belongs to this group (or to any child group of this group).

        Performance warning : requesting all DBMember of a group (and subgroup) might be a very expensive operation for group with large number of members. DO NOT use this method in UI where you can provide paginated results, see DBMemberQueryHandler or AllMemberQueryHandler.

        Parameters:
        searchInDB - if true extends search to the DBMember (see performance warning!)
        Returns:
        a Set of members. Internal index might be returned, do not modify the content of the returned value. Never return null.
        Since:
        jcms-10.0.6
      • getDBMemberCount

        public int getDBMemberCount()
        Returns:
        the count of DBMember in current Group and its children
        Since:
        jcms-7.1.2
      • getDeclaredMemberSet

        public java.util.Set<Member> getDeclaredMemberSet()
        Retrieves Set of members who belongs to this group ONLY.
        Returns:
        a internal (transient index) Set of Member, do not modify the content of the returned value.
      • updateMemberSet

        public void updateMemberSet​(Member mbr,
                                    boolean add)
        Update the memberSet index.
        You do NOT need to call this method which is used internally to update the memberSet.
        Parameters:
        mbr - the member to be added or removed
        add - add if true, remove if false
        Since:
        jcms-5.0.1
      • updateAuthGroupPublication

        public void updateAuthGroupPublication​(Publication pub,
                                               boolean add)
        Update the index of publication targeting this group in their authorized Groups.
        You do NOT need to call this method which is used internally to update the index.
        Parameters:
        pub - the publication to be added or removed
        add - add if true, remove if false
        Since:
        jcms-9.0.5 jcms-10.0.2 JCMS-6305
      • updateMemberSet

        public void updateMemberSet​(java.util.Set<Member> mbrSet,
                                    boolean add)
        Update the memberSet index.
        You do NOT need to call this method which is used internally to update the memberSet.
        Parameters:
        mbrSet - the members to be added or removed
        add - add if true, remove if false
        Since:
        jcms-9.0.5 JCMS-5821
      • getUseCategorySet

        public java.util.TreeSet<Category> getUseCategorySet()
        Retrieves the Categories that members of this groups are allowed to use when publishing.
        Returns:
        a TreeSet of Category, never return null.
        Since:
        jcms-4.0
      • setUseCategorySet

        public void setUseCategorySet​(java.util.TreeSet<Category> useCategorySet)
        Set the Categories that members of this groups are allowed to use when publishing.
        Parameters:
        useCategorySet - a TreeSet of Category, if null, an empty TreeSet will be defined.
        Since:
        jcms-4.0
      • getPublicationSet

        public java.util.Set<Publication> getPublicationSet()
        Retrieves a new set which contains the publications of all the members of this group.
        Performance Warning: this method creates and fill a new Set each time it is invoked.
        Returns:
        a new Set of Publications
        Since:
        jcms-3.0
      • getNotification

        public Notification getNotification()
        Retrieves the notifications defined for members of this group.
        Returns:
        the Notification object of this Group which defines the notifications to apply for its members.
      • setNotification

        public void setNotification​(Notification notification)
        Set the notifications to use for members of this group.
        Parameters:
        notification - Notification object defining the notifications queries and criteria.
      • getOrderComparator

        public static <T extends Group> java.util.Comparator<T> getOrderComparator()
      • getNameComparator

        public static <T extends Group> java.util.Comparator<T> getNameComparator()
      • getNameComparator

        public static <T extends Group> java.util.Comparator<T> getNameComparator​(java.lang.String lang)
      • getMemberCountComparator

        public static <T extends Group> java.util.Comparator<T> getMemberCountComparator()
      • getWorkspaceComparator

        public static <T extends Group> java.util.Comparator<T> getWorkspaceComparator()
      • getLastLdapSyncComparator

        public static <T extends Group> java.util.Comparator<T> getLastLdapSyncComparator()
      • getAclComparator

        public static <T extends Group> java.util.Comparator<T> getAclComparator()
        Retrieve a new instance of Group comparator sorting groups according their ACL.
        Type Parameters:
        T - Group class
        Returns:
        a new instance of Comparator
        Since:
        jcms-7.0.0
      • getGlobalGroupSet

        public static java.util.TreeSet<Group> getGlobalGroupSet()
        Returns a set of all Groups set which are global
        Returns:
        the global group set
        Since:
        jcms-5.5.0
        See Also:
        isGlobalGroup()
      • checkIntegrity

        public ControllerStatus checkIntegrity()
        Checks whether or not data integrity constraints are respected.
        Overrides:
        checkIntegrity in class Data
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • checkMember

        public ControllerStatus checkMember​(int op,
                                            Member mbr,
                                            java.util.Map context)
        Checks if the given member can perform the given operation.
        Overrides:
        checkMember in class Data
        Parameters:
        op - the operation (OP_CREATE, OP_UPDATE, ...)
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • checkDelete

        public ControllerStatus checkDelete​(Member mbr,
                                            java.util.Map context)
        Checks if the deletion can be performed
        Overrides:
        checkDelete in class Data
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
        Since:
        jcms-5.0.0
      • getTypeReferrerCount

        public int getTypeReferrerCount()
        Returns the number of type referencing this group (through "authgroups" field).
        Returns:
        the number of type referencing this group.
        Since:
        jcms-5.5.0
      • refreshTypeReferrerCount

        public void refreshTypeReferrerCount()
        Refresh type referrer count.
        Since:
        jcms-5.5.0
      • getWSTypeEntryReferrerSet

        public java.util.Set<WSTypeEntry> getWSTypeEntryReferrerSet()
        Returns a set of WSTypeEntry referencing this group.
        Returns:
        a set of WSTypeEntry referencing this group.
        Since:
        jcms-5.5.0
      • performDelete

        public void performDelete​(Member mbr,
                                  java.util.Map context)
        Performs data deletion
        Overrides:
        performDelete in class Data
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
        Since:
        jcms-5.0.0
      • getRootGroupSet

        public static java.util.Set<Group> getRootGroupSet​(Workspace ws)
        Returns the groups without parent in the given workspace. If the workspace is null, return the global groups without parent.
        Parameters:
        ws - the workspace.
        Returns:
        the groups without parent.
        Since:
        jcms-5.6.0
      • printTreeGroup

        public static void printTreeGroup​(Workspace ws,
                                          java.lang.String paramName,
                                          javax.servlet.jsp.JspWriter out,
                                          java.lang.String userLang,
                                          JcmsJspContext context)
                                   throws java.io.IOException
        Print a navigation tree for group splitted by workspaces (except if a workspace is provided).
        Parameters:
        ws - the workspace.
        paramName - the HTTP parameter used to filter on a given parent group.
        out - the JSP output stream.
        userLang - the user language.
        context - the context.
        Throws:
        java.io.IOException - if an error occurs
        Since:
        jcms-5.6.0
      • printOptionGroup

        public static void printOptionGroup​(Group selectedGrp,
                                            javax.servlet.jsp.JspWriter out,
                                            java.lang.String userLang,
                                            Member mbr)
                                     throws java.io.IOException
        Print the <option> tags for a <select> tag. Items are indented according the parent level and they are splitted by workspaces.
        Parameters:
        selectedGrp - the selected group.
        out - the JSP output stream.
        userLang - the user language.
        mbr - the logged member
        Throws:
        java.io.IOException - if an error occurs
        Since:
        jcms-5.6.0
      • printOptionGroup

        public static void printOptionGroup​(java.util.Set<Group> selectedSet,
                                            javax.servlet.jsp.JspWriter out,
                                            java.lang.String userLang,
                                            Member mbr)
                                     throws java.io.IOException
        Print the <option> tags for a <select> tag. Items are indented according the parent level and they are splitted by workspaces.
        Parameters:
        selectedSet - the set of selected groups
        out - the JSP output stream.
        userLang - the user language.
        mbr - the logged member
        Throws:
        java.io.IOException - if an error occurs
        Since:
        jcms-5.6.0
      • printOptionGroup

        public static void printOptionGroup​(Workspace ws,
                                            Group selectedGrp,
                                            javax.servlet.jsp.JspWriter out,
                                            java.lang.String userLang,
                                            Member mbr)
                                     throws java.io.IOException
        Print the <option> tags for a <select> tag. Items are indented according the parent level and they are splitted by workspaces (except if a workspace is provided).
        Parameters:
        ws - the workspace.
        selectedGrp - the selected group.
        out - the JSP output stream.
        userLang - the user language.
        mbr - the logged member
        Throws:
        java.io.IOException - if an error occurs
        Since:
        jcms-5.6.0
      • printOptionGroup

        public static void printOptionGroup​(Workspace ws,
                                            java.util.Set<Group> selectedSet,
                                            javax.servlet.jsp.JspWriter out,
                                            java.lang.String userLang,
                                            Member mbr)
                                     throws java.io.IOException
        Print the <option> tags for a <select> tag. Items are indented according the parent level and they are splitted by workspaces (except if a workspace is provided).
        Parameters:
        ws - the workspace.
        selectedSet - the set of selected groups
        out - the JSP output stream.
        userLang - the user language.
        mbr - the logged member
        Throws:
        java.io.IOException - if an error occurs
        Since:
        jcms-5.6.0
      • isLdapGroup

        public boolean isLdapGroup()
        Returns:
        true if this group is an LDAP group (if it has been synchronized with the LDAP, i.e., if getLastLdapSynchro() is not null AND getLdapDN() is not empty). Warning: this method won't return true if the LdapDN has been set but not the last ldap synchro date.
        Since:
        jcms-5.7.0
      • getLastLdapSynchro

        public java.util.Date getLastLdapSynchro()
        Returns:
        the Date when the last LDAP synchronization occured, or null if this group is not an LDAP group.
        Since:
        jcms-5.7.0
      • setLastLdapSynchro

        public void setLastLdapSynchro​(java.util.Date date)
        Set last LDAP synchronization Date (thus making it an LDAP group).
        Parameters:
        date - the last LDAP synchronization Date (may be null)
        Since:
        jcms-5.7.0
      • getLdapDN

        public java.lang.String getLdapDN()
        Returns:
        the distinguish name of this group.
        Since:
        jcms-5.7.0
      • setLdapDN

        public void setLdapDN​(java.lang.String ldapDN)
        Set the distinguish name of this group.
        Parameters:
        ldapDN - the distinguish name to set, e.g. "cn=Marketing,ou=Groups,dc=company,dc=com", (may be null).
        Since:
        jcms-5.7.0
      • getLdapSync

        public boolean getLdapSync()
        Returns:
        true if this group is allowed to be synchronized with ldap.
        Since:
        jcms-5.7.0
      • setLdapSync

        public void setLdapSync​(boolean ldapSync)
        Set if this group should be synchronized with ldap or not.
        Parameters:
        ldapSync - true if LDAP synchronization of this group should be performed if needed, false otherwise.
        Since:
        jcms-5.7.0
      • getAccessControlList

        public AccessControlList getAccessControlList()
        Gets the AccessControlList of this group.
        Returns:
        the AccessControlList of this Group or null if none was defined
        Since:
        jcms-7.0
      • setAccessControlList

        public void setAccessControlList​(AccessControlList acl)
        Sets the AccessControlList of this group.
        Parameters:
        acl - the AccessControlList to use for this Group, can be null
        Since:
        jcms-7.0
      • getDeclaredManager

        public Member getDeclaredManager()
        Returns the manager of this group. If the manager is a DBMember it is loaded. This method must not be called before the database as been initialized (e.g. it must not be called by a StoreListener). The manager returned by method must not be kept in data structures that are longer than the DB transaction (e.g. an index). In those cases, call getDeclaredManager(false).
        Returns:
        the manager of this group.
        Since:
        jcms-10.0.0
        See Also:
        getDeclaredManager(boolean)
      • getDeclaredManager

        public Member getDeclaredManager​(boolean queryDB)
        Returns the manager of this group. If queryDB is true query the DB to find the manager from managerDBID.
        Parameters:
        queryDB - indicates if the database must be queried.
        Returns:
        the manager of this group.
        Since:
        jcms-10.0.0
      • setDeclaredManager

        public void setDeclaredManager​(Member v)
        Sets the manager of this group.
        Parameters:
        v - the manager
        Since:
        jcms-10.0.0
      • getDeclaredManagerDBID

        public java.lang.String getDeclaredManagerDBID()
        Returns a JCMS ID of the manager if it is persisted in the DB.
        Returns:
        a JCMS ID.
        Since:
        jcms-10.0.0
      • setDeclaredManagerDBID

        public void setDeclaredManagerDBID​(java.lang.String v)
        Sets the managerDBID of this group.
        Parameters:
        v - the managerDBID
        Since:
        jcms-10.0.0
      • isManagedBy

        public boolean isManagedBy​(Member mbr)
        Returns true if the given member is the manager of this group.
        Parameters:
        mbr - the member
        Returns:
        true if the given member is the manager of this group.
        Since:
        jcms-10.0.0
      • getManager

        public Member getManager()
        Returns the manager of this group (it can be either the declared manager or the nearest manager of a parent group)
        Returns:
        the manager of this group
        Since:
        jcms-10.0.0
      • getAssistant

        @Deprecated
        public Member getAssistant()
        Deprecated.
        Returns the assistant of this group. If the assistant is a DBMember it is loaded. This method must not be called before the database as been initialized (e.g. it must not be called by a StoreListener). The assistant returned by method must not be kept in data structures that are longer than the DB transaction (e.g. an index). In those cases, call getAssistant(false).
        Returns:
        the assistant of this group.
        Since:
        jcms-10.0.6
        See Also:
        getAssistant(boolean)
      • getAssistant

        @Deprecated
        public Member getAssistant​(boolean queryDB)
        Deprecated.
        Returns the assistant of this group. If queryDB is true query the DB to find the assistant from assistantDBID.
        Parameters:
        queryDB - indicates if the database must be queried.
        Returns:
        the assistant of this group
        Since:
        jcms-10.0.6
      • setAssistant

        @Deprecated
        public void setAssistant​(Member v)
        Deprecated.
        Sets the assistant of this group.
        Parameters:
        v - the assistant
        Since:
        jcms-10.0.6
      • getAssistantDBID

        @Deprecated
        public java.lang.String getAssistantDBID()
        Deprecated.
        Returns a JCMS ID of the assistant if it is persisted in the DB.
        Returns:
        a JCMS ID.
        Since:
        jcms-10.0.6
      • setAssistantDBID

        @Deprecated
        public void setAssistantDBID​(java.lang.String v)
        Deprecated.
        Sets the assistantDBID of this group.
        Parameters:
        v - the assistantDBID
        Since:
        jcms-10.0.6
      • getAssistantSet

        public java.util.Set<Member> getAssistantSet()
        Returns:
        the set of assistants of this group
        Since:
        jcms-10.0.7 JCMS-9897
      • getAssistantSet

        public java.util.Set<Member> getAssistantSet​(boolean queryDB)
        Returns:
        the set of assistants of this group
        Since:
        jcms-10.0.7 JCMS-9897
      • setAssistantSet

        public void setAssistantSet​(java.util.TreeSet<Member> memberSet)
        Parameters:
        memberSet - the set of assistants of this group
        Since:
        jcms-10.0.7 JCMS-9897
      • splitHybridCollections

        protected void splitHybridCollections​(Data previousData)
        Description copied from class: Data
        This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.
        Overrides:
        splitHybridCollections in class Data
        Parameters:
        previousData - the previous data (provided for update only)
        Since:
        jcms-10.0.7 JCMS-9897
      • cleanHybridCollections

        protected void cleanHybridCollections()
        Description copied from class: Data
        This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.
        Overrides:
        cleanHybridCollections in class Data
        Since:
        jcms-10.0.7 JCMS-9897
      • getAssistantSetDBID

        public java.util.HashSet<java.lang.String> getAssistantSetDBID()
        Returns:
        ID set of DB assistants
        Since:
        jcms-10.0.7 JCMS-9897
      • setAssistantSetDBID

        public void setAssistantSetDBID​(java.util.HashSet<java.lang.String> v)
        Parameters:
        v - ID set of DB assistants
        Since:
        jcms-10.0.7 JCMS-9897
      • isAssistedBy

        public boolean isAssistedBy​(Member mbr)
        Returns true if the given member is the assistant of this group.
        Parameters:
        mbr - the member
        Returns:
        true if the given member is the assistant of this group.
        Since:
        jcms-10.0.6
      • getTeamPortal

        public PortalInterface getTeamPortal()
        Returns the teamPortal bound to this group.
        Returns:
        the teamPortal bound to this group.
        Since:
        jcms-10.0.0
      • setTeamPortal

        public void setTeamPortal​(PortalInterface teamPortal)
        Set the teamPortal bound this group.
        Parameters:
        teamPortal - the portal
        Since:
        jcms-10.0.0