Class Member

    • Field Detail

      • USE_CATEGORY_GROUP_AND_MEMBER

        public static final int USE_CATEGORY_GROUP_AND_MEMBER
        See Also:
        Constant Field Values
      • USE_CATEGORY_MEMBER_ONLY

        public static final int USE_CATEGORY_MEMBER_ONLY
        See Also:
        Constant Field Values
      • USE_CATEGORY_GROUP_ONLY

        public static final int USE_CATEGORY_GROUP_ONLY
        See Also:
        Constant Field Values
      • CTX_SKIP_ACTIVITY

        public static final java.lang.String CTX_SKIP_ACTIVITY
        See Also:
        Constant Field Values
      • FEATURE_CADDY_ACL

        public static final java.lang.String FEATURE_CADDY_ACL
        See Also:
        Constant Field Values
      • DISABLED_PASSWORD

        public static final java.lang.String DISABLED_PASSWORD
        The value to use in a Member's password to indicate that the member is disabled and should not be allowed to log in.
        See Also:
        setPassword(String), Constant Field Values
      • EXTERNAL_PASSWORD

        public static final java.lang.String EXTERNAL_PASSWORD
        Specify this value as parameter of setPassword(String) :
        • To indicate that user is enabled, but with an authentication handled through an external authentication system (ie user cannot sign in using local login/password).
        • To set the password field value with a random UUID (the value WILL NOT be valid password as it is NOT a bcrypt hash)
        See Also:
        setPassword(String), Constant Field Values
      • GUEST_GROUP_VID

        public static final java.lang.String GUEST_GROUP_VID
        The CollaborativeSpace's Guest Group virtual identifier property.
        Since:
        jcms-9.0.1
        See Also:
        Constant Field Values
      • DO_NOT_REASSIGN_PUBLICATION

        public static final java.lang.String DO_NOT_REASSIGN_PUBLICATION
        When a member is deleted his publications are reassigned to the workspace admin or the default admin. To avoid a publication to be reassigned, put an extraInfo {DO_NOT_REASSIGN_PUBLICATION, Boolean.TRUE} in this pub.
        See Also:
        Constant Field Values
      • CTX_SKIP_DUPLICATE_LOGIN_CHECK

        public static final java.lang.String CTX_SKIP_DUPLICATE_LOGIN_CHECK
        Add this attribute in the context map with a true boolean value, to skip the duplicate login verification in checkIntegrity
        See Also:
        Constant Field Values
      • CTX_SKIP_DUPLICATE_EMAIL_CHECK

        public static final java.lang.String CTX_SKIP_DUPLICATE_EMAIL_CHECK
        Add this attribute in the context map with a true boolean value, to skip the duplicate email verification in checkIntegrity
        See Also:
        Constant Field Values
      • usage

        protected int usage
      • login

        protected java.lang.String login
      • password

        protected java.lang.String password
      • name

        protected java.lang.String name
      • firstName

        protected java.lang.String firstName
      • salutation

        protected java.lang.String salutation
      • organization

        protected java.lang.String organization
      • department

        protected java.lang.String department
      • jobTitle

        protected java.lang.String jobTitle
      • email

        protected java.lang.String email
      • isEmailVisible

        protected boolean isEmailVisible
      • phone

        protected java.lang.String phone
      • mobile

        protected java.lang.String mobile
      • street

        protected java.lang.String street
      • postalCode

        protected java.lang.String postalCode
      • poBox

        protected java.lang.String poBox
      • region

        protected java.lang.String region
      • locality

        protected java.lang.String locality
      • country

        protected java.lang.String country
      • zoneId

        protected java.time.ZoneId zoneId
      • address

        protected java.lang.String address
      • info

        protected java.lang.String info
      • photo

        protected java.lang.String photo
      • declaredGroups

        protected Group[] declaredGroups
      • isAdmin

        protected boolean isAdmin
      • assistant

        protected Member assistant
      • assistantDBID

        protected java.lang.String assistantDBID
      • declaredManager

        protected Member declaredManager
      • declaredManagerDBID

        protected java.lang.String declaredManagerDBID
      • ldapSync

        protected boolean ldapSync
      • lastLdapSynchro

        protected java.util.Date lastLdapSynchro
      • rightFromClassMap

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

        protected int useCategoryMode
      • language

        protected java.lang.String language
      • webdavAccess

        protected boolean webdavAccess
      • useCategorySet

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

        protected java.util.TreeSet<Category> readCategorySet
      • delegateMemberSet

        protected java.util.TreeSet<Member> delegateMemberSet
      • delegateMemberSetDBID

        protected java.util.HashSet<java.lang.String> delegateMemberSetDBID
      • encodedAlertRules

        protected java.lang.String encodedAlertRules
      • groups

        protected transient Group[] groups
      • canPublishContent

        protected transient boolean canPublishContent
      • canUpdateDeleteContent

        protected transient boolean canUpdateDeleteContent
      • canEditCategories

        protected transient boolean canEditCategories
      • canManageContentStaled

        protected transient boolean canManageContentStaled
      • fullName

        protected transient java.lang.String fullName
      • fullEmail

        protected transient java.lang.String fullEmail
      • locale

        protected transient java.util.Locale locale
      • isWorkspaceSetUpToDate

        protected transient boolean isWorkspaceSetUpToDate
      • alertRuleSet

        protected transient java.util.Set<AlertRule> alertRuleSet
      • delegateMbrIdSet

        protected transient java.util.Set<java.lang.String> delegateMbrIdSet
      • delegateMbrIdSetInit

        protected transient boolean delegateMbrIdSetInit
      • ASYNC_DELETE

        public static final java.lang.String ASYNC_DELETE
        Name of context map attribute that can be specified when invoking performDelete(Member, Map) to explicitely request
        • either an synchronous delete, with value Boolean.FALSE,
        • or else an asynchronous delete, with value Boolean.TRUE
        If context map attribute is not specified, the default behavior can be configured with property member.async-delete.enabled: true
        Since:
        10.0.7 / JCMS-9292
        See Also:
        Constant Field Values
      • EXTRADBDATA_LAST_LOGIN_TIME

        public static final java.lang.String EXTRADBDATA_LAST_LOGIN_TIME
        Deprecated.
        since JCMS-6281, last login time are store in dedicated table
        The extra data name for the last login time value.
        Since:
        jcms-6.0.0
        See Also:
        Constant Field Values
      • MAX_LAST_LOGIN_DATE_HISTORY

        public static int MAX_LAST_LOGIN_DATE_HISTORY
        Deprecated.
        since JCMS-6281. Read max login through property "member.max-last-login-date"
        The maximum number of Date to keep in the last login date Set.

        member.max-last-login-date

        Since:
        jcms-6.0.1
      • IGNORE_LOGIN_DATE

        public static final java.lang.String IGNORE_LOGIN_DATE
        It is possible to specify the date must not be registered, by setting the request attribute with this key and Boolean.TRUE as value.
        Since:
        jcms-6.1.0
        See Also:
        Constant Field Values
    • Constructor Detail

      • Member

        public Member()
      • Member

        public Member​(Member other)
        Constructor by copy : creates a new instance of Member from the specified Member.

        Warning : Do not use this constructor to create an update instance for a DBMember, instead use getUpdateInstance() :

         Member updated = (Member) member.getUpdateInstance();
         update.performUpdate(...)
         
        Parameters:
        other - the member to copy, must not be null.
    • Method Detail

      • getUpdateInstance

        public Data getUpdateInstance()
        Description copied from class: Data
        Returns an instance of this object to update it.
        Overrides:
        getUpdateInstance in class Data
        Returns:
        an instance of this object to update it.
      • getFieldValue

        public java.lang.Object getFieldValue​(java.lang.String fieldName,
                                              java.lang.String lang,
                                              boolean useDefault)
                                       throws java.lang.NoSuchFieldException
        Gets the Object value of the given field name for this Member.
        Overrides:
        getFieldValue in class Data
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        lang - the language (ISO-639 code) in which to retrieve the field value (used only for multilingual fields).
        useDefault - whether to use the publication main language if the field value is not available in the requested language (used only for multilingual fields).
        Returns:
        the Object field value
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Publication.
        Since:
        jcms-7.0.0
      • setFieldValue

        public void setFieldValue​(java.lang.String fieldName,
                                  java.lang.Object value,
                                  java.lang.String lang)
                           throws java.lang.NoSuchFieldException
        Sets the value of the given Object field name for the current Member.
        If the field is multilingual, the given language will be used.
        Do not retrieve Category fields, see #getCategoryFieldValue(String, Member).
        Overrides:
        setFieldValue in class Data
        Parameters:
        fieldName - the field name from which to retrieve the field value.
        value - whether to use the publication main language if the field value is not available in the requested language (used only for multilingual fields).
        lang - the language (ISO-639 code) in which to retrieve the field value (used only for multilingual fields).
        Throws:
        java.lang.NoSuchFieldException - if the field was not found in the given Data.
        Since:
        jcms-7.0.0
      • toString

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

        public java.lang.String toFullString()
        Overrides:
        toFullString in class Data
      • 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
      • getFullName

        public java.lang.String getFullName()
        Returns:
        the full name of the member (first name + name)
        Since:
        jcms-4.0
      • getIcon

        public java.lang.String getIcon()
        Returns:
        String the image path for the icon
        Since:
        jcms-5.0.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​(Workspace ws)
        Parameters:
        ws - the current Workspace
        Returns:
        String the image path for the icon
        Since:
        jcms-5.0.0
      • getHtmlIcon

        public java.lang.String getHtmlIcon​(java.lang.String userLang)
        Return the img tag for the icon
        Parameters:
        userLang - the current language
        Returns:
        the img tag for the icon
        Since:
        jcms-5.0.0
      • getHtmlIcon

        public java.lang.String getHtmlIcon​(Workspace ws,
                                            java.lang.String userLang)
        Return the img tag for the icon
        Parameters:
        ws - the current Workspace
        userLang - the current language
        Returns:
        the img tag for the icon
        Since:
        jcms-5.0.0
      • getIconParameter

        protected java.lang.String[] getIconParameter​(Workspace ws,
                                                      java.lang.String userLang)
        Return a String[2]: Title / Alt for the given parameters
        Parameters:
        ws - the Workspace or Null
        userLang - the UserLang or null
        Returns:
        a String[2]
        Since:
        jcms-5.0.0
      • getStatus

        public int getStatus()
        Return an interger Status of the Member
        Returns:
        int the Member status
        Since:
        jcms-7.0.0
      • canRead

        public boolean canRead​(Group grp)
        This convenient method checks if this member can read a group.
        Parameters:
        grp - the group
        Returns:
        tur if this member can read the group.
        Since:
        jcms-7.1.0
      • canRead

        public boolean canRead​(Category cat,
                               boolean searchInGroups,
                               boolean searchInParent)
        This convenient method checks if a member can read a categorie.
        Parameters:
        cat - the categorie
        searchInGroups - if true check if one of the group this member belongs to is authorized to read the categorie.
        searchInParent - if true check right on parent categories
        Returns:
        true if this member can read the categorie
        Since:
        jcms-4.1
        See Also:
        Data.canBeReadBy(com.jalios.jcms.Member)
      • canRead

        public boolean canRead​(Publication pub,
                               boolean searchInGroups)
        This convenient method checks if a member can read a publication.
        Parameters:
        pub - the publication
        searchInGroups - if true check if one of the group this member belongs to is authorized to read the publication.
        Returns:
        true if this member can read the publication
        Since:
        jcms-2.1
        See Also:
        Data.canBeReadBy(com.jalios.jcms.Member)
      • canPublishContent

        public boolean canPublishContent()
        Checks if if this member can publish something else than UGC.
        Returns:
        true if this member can publish something else than UGC.
        Since:
        jcms-3.0
      • canPublishContent

        public boolean canPublishContent​(Workspace ws)
        Checks if if this member can publish something else than UGC.
        Parameters:
        ws - the Workspace to work on
        Returns:
        true if this member can publish something else than UGC.
        Since:
        jcms-5.0.0
      • canUpdateDeleteContent

        public boolean canUpdateDeleteContent()
        Returns:
        true if this member has the "update other" / "delete other" right" on at least one CPT.
        Since:
        jcms-3.0
      • canUpdateDeleteContent

        public boolean canUpdateDeleteContent​(Workspace ws)
        Check if member can perform Update or Delete for the gicen Workspace
        Parameters:
        ws - the Workspace to ckeck
        Returns:
        true if this member has the "update other" / "delete other" right" on at least one CPT.
        Since:
        jcms-5.0.0
      • invalidateCanManageContent

        public void invalidateCanManageContent()
        Invalidate the current status of canManageContent (the next time it will be called, it will be computed).
        Since:
        jcms-3.0
      • canPublishSome

        public boolean canPublishSome​(java.lang.Class<?> clazz)
        Check if this member can publish on this class or one of it's subclass
        Parameters:
        clazz - the class to be checked
        Returns:
        true if this member can publish on this class or one of it's subclass
        Since:
        jcms-4.0
      • canPublishSome

        public boolean canPublishSome​(java.lang.Class<?> clazz,
                                      Workspace ws)
        Check if this member can publish on this class or one of it's subclass in the given workspace.
        Parameters:
        clazz - the class to be checked
        ws - the workspace to be checked
        Returns:
        true if this member can publish on this class or one of it's subclass
        Since:
        jcms-5.0.5
      • canPublishSome

        public boolean canPublishSome​(java.lang.Class<?> clazz,
                                      Workspace ws,
                                      java.util.Map<java.lang.String,​?> contextMap)
        Check if this member can publish on this class or one of it's subclass in the given workspace.
        Parameters:
        clazz - the class to be checked
        ws - the workspace to be checked
        contextMap - an optional context map providing information on publish request context, may be null
        Returns:
        true if this member can publish on this class or one of it's subclass
        Since:
        jcms-10.0.6 / JCMS-8882
      • canPublishAll

        public boolean canPublishAll​(java.lang.Class<?> clazz)
        Check if this member can publish on this class and all it's subclass
        Parameters:
        clazz - the class to be checked
        Returns:
        true if this member can publish on this class and all it's subclass
        Since:
        jcms-4.0
      • canPublish

        public boolean canPublish​(java.lang.Class<?> clazz)
        Check if this member can publish the specified class of publication in at least one of his workspaces.
        Parameters:
        clazz - a publication class to test (eg Article.class, FileDocument.class, ...)
        Returns:
        true if member has right to publish an instance of such class in one of his workspaces.
        Since:
        jcms-3.0
        See Also:
        getWorkspaceSet(), canPublish(java.lang.Class,java.util.Set)
      • canPublish

        public boolean canPublish​(java.lang.Class<?> clazz,
                                  Workspace ws)
        Check if this member can publish the specified class of publication in the specified workspace.
        Parameters:
        clazz - a publication class to test (eg Article.class, FileDocument.class, ...)
        ws - the Workspace in which to check publish right
        Returns:
        true if member has right to publish an instance of such class in the given workspace
        Since:
        jcms-4.1
        See Also:
        canPublish(java.lang.Class,java.util.Set)
      • canPublish

        public boolean canPublish​(java.lang.Class<?> clazz,
                                  Workspace ws,
                                  java.util.Map<java.lang.String,​?> contextMap)
        Check if this member can publish the specified class of publication in the specified workspace.
        Parameters:
        clazz - a publication class to test (eg Article.class, FileDocument.class, ...)
        ws - the Workspace in which to check publish right
        contextMap - an optional context map providing information on publish request context, may be null
        Returns:
        true if member has right to publish an instance of such class in the given workspace
        Since:
        jcms-10.0.6 / JCMS-8882
        See Also:
        canPublish(java.lang.Class,java.util.Set)
      • canPublish

        public boolean canPublish​(java.lang.Class clazz,
                                  java.util.Set<? extends Workspace> workspaceSet)
        Check if this member can publish the specified class of publication in at least one of the workspaces specified.

        As of current implementation, a member can publish the class of publication in a workspace if :

        • workspace is not closed
        • publication type is enabled in workspace
        • member is an admin, OR member has the publish rights for this class, or belongs to at least one group that have to publish for this class

        These rules may be modified by RightPolicyFilter.canPublish(boolean, Member, Class, Set)

        Additionnal restrictions are often required by the member to create/update a publication and are verified through other ways during operation when Data.checkCreate(Member) or Data.checkUpdate(Member) is invoked.

        • ability to work on the current state of a publication given its workflow in the workspace
        • ability to use some categories
        • ...
        Parameters:
        clazz - a publication class to test (eg Article.class, FileDocument.class, ...)
        workspaceSet - the set of workspace in which to check publish right
        Returns:
        true if member has right to publish an instance of such class
        Since:
        jcms-4.1
      • canPublish

        public boolean canPublish​(java.lang.Class clazz,
                                  java.util.Set<? extends Workspace> workspaceSet,
                                  java.util.Map<java.lang.String,​?> contextMap)
        Check if this member can publish the specified class of publication in at least one of the workspaces specified.

        As of current implementation, a member can publish the class of publication in a workspace if :

        • workspace is not closed
        • publication type is enabled in workspace
        • member is an admin, OR member has the publish rights for this class, or belongs to at least one group that have to publish for this class

        These rules may be modified by RightPolicyFilter.canPublish(boolean, Member, Class, Set)

        Additionnal restrictions are often required by the member to create/update a publication and are verified through other ways during operation when Data.checkCreate(Member) or Data.checkUpdate(Member) is invoked.

        • ability to work on the current state of a publication given its workflow in the workspace
        • ability to use some categories
        • ...
        Parameters:
        clazz - a publication class to test (eg Article.class, FileDocument.class, ...)
        workspaceSet - the set of workspace in which to check publish right
        contextMap - an optional context map providing information on publish request context, may be null
        Returns:
        true if member has right to publish an instance of such class
        Since:
        jcms-10.0.6 / JCMS-8882
      • internalCanPublish

        protected boolean internalCanPublish​(java.lang.Class<?> clazz,
                                             java.util.Set<? extends Workspace> workspaceSet)
      • canPublish

        public boolean canPublish​(Data data)
        Convenient method
        Parameters:
        data - the Data to check
        Returns:
        true if the member can publish the class of the given data class
        See Also:
        canPublish(java.lang.Class)
      • canArchive

        public boolean canArchive​(Publication pub)
        Check if the member is in a role that can archive the given publication. It checks if the member has the right to put this publication in the archived state in the workflow of the publication, but it does not take into account the current state of the publication.
        Parameters:
        pub - the publication to check
        Returns:
        true if it can archive the publication false otherwise
      • canUpdateOther

        public boolean canUpdateOther​(java.lang.Class<?> clazz)
      • internalCanUpdateDeleteOtherCommon

        protected boolean internalCanUpdateDeleteOtherCommon​(java.lang.Class<?> clazz,
                                                             Workspace ws,
                                                             boolean checkUpdate)
      • canUpdateOther

        public boolean canUpdateOther​(java.lang.Class<?> clazz,
                                      Workspace ws)
        Check if this member can update content of the specified class, published by other user, in the given workspace.
        Parameters:
        clazz - the class to be checked
        ws - the workspace to be checked
        Returns:
        true if this member can update on this class or one of it's subclass
      • canUpdateOther

        public boolean canUpdateOther​(java.lang.Class<?> clazz,
                                      Workspace ws,
                                      java.util.Map<java.lang.String,​?> contextMap)
        Check if this member can update content of the specified class, published by other user, in the given workspace.
        Parameters:
        clazz - the class to be checked
        ws - the workspace to be checked
        contextMap - an optional context map providing information on update request context, may be null
        Returns:
        true if this member can update on this class or one of it's subclass
        Since:
        jcms-10.0.6 / JCMS-8882
      • canUpdateOther

        public boolean canUpdateOther​(Data data)
      • canUpdateOther

        public boolean canUpdateOther​(Data data,
                                      RightInfo rightInfo)
      • internalCanUpdateOther

        protected boolean internalCanUpdateOther​(Data data,
                                                 RightInfo rightInfo)
      • checkManagerInRole

        public boolean checkManagerInRole​(Publication pub)
        Check if this Member is an authorized manager actor in the current workflow state of the specified publication.

        In current implementation, the following condition are required :

        • the manager has been declared as a member of the role corresponding to the current publication's state
        • this member is the manager of the publication, as determined by WorkflowManager.getManager(Publication)
        Parameters:
        pub - the publication (false is returned if null is specified)
        Returns:
        true if this Member is a manager allowed to work in specified publication state, false otherwise
        Since:
        jcms-10.0.4 / JCMS-7967
        See Also:
        WorkflowManager.getManager(Publication)
      • canDeleteOther

        public boolean canDeleteOther​(Data data)
      • canDeleteOther

        public boolean canDeleteOther​(Data data,
                                      RightInfo rightInfo)
      • internalCanDeleteOther

        protected boolean internalCanDeleteOther​(Data data,
                                                 RightInfo rightInfo)
      • canDeleteOther

        public boolean canDeleteOther​(java.lang.Class<?> clazz)
      • canDeleteOther

        public boolean canDeleteOther​(java.lang.Class<?> clazz,
                                      Workspace ws)
        Check if this member can delete content of the specified class, published by other user, in the given workspace.
        Parameters:
        clazz - the class to be checked
        ws - the workspace to be checked
        Returns:
        true if this member can delete on this class or one of it's subclass
      • canDeleteOther

        public boolean canDeleteOther​(java.lang.Class<?> clazz,
                                      Workspace ws,
                                      java.util.Map<java.lang.String,​?> contextMap)
        Check if this member can delete content of the specified class, published by other user, in the given workspace.
        Parameters:
        clazz - the class to be checked
        ws - the workspace to be checked
        contextMap - an optional context map providing information on delete request context, may be null
        Returns:
        true if this member can delete on this class or one of it's subclass
        Since:
        jcms-10.0.6 / JCMS-8882
      • getRight

        public DataRight getRight​(java.lang.Class<?> clazz,
                                  boolean searchInGroups)
        Search for a Right object bound to clazz or one of its super class. If none right are found, search in the groups rights.
        Parameters:
        clazz - the Class the right is searched for
        searchInGroups - if true, the search will be continued in the groups rights if none member rights have been found
        Returns:
        the Right object bound to the clazz (or null if none)
      • getRight

        public DataRight getRight​(java.lang.Class<?> clazz,
                                  boolean searchInGroups,
                                  Workspace ws)
        Search for a Right object bound to clazz or one class. If none right are found, search in the groups rights of the given workspace. If searchInGroups is false and result is null, that means for that member, the DataRight has to be looked for in the groups.
        Parameters:
        clazz - the Class the right is searched for
        searchInGroups - if true, the search will be continued in the groups rights if none member rights have been found
        ws - only used if searchInGroups true. If ws is null, search in the global groups otherwise search in groups of ws.
        Returns:
        the Right object bound to the clazz (or null if none)
        Since:
        jcms-4.1
      • canWorkOn

        public boolean canWorkOn​(Publication pub)
        Check if this member can work on the given publication (ie, if it has the rights and if it is in a state the member can work in).
        Parameters:
        pub - the publication
        Returns:
        true if the member can work on the publication
        Since:
        jcms-3.0
      • isWorker

        public boolean isWorker()
        Check if this member can work either on publications or on categories (this is a convenient method wich performs a 'or' on the values returned by canPublishContent(), canUpdateDeleteContent() and canEditCategories()).
        Returns:
        true if the member can work at least on one publication type (except review) or he can edit the categories.
        Since:
        jcms-4.0
        See Also:
        canPublishContent(), canUpdateDeleteContent(), canEditCategories()
      • internalIsWorker

        protected boolean internalIsWorker()
      • isWorker

        public boolean isWorker​(Workspace ws)
        Check if this member can work either on publications or on categories (this is a convenient method wich performs a 'or' on the values returned by canPublishContent(Workspace), canUpdateDeleteContent(Workspace) and canEditCategories()).
        Parameters:
        ws - the workspace to check
        Returns:
        true if the member can work at least on one publication type (except review) or he can edit the categories.
        Since:
        jcms-5.0.0
        See Also:
        canPublishContent(Workspace), canUpdateDeleteContent(Workspace), canEditCategories()
      • internalIsWorker

        protected boolean internalIsWorker​(Workspace ws)
      • getEditCategoryMode

        public int getEditCategoryMode()
      • isAdmin

        public boolean isAdmin​(Workspace ws)
        Returns true if this member is an administrator of the given workspace
        Parameters:
        ws - the workspace to be checked
        Returns:
        true if this member is an administrator of the given workspace
        Since:
        jcms-4.1
      • hasExplicitRights

        public boolean hasExplicitRights()
      • hasWebdavAccess

        public boolean hasWebdavAccess()
        This method check if member have a webdav access or belongs to a group having webdav access.
        Returns:
        boolean true if member have webdav Access
        Since:
        jcms-5.5.0
      • canUseCaddy

        public boolean canUseCaddy()
      • isDisabled

        public boolean isDisabled()
        Check if this member account has been disabled.

        Returns:
        true if the account is disabeld
        Since:
        jcms-4.0
      • disable

        public void disable()
        Disable this account.

        This method disables the account by setting the password field value of this Member to constant DISABLED_PASSWORD.

        Important : LDAP account disable status is automatically managed by LDAP synchronization ; Member is disabled when account cannot be found on LDAP, and is enabled again when account is found.
        To definitively disable an LDAP account you MUST detach the Member from the LDAP synchronization :

         mbr.setLastLdapSynchro(null); // cancel the LDAP status of the member
         mbr.setLdapSync(false); // prevent further LDAP synchronization attempt
         
        Since:
        jcms-4.0.2
      • isLdapAccount

        public boolean isLdapAccount()
        Check if this member account has been created from LDAP or synchronized with LDAP.

        Implementation detail : a Member is considered as an LDAP account if and only if its last LDAP synchronization date (getLastLdapSynchro()) is not null.

        Returns:
        boolean true if it is an LDAP Account
        Since:
        jcms-4.0
      • isGuest

        public boolean isGuest()
        Check if this member belongs to the CollaborativeSpace's Guests Group.
        Returns:
        boolean true if it is a Guest account.
        Since:
        jcms-9.0.1
        See Also:
        Channel.getGuestGroup()
      • getLastLdapSynchro

        public java.util.Date getLastLdapSynchro()
        Get the Date of the last LDAP synchronization of this member.

        Returns:
        a Date or null if member was never synchronized with LDAP
        Since:
        jcms-4.0
      • setLastLdapSynchro

        public void setLastLdapSynchro​(java.util.Date lastSyncDate)
        Set the Date of the last LDAP synchronization of this member.
        Parameters:
        lastSyncDate - a Date or null
        Since:
        jcms-4.0
      • getLdapSync

        public boolean getLdapSync()
        Returns:
        true if this member is allowed to be synchronized with ldap.
        Since:
        JCMS-2450
      • setLdapSync

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

        public boolean getWebdavAccess()
        Get the value of webdavAccess
        Returns:
        boolean true if Webdav Access is enabled
        Since:
        jcms-5.5.0
      • setWebdavAccess

        public void setWebdavAccess​(boolean webdavAccess)
        Set the value of webdavAccess
        Parameters:
        webdavAccess - the webdavAccess value
        Since:
        jcms-5.5.0
      • isEmailVisible

        public boolean isEmailVisible()
        Retrieves whether this member's email is visible to other members or not.
        Returns:
        true if it is visible, false otherwise
      • setEmailVisible

        public void setEmailVisible​(boolean visible)
        Sets whether this member's email is visible to other members or not.
        Parameters:
        visible - true if it is visible, false otherwise
      • belongsToGroup

        public boolean belongsToGroup​(Group group)
        This convenient method returns true if this member belongs to a given group.
        Parameters:
        group - the group
        Returns:
        true if this member belongs to the given group, false otherwise.
        Since:
        jcms-2.1
      • belongsToGroup

        public boolean belongsToGroup​(Group[] grps)
        This convenient method returns true if this member belongs to at least one of the given groups.
        Parameters:
        grps - the groups to be checked
        Returns:
        true if this member belongs to one of the given groups, false otherwise.
        Since:
        jcms-3.0
      • getCookieMaxAge

        public int getCookieMaxAge()
        Return the lowerest cookieMaxAge value of the groups the member belongs to.
        Returns:
        the cookie max-age value in seconds.
        Since:
        jcms-2.1
      • getGroups

        public Group[] getGroups()
        Returns all the groups this member belongs to.
        Returns:
        all the groups this member belongs to.
        Since:
        jcms-5.6.0
      • getGroupSet

        public java.util.Set<Group> getGroupSet​(Workspace ws)
        Returns the groups of the given workspace the member belongs to.
        Parameters:
        ws - the workspace
        Returns:
        the groups of the given workspace the member belongs to.
        Since:
        jcms-7.0.0
      • isDeclaredGroup

        public boolean isDeclaredGroup​(Group group)
        Returns true if the given group is a declared groups.
        Parameters:
        group - the group to be tests.
        Returns:
        true if the given group is a declared groups.
        Since:
        jcms-5.6.0
      • refreshGroups

        public void refreshGroups()
        Refresh the groups (force groups to be inferred from declared groups)
        Since:
        jcms-5.6.0
      • getDeclaredGroupSet

        public java.util.Set<Group> getDeclaredGroupSet()
        Get the value of declaredGroups ordered by name.

        Returns an empty collection if declared groups are null.

        Returns:
        Value of declaredGroups.
        Since:
        jcms-10.0.4
        See Also:
        getDeclaredGroups(), getDeclaredGroupSet(Comparator)
      • getDeclaredGroupSet

        public java.util.Set<Group> getDeclaredGroupSet​(java.util.Comparator<Group> comp)
        Get the value of declaredGroups ordered by given comparator.

        Returns an empty collection if declared groups are null.

        Parameters:
        comp - the comparator to use to sort the set. If null, defaults using a Name comparator.
        Returns:
        Value of declaredGroups.
        Since:
        jcms-10.0.4
        See Also:
        getDeclaredGroups(), getDeclaredGroupSet()
      • setDeclaredGroups

        public void setDeclaredGroups​(Group[] v)
        Set the value of declaredGroups.
        Parameters:
        v - Value to assign to declaredGroups.
        Since:
        jcms-5.6.0
      • addGroup

        public void addGroup​(Group group)
        Add this member to a given group (this changes is not saved)
        Parameters:
        group - the group to be added.
        Since:
        jcms-5.6.2
      • removeGroup

        public void removeGroup​(Group group)
        Remove this member from a given group(this changes is not saved)
        Parameters:
        group - the group to be removed.
        Since:
        jcms-5.6.2
      • hasRead

        public boolean hasRead​(Publication pub)
        Check if the given publication has been read by this member
        Parameters:
        pub - the publication read
        Returns:
        true if readed false instead
        Since:
        jcms-4.0.2
        See Also:
        Publication.hasBeenReadBy(Member)
      • getNotification

        public Notification getNotification()
        Get the Notification
        Returns:
        the notification
      • setNotification

        public void setNotification​(Notification notification)
        Sets the Notification
        Parameters:
        notification - the notification
        Since:
        jcms-4.0
      • canEditCategories

        public boolean canEditCategories()
        Check if the member can edit categories. Caution: the semantics of this method changed since jcms-3.0. To have fine grain information, please use getCategoryRootSet() method.
        Returns:
        true if the member can edit at least on root of category
        See Also:
        getCategoryRootSet()
      • canEditCategories

        public boolean canEditCategories​(Workspace ws)
        Return true if this member can edit at least one category of this workspace
        Parameters:
        ws - the Workspace to check with
        Returns:
        true if this member can edit at least one category of this workspace
        See Also:
        getCategoryRootSet()
      • getAllCategoryRootSet

        public java.util.Set<Category> getAllCategoryRootSet()
        Returns all the categories root this member can manage (ie either those declared on the member, on its group or on the categories)
        Returns:
        all the categories root this member can manage (ie either those declared on the member, on its group or on the categories)
        Since:
        jcms-10.0.5
      • getCategoryRootSet

        public java.util.Set<Category> getCategoryRootSet()
        Returns the set of category roots the member can manage.
        Returns:
        a Set of Category (or an empty set if this member has no category right)
      • getCategoryRootSet

        public java.util.Set<Category> getCategoryRootSet​(Workspace ws)
        Returns the set of category roots the member can manage in a given workspace.
        Parameters:
        ws - the Workspace to be test (null for all workspace)
        Returns:
        a Set of Category (or an empty set if this member has no category right)
      • canManageCategory

        public boolean canManageCategory​(Category cat)
        Check if the member can manage the given category (ie if the given category is a descendant of one of the member's root category)
        Parameters:
        cat - the category to test
        Returns:
        true if this member can manage the category
        Since:
        jcms-3.0
      • canManageCategory

        public boolean canManageCategory​(Category cat,
                                         boolean searchInGroups,
                                         boolean searchInParent)
        Check if the member can manage the given category (ie if the given category is a descendant of one of the member's root category)
        Parameters:
        cat - the category to test
        searchInGroups - if true check if one of the group this member belongs to is authorized to read the categorie.
        searchInParent - if true check right on parent categories
        Returns:
        true if this member can manage the category
        Since:
        jcms-4.1
      • internalCanManageCategory

        protected boolean internalCanManageCategory​(Category cat,
                                                    boolean searchInGroups,
                                                    boolean searchInParent)
      • canCreateWorkspace

        public boolean canCreateWorkspace()
        Check if the member can create a workspace
        Returns:
        true if this member can create a Workspace
        Since:
        jcms-5.7.3
      • canCreateWorkspace

        public boolean canCreateWorkspace​(Workspace model)
        Check if the member can duplicate the model to create a workspace
        Parameters:
        model - the workspace to duplicate
        Returns:
        true if this member can create a Workspace from the model
        Since:
        jcms-5.7.3
      • internalCanCreateWorkspace

        protected boolean internalCanCreateWorkspace​(Workspace model)
      • canCreateContact

        public boolean canCreateContact()
        Check if this member can create a new contact
        Returns:
        true if this member can create a new contact
        Since:
        jcms-8.0.0
      • getExpandedUseCategorySet

        public java.util.TreeSet<Category> getExpandedUseCategorySet()
        Return the category set this member can use according his category use mode (group, member or group and member).

        This method include use right specified on categories themself (since JCMS-8769)

        Returns:
        a TreeSet of category this member can use
        Since:
        jcms-4.0
      • canUseCategory

        public boolean canUseCategory​(Category cat)
        Check if this member can use the given category.
        Parameters:
        cat - the category to check
        Returns:
        true if this member can use the given category.
        Since:
        jcms-4.0
        See Also:
        canUseCategory(Category, boolean, boolean)
      • canUseCategory

        public boolean canUseCategory​(Category cat,
                                      boolean searchInGroups,
                                      boolean searchInParent)
        Check if this member can use the given category.

        Use of a Category:

        • that cannot be read by member is refused
        • that is not selectable is refused.
        Note: use of any category is always granted for central admins.
        Parameters:
        cat - the category to check
        searchInGroups - if true check if one of the group this member belongs to is authorized to read the categorie.
        searchInParent - if true check right on parent categories
        Returns:
        true if this member can use the given category.
        Since:
        jcms-5.5.0
      • internalCanUseCategory

        protected boolean internalCanUseCategory​(Category cat,
                                                 boolean searchInGroups,
                                                 boolean searchInParent)
      • canUseDescendantCategories

        public boolean canUseDescendantCategories​(Category cat,
                                                  boolean checkRoot)
        Check if this member can use at least one descendant of the given category.
        Parameters:
        cat - the category to check
        checkRoot - if true check also the given category
        Returns:
        true if this member can use at least one descendant of the given category.
        Since:
        jcms-4.0
      • getUseCategorySet

        public java.util.TreeSet<Category> getUseCategorySet()
        Get the value of useCategorySet.
        Returns:
        Value of useCategorySet.
        Since:
        jcms-4.0
      • setUseCategorySet

        public void setUseCategorySet​(java.util.TreeSet<Category> v)
        Set the value of useCategorySet.
        Parameters:
        v - Value to assign to useCategorySet.
        Since:
        jcms-4.0
      • getUseCategoryMode

        public int getUseCategoryMode()
        Get the value of useCategoryMode.
        Returns:
        Value of useCategoryMode.
        Since:
        jcms-4.0
      • setUseCategoryMode

        public void setUseCategoryMode​(int v)
        Set the value of useCategoryMode.
        Parameters:
        v - Value to assign to useCategoryMode.
        Since:
        jcms-4.0
      • getUsage

        public int getUsage()
        Get the value of usage.
        Returns:
        the value of usage (ie: Account or Contact).
        Since:
        jcms-6.1.0
      • setUsage

        public void setUsage​(int usage)
        Set the value of usage (ie: Account or Contact).
        Parameters:
        usage - value to assign to usage, choose from USAGE_ACCOUNT or USAGE_CONTACT
        Since:
        jcms-6.1.0
      • getUsageName

        public java.lang.String getUsageName​(java.lang.String lang)
        Returns the name of the usage (eg: Account, Contact).
        Parameters:
        lang - the language code (ISO-639) in which you would like to retrieve the usage
        Returns:
        the name of the usage.
        Since:
        jcms-6.1.0
      • isAllAuthentication

        public boolean isAllAuthentication()
        Check if this Member support all authentication, including local password and external authentication.
        Returns:
        true if this Member is an enabled account with a valid local password, false in any other case
        Since:
        jcms-10.0.6 / JCMS-9072
      • isExternalAuthentication

        public boolean isExternalAuthentication()
        Check if this Member is an account whose authentication is not the local password.
        Returns:
        true if this Member is an enabled account without a valid local password, false in any other case
        Since:
        jcms-10.0.6 / JCMS-9072
      • isValidAccount

        public boolean isValidAccount()
        Returns:
        true if this member is an account and it is not disabled
        Since:
        jcms-7.1.1
      • getReadCategorySet

        public java.util.TreeSet<Category> getReadCategorySet()
        Gets the TreeSet of Category used for Publication read right. This category set contains all the categories a publication must match in order to be visible by this member.
        Returns:
        a TreeSet of Category.
        Since:
        jcms-5.5.0
      • setReadCategorySet

        public void setReadCategorySet​(java.util.TreeSet<Category> v)
        Set the value of readCategorySet.
        Parameters:
        v - Value to assign to readCategorySet.
        Since:
        jcms-5.5.0
      • getDelegateMemberSet

        public java.util.TreeSet<Member> getDelegateMemberSet()
        Gets the Members allowed to login as this member using delegation.
        Returns:
        a TreeSet of Member. never return null
        Since:
        jcms-5.7.0
      • getDelegateMemberSet

        public java.util.TreeSet<Member> getDelegateMemberSet​(boolean queryDB)
        Internal method used to guarantee proper access to both JStore Member and JcmsDB DBMember set in the delegated members set.
        Parameters:
        queryDB - true to include any DBMember that may have been set in delegated member, false to retrieve only JStore members
        Returns:
        a TreeSet of Member. never return null
        Since:
        jcms-10.0.3 / JCMS-7349
      • setDelegateMemberSet

        public void setDelegateMemberSet​(java.util.TreeSet<Member> memberSet)
        Set which members are authorized to delegate to this member.
        Parameters:
        memberSet - A Set of member which are granted delegation right to this member.
        Since:
        jcms-5.7.0
      • getDelegateMemberSetDBID

        public java.util.HashSet<java.lang.String> getDelegateMemberSetDBID()
        Internal method used to guarantee proper storage of DBMember set delegated members.
        Returns:
        an HashSet containing id of DBMember which have been set as delegated members. may return null
        Since:
        jcms-10.0.3 / JCMS-7349
      • setDelegateMemberSetDBID

        public void setDelegateMemberSetDBID​(java.util.HashSet<java.lang.String> idSet)
        Internal method used to guarantee proper storage of DBMember set delegated members.
        Parameters:
        idSet - an HashSet containing id of DBMember which have been set as delegated members.
        Since:
        jcms-10.0.3 / JCMS-7349
      • updateDelegationHolderSet

        public void updateDelegationHolderSet​(Member mbr,
                                              boolean add)
        Internal method used to update the (transient) delegation holder set.
        Parameters:
        mbr - the member to add or remove from the delegation holder set.
        add - true -> add, false -> remove
      • getDelegationHolderSet

        public java.util.Set<Member> getDelegationHolderSet()
        Retrieves the list of member into which this member has been allowed to log in.

        Warning : If some Member have been excluded from delegation using property "auth-mgr.delegation.excluded-mbr-ids" or if a Member has been converted as a contact since it was previously authorized, this list will not filter them !
        Use either DelegationAuthenticationHandler.getDelegationHolderSet(Member) to retrieve a filtered set,
        or DelegationAuthenticationHandler.canDelegateTo(Member, Member, HttpServletRequest) if you want to perform the control yourself.

        This method can be used safely with DBMember (since jcms-10.0.3 / JCMS-7349).

        Returns:
        a TreeSet of Member (internal variable exposed, do not modify the returned set)
      • 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)
      • 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
      • getEncodedAlertRules

        public java.lang.String getEncodedAlertRules()
        Returns the JSON encoded alert rule set.
        Returns:
        the JSON encoded alert rule set.
        Since:
        jcms-8.0.0
      • setEncodedAlertRules

        public void setEncodedAlertRules​(java.lang.String encodedAlertRules)
        Sets the JSON encoded alert rule set.
        Parameters:
        encodedAlertRules - the JSON encoded alert rule set.
        Since:
        jcms-8.0.0
      • getAlertRuleSet

        public java.util.Set<AlertRule> getAlertRuleSet()
        Returns the alert rule set.
        Returns:
        the alert rule set.
        Since:
        jcms-8.0.0
      • setAlertRuleSet

        public void setAlertRuleSet​(java.util.Set<AlertRule> alertRuleSet)
        Set the alert rule set.
        Parameters:
        alertRuleSet - the alert rule set.
        Since:
        jcms-8.0.0
      • getAlertRuleSet

        public java.util.Set<AlertRule> getAlertRuleSet​(boolean useDefault)
        Returns the alert rule set.
        Parameters:
        useDefault - if true and this member has no alert rule set returns the default alert rule set.
        Returns:
        the alert rule set.
        Since:
        jcms-10.0.0
      • getAlertList

        public java.util.List<Alert> getAlertList()
        Returns the alert list for this member.
        Returns:
        the alert list for this member.
        Since:
        jcms-8.0.0
      • getAlertList

        public java.util.List<Alert> getAlertList​(Alert.Level level,
                                                  java.lang.Boolean read)
        Returns the alert list for this member.
        Parameters:
        level - the alert level. Null means any level.
        read - true for read alerts, false for not read alerts, null for read or not read alerts.
        Returns:
        the alert list for this member.
        Since:
        jcms-8.0.0
      • getLangSalutation

        public java.lang.String getLangSalutation​(java.lang.String lang)
        Return the salutation in the given language
        Parameters:
        lang - the language
        Returns:
        the String bound to the member's salutation
        Since:
        jcms-4.0
      • getLanguage

        public java.lang.String getLanguage()
        Retrieve the language of this Member.
        Returns:
        an ISO-639 language code (eg fr), with an optional script indication (eg zh-Hant)
        Since:
        jcms-4.0
      • setLanguage

        public void setLanguage​(java.lang.String languageKey)
        Set the language of this Member.

        The language is the ISO-639-1 language code (eg fr, de) mut it may include an optional script indication (eg zh-Hant).

        Valid value (which is enforced) can be found in jcms.prop by looking at properties prefixed with lang. string, it must be a language currently configured on the site, otherwise the default site language will be used.

        Parameters:
        languageKey - language key to use for this language.
        Since:
        jcms-4.0
        See Also:
        I18nUtil.getValidLanguageKey(String)
      • getCountry

        public java.lang.String getCountry()
        Retrieves the country of this member.
        Returns:
        an ISO 3166 country code as used by java Locale
        Since:
        jcms-7.1
      • setCountry

        public void setCountry​(java.lang.String countryCode)
        Set the country of this member.
        Parameters:
        countryCode - an ISO 3166 country code as used by java Locale
        Since:
        jcms-7.1
      • canCreateWorkCopy

        public boolean canCreateWorkCopy​(Publication pub)
        Convenience method
        Parameters:
        pub - used to create work copy
        Returns:
        true if the publication can be used
        Since:
        jcms-4.0
        See Also:
        Publication.canCreateWorkCopy(Member)
      • canMergeWorkCopy

        public boolean canMergeWorkCopy​(Publication pub)
        Convenience method
        Parameters:
        pub - The publication to merge.
        Returns:
        boolean true if publication can be merged
        Since:
        jcms-4.0
        See Also:
        Publication.canMergeWorkCopy(Member)
      • getWorkspaceSet

        public java.util.Set<Workspace> getWorkspaceSet()
        Returns:
        a Set of all Workspace the member belongs to.
        Since:
        jcms-4.1
      • refreshWorkspaceSet

        public void refreshWorkspaceSet()
        Refresh the workspaces this member belongs to.
        Since:
        jcms-5.6.2
      • updateWorkspaceSet

        public void updateWorkspaceSet​(Workspace ws,
                                       boolean add)
        Update workspaceSet index
        Parameters:
        ws - the workspace to be added or removed
        add - add if true, remove if false
        Since:
        jcms-5.0.1
      • belongsToWorkspace

        public boolean belongsToWorkspace​(Workspace ws)
        This convenient method returns true if this member belongs to the given workspace.
        Parameters:
        ws - the workspace to be checked
        Returns:
        true if this member belongs to this workspace
        Since:
        jcms-4.1
      • getWorkspacePublicationSet

        public java.util.Set<Publication> getWorkspacePublicationSet()
      • belongsToRole

        public WKRole belongsToRole()
        Returns:
        the first WKRole the member belongs to
        Since:
        jcms-4.1
      • belongsToRole

        public WKRole belongsToRole​(boolean checkGroups)
        Parameters:
        checkGroups - check also for member groups
        Returns:
        the first WKRole the member belongs to
        Since:
        jcms-4.1
      • belongsToRole

        public boolean belongsToRole​(WKRole role)
        Parameters:
        role - a WKRole
        Returns:
        true if member belongs to the WKRole
        Since:
        jcms-4.1
      • belongsToRole

        public boolean belongsToRole​(WKRole role,
                                     boolean checkGroups)
        Parameters:
        role - a WKRole
        checkGroups - check also for member groups
        Returns:
        true if member belongs to the WKRole
        Since:
        jcms-4.1
      • getAdministratedWorkspaceSet

        public java.util.SortedSet<Workspace> getAdministratedWorkspaceSet()
        This convenient method returns all the workspace this member is the administrator of.
        Returns:
        a set of workspace.
        Since:
        jcms-5.5.0
      • isWorkAdmin

        public boolean isWorkAdmin()
        This convenient method check if this member is administrator of at least one workspace.
        Returns:
        true if this member is administrator of at least one workspace.
        Since:
        jcms-4.1
      • getFavoriteWorkspace

        public Workspace getFavoriteWorkspace​(Workspace currentWS,
                                              java.lang.Class<?> clazz)
        Return the favorite Member Workspace where it can work on
        Parameters:
        currentWS - the current Workspace
        clazz - the class to publish
        Returns:
        the workspace to use
      • getTeamPortal

        public PortalInterface getTeamPortal()
        Returns the team portal for this member.
        Returns:
        the team portal for this member.
        Since:
        jcms-10.0.0
      • isEmailValid

        public boolean isEmailValid​(boolean checkDisable)
        Check if the email of this member is not empty (does not check email format validity).
        Parameters:
        checkDisable - check if the account is disabled (set to true to consider disabled member as invalid emails)
        Returns:
        true if this member has set an email
        Since:
        jcms-6.0.2
        See Also:
        MailUtil.checkEmail(String)
      • getFullEmail

        public java.lang.String getFullEmail()
        Return the full email address of this Member.

        Composed of both fullname (firstname+lastname) and email address in the form "FirstName Name <user@company.com>"

        Return a properly formatted address (RFC 822 syntax) of Unicode characters.

        Important : this value is NOT suitable for presentation to the end user in HTML interface, is is meant to be used in MailMessage from value.

        Returns:
        Unicode address string
        Since:
        jcms-5.0.0
      • getFriendlyName

        public java.lang.String getFriendlyName()
        Return the name of this member nicely formated for a communication purpose (email, newsletter, welcome)
        Returns:
        String the Friendly Name
        Since:
        jcms-5.0.0
      • getSignupConfirmationUrl

        public java.lang.String getSignupConfirmationUrl​(java.lang.String password)
        Build an URL for SignUp validation using password and other secret data.
        Parameters:
        password - the password
        Returns:
        String representing confirmation url
        Since:
        jcms-5.0.3
      • alertSignup

        public boolean alertSignup​(java.lang.String password,
                                   boolean signupValidationRequired,
                                   boolean sendPassword)
        - Send mails to signup administrators - Send validation mail or confirmation mail
        Parameters:
        password - the password
        signupValidationRequired - true if the signup validation is required
        sendPassword - if true the password will be sent
        Returns:
        boolean true if alert has been done
      • hasPhoto

        public boolean hasPhoto()
        Returns true if this member has got a photo.
        Returns:
        true if this member has got a photo.
        Since:
        jcms-5.7.0
      • canUploadPhoto

        public boolean canUploadPhoto()
        Returns true if this member can upload a photo.
        Returns:
        true if this member can upload a photo.
        Since:
        jcms-5.7.0
      • canSendMail

        public boolean canSendMail​(Workspace workspace)
        Checks if Member can send Email to the given Workspace.
        Parameters:
        workspace - the Workspace to send Email.
        Returns:
        true if
        • site incoming mail is enabled,
        • ws is not closed nor model,
        • ws incoming mail setup is valid,
        • and member have Publication rights for mail archiving
        Since:
        jcms-9.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 Member or empty String if not specified.
        Since:
        jcms-5.1
        See Also:
        getFullName(), Data.getDataName(String)
      • getDataImage

        public java.lang.String getDataImage()
        Description copied from class: Data
        Retrieves the image path of this data in the channel's main language.

        This method can (should) be implemented by subclasses to provide an image/illustration of this Data.
        Default behaviour is to return empty string.

        Overrides:
        getDataImage in class Data
        Returns:
        a path relative to the webapp root.
      • getDataImage

        public java.lang.String getDataImage​(java.lang.String lang,
                                             boolean useDefault)
        Description copied from class: Data
        Retrieves the image path of this data.

        This method can (should) be implemented by subclasses to provide an image/illustration of this Data.
        Default behaviour is to return empty string.

        Overrides:
        getDataImage in class Data
        Parameters:
        lang - the user language (ISO-639 language code)
        useDefault - should the default language be used if no value is found for the specified language
        Returns:
        a path relative to the webapp root.
      • getLastName

        public java.lang.String getLastName()
        Gets the last name of this member.

        This method simply invoke getName() which does exactly the same thing.

        Returns:
        the member's last name or null if the last name has not been set.
        Since:
        jcms-6.1
      • setLastName

        public void setLastName​(java.lang.String lastName)
        Sets the last name of this member.

        This method simply invoke setName(String) which does exactly the same thing.

        Parameters:
        lastName - the last name to use for this member.
        Since:
        jcms-6.1
      • getName

        public java.lang.String getName()
        Gets the name of this member.
        Returns:
        the member's name or null if the name has not been set.
      • setName

        public void setName​(java.lang.String name)
        Set the name of this member.
        Parameters:
        name - the name to use.
      • getFirstName

        public java.lang.String getFirstName()
        Gets the first name of this member.
        Returns:
        the member's first name or null if the first name has not been set.
        Since:
        jcms-4.0
      • setFirstName

        public void setFirstName​(java.lang.String firstName)
        Set the first name of this member.
        Parameters:
        firstName - the first name to use.
        Since:
        jcms-4.0
      • isAdmin

        public boolean isAdmin()
        Checks if this member is an administrator of the site.
        Returns:
        true if this member is and administrator, false otherwise.
      • setAdmin

        public void setAdmin​(boolean isAdmin)
        Sets if this member can administrate the site.
        Parameters:
        isAdmin - true if this member is and administrator, false otherwise.
      • getSalutation

        public java.lang.String getSalutation()
        Gets the salutation of this member as an internal non localized token.
        The salutation is usually one those values :
        • "mr"
        • "mrs"
        • "miss"
        You can then append this value to the language property "ui.com.lbl.salut." to retrieve the salutation in a localized form.
        Returns:
        the member's salutation or null if the salutation has not been set.
        Since:
        jcms-4.0
      • setSalutation

        public void setSalutation​(java.lang.String salutation)
        Set the salutation of this member.
        Parameters:
        salutation - the salutation token to use, usually one those values
        • "mr"
        • "mrs"
        • "miss"
        Even these are the usual string used for the salutation, you can use any other value, as long as you provide the corresponding I18N language property "ui.com.lbl.salut.{value}"
        Since:
        jcms-4.0
      • getOrganization

        public java.lang.String getOrganization()
        Gets the organization of this member.
        Returns:
        the organization of this member.
        Since:
        jcms-6.1.0
      • setOrganization

        public void setOrganization​(java.lang.String organization)
        Set the organization of this member.
        Parameters:
        organization - the organization to use.
        Since:
        jcms-6.1.0
      • getDepartment

        public java.lang.String getDepartment()
        Gets the department of this member.
        Returns:
        the department of this member.
        Since:
        jcms-7.0.0
      • setDepartment

        public void setDepartment​(java.lang.String department)
        Set the department of this member.
        Parameters:
        department - the department to use for this Member.
        Since:
        jcms-7.0.0
      • getOrganizationAndDepartment

        public java.lang.String getOrganizationAndDepartment()
        A convenient method which returns the organization and the department.
        Returns:
        the organization and the department.
        Since:
        jcms-7.0.0
      • getJobTitle

        public java.lang.String getJobTitle()
        Gets the job title of this member.
        Returns:
        the job title of this member.
        Since:
        jcms-4.0
      • setJobTitle

        public void setJobTitle​(java.lang.String jobTitle)
        Set the job title of this member.
        Parameters:
        jobTitle - the job title to use.
        Since:
        jcms-4.0
      • getPhone

        public java.lang.String getPhone()
        Gets the phone number of this member.
        Returns:
        the member's phone number or null if the phone number has not been set.
        Since:
        jcms-4.0
      • setPhone

        public void setPhone​(java.lang.String phone)
        Set the phone number of this member.
        Parameters:
        phone - the phone number to use.
        Since:
        jcms-4.0
      • getMobile

        public java.lang.String getMobile()
        Gets the mobile phone number of this member.
        Returns:
        the member's mobile phone number or null if the mobile phone number has not been set.
        Since:
        jcms-4.0
      • setMobile

        public void setMobile​(java.lang.String mobile)
        Set the mobile phone number of this member.
        Parameters:
        mobile - the mobile phone number to use.
        Since:
        jcms-4.0
      • getStreet

        public java.lang.String getStreet()
        Retrieve the street address of this Member.

        Example: "58, rue Pottier"

        Returns:
        site information from a postal address (i.e., the street name, place, avenue, and the house number).
        Since:
        jcms-9.0.0
      • setStreet

        public void setStreet​(java.lang.String street)
        Set the street address of this Member.

        Example: "58, rue Pottier"

        Parameters:
        street - the site information from a postal address (i.e., the street name, place, avenue, and the house number).
        Since:
        jcms-9.0.0
      • getPostalCode

        public java.lang.String getPostalCode()
        Retrieve the address postal code of this Member.

        Example: "78150", to identify Le Chesnay in France.

        Returns:
        code used by Postal Service to identify postal service zone.
        Since:
        jcms-9.0.0
      • setPostalCode

        public void setPostalCode​(java.lang.String postalCode)
        Set the address postal code of this Member.

        Example: "78150", to identify Le Chesnay in France.

        Parameters:
        postalCode - code used by Postal Service to identify postal service zone.
        Since:
        jcms-9.0.0
      • getPoBox

        public java.lang.String getPoBox()
        Retrieve the address postal office box of this Member.

        Example: "BP 90 123".

        Returns:
        postal box identifier that a Postal Service uses when a customer arranges to receive mail at a box on the premises of the Postal Service
        Since:
        jcms-9.0.0
      • setPoBox

        public void setPoBox​(java.lang.String postOfficeBox)
        Set the address postal office box of this Member.

        Example: "BP 90 123".

        Parameters:
        postOfficeBox - postal box identifier that a Postal Service uses when a customer arranges to receive mail at a box on the premises of the Postal Service
        Since:
        jcms-9.0.0
      • getRegion

        public java.lang.String getRegion()
        Retrieve the address region of this Member.

        Example: "Ile de France"

        Returns:
        full name of state or province
        Since:
        jcms-9.0.0
      • setRegion

        public void setRegion​(java.lang.String region)
        Set the address region of this Member.

        Example: "Ile de France"

        Parameters:
        region - full name of state or province
        Since:
        jcms-9.0.0
      • getLocality

        public java.lang.String getLocality()
        Retrieve the address locality of this Member.

        Example: "Le Chesnay"

        Returns:
        name of a locality or place, such as a city, county, or other geographic region
        Since:
        jcms-9.0.0
      • setLocality

        public void setLocality​(java.lang.String locality)
        Set the address locality of this Member.

        Example: "Le Chesnay"

        Parameters:
        locality - name of a locality or place, such as a city, county, or other geographic region
        Since:
        jcms-9.0.0
      • getAddress

        public java.lang.String getAddress()
        Gets the address of this member (street address, postal code, city, country and all).
        Returns:
        the member's address or null if the address has not been set.
        Since:
        jcms-4.0
      • hasAnyAddress

        public boolean hasAnyAddress()
        Checks if current member has any address
        Returns:
        true if current Member has any address (old format and new format)
        Since:
        jcms-9.0
        See Also:
        hasStructuredAddress(), getAddress()
      • getEmail

        public java.lang.String getEmail()
        Gets the email address of this member.
        Returns:
        the member's email addres or null if the email address has not been set.
      • setEmail

        public void setEmail​(java.lang.String email)
        Set the email address of this member.
        Parameters:
        email - the email address to use.
      • getInfo

        public java.lang.String getInfo()
        Gets informations available for this member.
        Returns:
        the member's information or null if the information has not been set.
      • setInfo

        public void setInfo​(java.lang.String info)
        Set some informations available for this member.
        Parameters:
        info - the informations to use.
      • getPhoto

        public java.lang.String getPhoto()
        Returns the member's photo.
        Returns:
        the member's photo.
        Since:
        jcms-5.7.0
      • setPhoto

        public void setPhoto​(java.lang.String photo)
        Set the member's photo.
        Parameters:
        photo - the member's photo
        Since:
        jcms-5.7.0
      • getLogin

        public java.lang.String getLogin()
        Gets the login of this member.
        Returns:
        the member's login or null if the login has not been set (which should never happen).
      • setLogin

        public void setLogin​(java.lang.String login)
        Set the login of this member.
        Parameters:
        login - the login to use, can be any string (id, email, ...), as long as it is kept unique over all members.
      • getPassword

        public java.lang.String getPassword()
        Gets the (hashed) password of this member as defined by setter.

        The original clear text is never stored, see setPassword(String) for more information.

        Returns:
        the member's password or null if the password has not been set.
      • setPassword

        public void setPassword​(java.lang.String password)
        Set the (hashed) password of this member.

        The password value specified must be crypted using method Channel.crypt(String)

         mbr.setPassword(channel.crypt("abc42def"));
         
        Parameters:
        password - a hashed version of the password to use
      • getRightFromClassMap

        public java.util.HashMap<java.lang.String,​DataRight> getRightFromClassMap()
        Get the value of rightFromClassMap.
        Returns:
        Value of rightFromClassMap.
      • setRightFromClassMap

        public void setRightFromClassMap​(java.util.HashMap<java.lang.String,​DataRight> v)
        Set the value of rightFromClassMap.
        Parameters:
        v - Value to assign to rightFromClassMap.
      • getPublicationSet

        public java.util.Set<Publication> getPublicationSet()
        Retrieve a Set containing all the Publication of which this member is the author.
        Returns:
        a Set of Publication, never return null.
      • updatePublicationSet

        public void updatePublicationSet​(Publication pub,
                                         boolean add)
        Update publicationSet index
        Parameters:
        pub - the publication to be added or removed
        add - add if true, remove if false
        Since:
        jcms-5.0.1
      • getContentSet

        public java.util.Set<Content> getContentSet()
        Get the value of contentSet.
        Returns:
        Value of contentSet.
        Since:
        jcms-4.0
      • updateContentSet

        public void updateContentSet​(Content content,
                                     boolean add)
        Update contentSet index
        Parameters:
        content - the content to be added or removed
        add - add if true, remove if false
        Since:
        jcms-5.0.1
      • getNameComparator

        public static java.util.Comparator<Member> getNameComparator()
      • getFirstNameComparator

        public static java.util.Comparator<Member> getFirstNameComparator()
      • getLoginComparator

        public static java.util.Comparator<Member> getLoginComparator()
      • getGroupComparator

        public static java.util.Comparator<Member> getGroupComparator​(java.util.Comparator<Group> groupComparator)
      • getPublicationCountComparator

        public static java.util.Comparator<Member> getPublicationCountComparator()
      • getRightComparator

        public static java.util.Comparator<Member> getRightComparator()
      • getLdapComparator

        public static java.util.Comparator<Member> getLdapComparator()
      • getLastLdapSyncComparator

        public static java.util.Comparator<Member> getLastLdapSyncComparator()
      • getLangComparator

        public static java.util.Comparator<Member> getLangComparator()
      • getWebdavComparator

        public static java.util.Comparator<Member> getWebdavComparator()
      • getSessionComparator

        public static java.util.Comparator<Member> getSessionComparator()
      • getLastLoginDateComparator

        public static java.util.Comparator<Member> getLastLoginDateComparator()
      • checkIntegrity

        public ControllerStatus checkIntegrity​(java.util.Map context)
        Checks whether or not data integrity constraints are respected.
        Overrides:
        checkIntegrity in class Data
        Parameters:
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
        Since:
        jcms-6.1
      • 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
      • internalCheckMember

        protected ControllerStatus internalCheckMember​(int op,
                                                       Member mbr,
                                                       java.util.Map context)
      • checkCreate

        public ControllerStatus checkCreate​(Member mbr,
                                            java.util.Map context)
        Description copied from class: Data
        Checks if the creation can be performed
        Overrides:
        checkCreate 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
      • 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.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
      • checkMemberGroupModification

        public static ControllerStatus checkMemberGroupModification​(Member opAuthor,
                                                                    Group modifiedGroup,
                                                                    Member modifiedMember,
                                                                    boolean checkParentGroup)
        Check if the specified Member (opAuthor) is authorized to add or remove a member to the specified group to this member.

        Important explanation regarding this method :

        • This method is public due to technical limitation for existing packages of JCMS, but it MUST ONLY BE USED by internal JCMS code.
        • This method DOES NOT check that the operation on a member would be authorized, this complete verification must go through other checkUpdate method
        • It exists to prevent code duplication
        Parameters:
        opAuthor - the Member performing the modification
        modifiedGroup - the group to which the modifiedMember is added or removed
        modifiedMember - the member which is added or removed from the modifiedGroup
        checkParentGroup - set to true to check parent groups of the specified group, if they did not already belong to the specified member
        Returns:
        a ControllerStatus indicating the result, never return null
        Since:
        jcms-7.0.4 jcms-7.1.1
      • performBeforeWrite

        protected void performBeforeWrite​(int op,
                                          Member mbr,
                                          java.util.Map context)
        Description copied from class: Data
        Called to perform some action before the write.
        Overrides:
        performBeforeWrite 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)
      • performUpdate

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

        public java.util.concurrent.CompletableFuture<java.lang.Void> performDeleteAsync​(Member opAuthor,
                                                                                         java.util.Map<java.lang.String,​?> contextMap)
        Request asynchronously deletion of this member, if async delete is enabled.

        When asynchronous deletion is enabled, deletion is requested and queued, method returns immediately with a CompletableFuture to monitor delete operation.

        When asynchronous deletion is disabled, a synchronous delete will be performed. In such case an already completed CompletableFuture is returned when delete has been performed.

        Parameters:
        opAuthor - the member which requests the write operation
        contextMap - a map which contains context parameters (may be null)
        Since:
        10.0.7 / JCMS-9292
        See Also:
        MemberDeleteManager.isAsyncDeleteEnabled()
      • performDelete

        public void performDelete​(Member mbr,
                                  java.util.Map context)
        Performs 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
      • removeMemberAttendeeCalendarEvent

        protected void removeMemberAttendeeCalendarEvent​(Member mbr,
                                                         java.util.Map context)
        Find all the CalendarEventInterface in which the member attends, and remove the member from those events, called on delete of member (this).
        Parameters:
        mbr - the member which requests the operation
        context - a map which contains context parameters (may be null)
      • deleteMemberData

        protected void deleteMemberData​(Member mbr,
                                        java.util.Map context)
      • reassignMemberPubs

        protected void reassignMemberPubs​(Member mbr,
                                          java.util.Map context)
        JStore publications (Content and Portlet types) are reassigned.
        Since JCMS-8509, DBPublication (Content only) are reassigned too.
        Parameters:
        mbr - the opAuthor to use on each JStore update operation
        context - the performUpdate context
      • handleDeleteMemberUserContent

        protected void handleDeleteMemberUserContent​(java.lang.String mbrId)
      • deleteMemberUserContent

        protected static void deleteMemberUserContent​(java.lang.String mbrId)
      • updateRights

        protected void updateRights​(Member mbr,
                                    java.util.Map context)
        Clears the references of current Member in category, and publication authorizedMemberSet, updateMemberSet. Should only be called after Member deletion.
        Parameters:
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)
      • getMemberFromLogin

        public static Member getMemberFromLogin​(java.lang.String login,
                                                boolean checkDisabled)
        Returns the member with the given login.
        Parameters:
        login - the member's login
        checkDisabled - if true, return null if accound is disabled
        Returns:
        the member or null if no active member has this login.
        Since:
        jcms-5.0.1
      • refreshLoginIndex

        public static void refreshLoginIndex()
        Refresh login index.
        Since:
        jcms-5.0.3
      • indexLogin

        public static void indexLogin​(Member mbr)
        Index the login of the given member.
        Parameters:
        mbr - the member to be registered
        Since:
        jcms-5.0.1
      • unindexLogin

        public static void unindexLogin​(Member mbr)
        Unindex the login of the given member.
        Parameters:
        mbr - the member to be unregistered
        Since:
        jcms-5.0.1
      • getLocale

        public java.util.Locale getLocale()
        Retrieve the Locale of this member.
        Returns:
        a Locale object initialized with this Member language and country
        Since:
        jcms-5.7
      • setLocale

        public void setLocale​(java.util.Locale locale)
      • getZoneId

        public java.time.ZoneId getZoneId()
        Retrieve the ZoneId of this member.

        Always returns a valid ZoneId object when TimeZone is enabled for site (see channel.timezone.enabled: property).

        Returns:
        a ZoneId object, never return null when TimeZone is enabled (default to channel default ZoneId if Member had no zone defined), always return null when TimeZone is disabled.
        Since:
        jcms-10.0.1 / JCMS-4865
      • setZoneId

        public void setZoneId​(java.time.ZoneId zoneId)
        Set the ZoneId of this member.
        Parameters:
        zoneId - the zoneId to set
        Since:
        jcms-10.0.1 / JCMS-4865
      • buildPhotoFilename

        public java.lang.String buildPhotoFilename​(java.lang.String ext)
        Returns the photo filename for this member.
        Parameters:
        ext - the file extension (eg. "gif", "jpg" or "png");
        Returns:
        the photo filename for this member
        Since:
        jcms-5.7.0
      • getMemberFromPhoto

        public static Member getMemberFromPhoto​(java.lang.String photoPath)
        Retrieve the Member using the specified photo in its profile.

        Implementation detail : Member is resolved by looking for the photo file name which is expected to contains the Member id.
        This method does not verify the Member is still using this photo.

        Parameters:
        photoPath - a path relative to the webapp root, such as upload/photos/2018-01/mbr_c_42.jpg
        Returns:
        a Member instance or null if Member could not be retrieved from photo path
        Since:
        jcms-10.0.1 / JCMS-4784
        See Also:
        buildPhotoFilename(String)
      • removeAllPhotos

        public void removeAllPhotos​(boolean removePhoto)
        Removes all photo and thumbnail files for this member.
        Parameters:
        removePhoto - if true the file of the photo will be deleted.
        Since:
        jcms-5.7.0
      • getLastLoginDateSet

        public java.util.SortedSet<java.util.Date> getLastLoginDateSet()
        Retrieve the last login Date of this Member.
        Returns:
        a Set of Date, return an empty set if this user has never been logged, (never return null).
        Since:
        jcms-6.0.1
      • getLastLoginDate

        public java.util.Date getLastLoginDate()
        Retrieves the last login Date of this Member.
        Returns:
        a Date (GMT) or null if this user has never been logged in.
        Since:
        jcms-6.0.0
      • setLastLoginDate

        public final void setLastLoginDate​(java.util.Date date)
        Sets the last login Date of this Member.
        Parameters:
        date - the last login date, or null to use now.
        Since:
        jcms-6.0.0
      • internalSetLastLoginDate

        protected void internalSetLastLoginDate​(java.util.Date date)
        Performs the persistance of the new last login date.
        Parameters:
        date - the date
        Since:
        jcms-6.1.3
      • exportXmlRelated

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

        public java.util.Date getIndexingDate()
        Retrieve the Date at which this Member was indexed in its search engine.
        Returns:
        a Date or null if was not indexed.
        Since:
        jcms-6.1.0
      • getFollowedPublicationList

        public java.util.List<Publication> getFollowedPublicationList()
        Returns the list of publications followed by this member.
        Returns:
        the list of publications followed by this member.
        Since:
        jcms-7.0.0
      • checkAccess

        public boolean checkAccess​(java.lang.String resource,
                                   java.util.Map<java.lang.String,​java.lang.Object> context)
        Check if this member is authorized to access the specified resource.
        Parameters:
        resource - a resource URI using a path representation, eg "admin/dev/store-cleaner"
        context - an optional context map containing relevant information such as workspace
        Returns:
        true if the access is authorized, false otherwise
        Since:
        jcms-7.0.0
        See Also:
        AccessControlManager.checkAccess(Member, String, Map)
      • checkAccessIfAclExists

        public boolean checkAccessIfAclExists​(java.lang.String resource,
                                              java.util.Map<java.lang.String,​java.lang.Object> context)
        Check if this member is authorized to access the specified resource IF AND ONLY IF resource has been configured.

        This method ONLY performs the ACL check when the specified resource has been configured on at least one AccessControlList, if resource has not been specified explicitely in any AccessControlList, access is AUTHORIZED..

        DO NOT use this method for any security related resource that MUST be enforced by an implicit or explicit assignement of the ACL resource to a user. In such case, use checkAccess(String, Map).

        Parameters:
        resource - a resource URI using a path representation, eg "admin/dev/store-cleaner"
        context - an optional context map containing relevant information such as workspace or data
        Returns:
        true if the access is authorized, false otherwise
        Since:
        jcms-10.0.7
      • hasAcl

        public boolean hasAcl()
        Check if this member belongs to at least one group with an Access Control List
        Returns:
        true if this member benefit from at least one ACL, false otherwise
        Since:
        jcms-7.0.0
        See Also:
        Group.getAccessControlList()
      • getBelongsToWorkspaceSelector

        public static DataSelector getBelongsToWorkspaceSelector​(Workspace ws)
        DataSelector which select a Member which belongs to a workspace (directly)
        Parameters:
        ws - the workspace
        Returns:
        true if the Data is a Member and belongs to the workspace
      • canRequestUnlock

        public boolean canRequestUnlock​(Data data)
        Returns true if this member can request unlock for the given data.
        Parameters:
        data - the data
        Returns:
        true if this member can request unlock for the given data.
        Since:
        jcms-9.0.0
      • canUnlock

        public boolean canUnlock​(Data data)
        Returns true if this member can unlock the given data.
        Parameters:
        data - the data
        Returns:
        true if this member can unlock the given data.
        Since:
        jcms-9.0.0
      • canExportMembers

        public boolean canExportMembers​(Workspace ws,
                                        Group grp)
        Check if this member is authorized to export (eg in CSV) the members matching specified criteria.
        Parameters:
        ws - workspace of members to export, set to null to check export right for members of all workspace
        grp - group of members to export, set to null to check export right for members of all groups
        Returns:
        true if member can export, false otherwise
        Since:
        JCMS-4425 / JCMS-5342
      • canExportGroups

        public boolean canExportGroups​(Workspace ws)
        Check if this member is authorized to export (eg in CSV) the groups matching specified criteria.
        Parameters:
        ws - workspace of groups to export, set to null to check export right for groups of all workspace
        Returns:
        true if member can export, false otherwise
        Since:
        JCMS-4425 / JCMS-5342
      • getAssistant

        public Member getAssistant()
        Returns the assistant of this Member. 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 Member.
        Since:
        jcms-10.0.6 / JCMS-8978
        See Also:
        getAssistant(boolean)
      • getAssistant

        public Member getAssistant​(boolean queryDB)
        Returns the assistant of this Member. 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 Member
        Since:
        jcms-10.0.6 / JCMS-8978
      • setAssistant

        public void setAssistant​(Member v)
        Sets the assistant of this Member.
        Parameters:
        v - the assistant
        Since:
        jcms-10.0.6 / JCMS-8978
      • getAssistantDBID

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

        public void setAssistantDBID​(java.lang.String v)
        Sets the assistantDBID of this Member.
        Parameters:
        v - the assistantDBID
        Since:
        jcms-10.0.6 / JCMS-8978
      • isAssistedBy

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

        public Member getDeclaredManager()
        Returns the declared manager of this member. 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 declared manager of this member.
        Since:
        jcms-10.0.0
        See Also:
        getDeclaredManager(boolean)
      • getDeclaredManagerId

        public java.lang.String getDeclaredManagerId()
        Retrieve the id of the declared manager, without loading it in DB if it as DBMember
        Returns:
        the id of the declaredManager Member (JStore or DBMember), if any.
        Since:
        jcms-10.0.7 / JCMS-9477
      • getDeclaredManager

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

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

        public java.lang.String getDeclaredManagerDBID()
        Returns a JCMS ID of the declared 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 declaredManagerDBID of this member.
        Parameters:
        v - the declaredManagerDBID
        Since:
        jcms-10.0.0
      • getManager

        public Member getManager()
        Returns the manager of this member.
        Returns:
        the manager of this member.
      • getManager

        public Member getManager​(DataSelector dataSelector)
        Find first manager of this member matching the given dataSelector (if not null).
        Parameters:
        dataSelector - DataSelector add restrictions
        Returns:
        first manager of this member matching the given dataSelector.
      • isAManager

        public boolean isAManager()
        Check if this member is a manager of at least one Member or group.

        Implementation detail : this method is named isAManager and not isManager to prevent conflict semantic with existing getManager()

        Returns:
        true if this member is manager of at least one Member or group.
        Since:
        jcms-10.0.7 / JCMS-9477
      • isManagerOf

        public boolean isManagerOf​(Group group)
        Returns true if this member is manager of the given group.
        Parameters:
        group - the group.
        Returns:
        true if this member is manager of the given group.
      • getManagedMemberSet

        public java.util.Set<Member> getManagedMemberSet()
        Returns the set of member managed by this member.
        Returns:
        the set of member managed by this member.
      • getManagedMemberSet

        public java.util.Set<Member> getManagedMemberSet​(boolean supportDBMember)
        Returns the set of member managed by this member.
        Parameters:
        supportDBMember - set to true to include DBMember, false to skip them.
        Returns:
        the set of member managed by this member.
        Since:
        jcms-10.0.7 / JCMS-9477
      • getOrganizationGroupSet

        public java.util.Set<Group> getOrganizationGroupSet()
        Returns the set of groups of the organization the given member belongs to.
        Returns:
        the set of groups of the organization the given member belongs to.
      • getPreference

        public java.lang.String getPreference​(java.lang.String key)
        Returns the given preference for the this member
        Parameters:
        key - the key of the preference
        Returns:
        the given preference for this member
        Since:
        jcms-10.0.0
      • getPreference

        public java.lang.String getPreference​(java.lang.String key,
                                              boolean useDefault)
        Returns the given preference for the this member
        Parameters:
        key - the key of the preference
        useDefault - if true and there is no preference fo this member, search for a default preference
        Returns:
        the given preference for this member
        Since:
        jcms-10.0.0
      • savePreference

        public void savePreference​(java.lang.String key,
                                   java.lang.String value)
        Save the preference (key/value) for this member.
        Parameters:
        key - the key of the preference
        value - the value of the preference
        Since:
        jcms-10.0.0
      • canBeReadBy

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

        This method is the implementation of Data read right control for Member.
        Current implementation grants read access to anyone.

        Overrides:
        canBeReadBy in class Data
        Parameters:
        member - the member requesting a read 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 Member, false otherwise
        Since:
        jcms-10.0.1 / JCMS-4784
      • updateDisplayLinkCss

        public java.lang.StringBuilder updateDisplayLinkCss​(java.lang.StringBuilder builder)
        Description copied from class: Data
        Returns a StringBuilder which contains css, whom you can modify or replace in your subclasses
        Overrides:
        updateDisplayLinkCss in class Data
        Parameters:
        builder - the StringBuilder
        Returns:
        a StringBuilder which contains css of display link
      • getInitials

        public java.lang.String getInitials()
        Returns member's initials based on its name and firstname.
        Returns:
        member's initials
        Since:
        jcms-10.0.4 JCMS-6025
      • getInitialsColor

        public java.lang.String getInitialsColor()
        Returns an hexadecimal color code based on Member metaDatas.
        Returns:
        a color hex hexadecimal code
        Since:
        jcms-10.0.4 JCMS-6025