Class Member
- java.lang.Object
-
- com.jalios.jstore.BasicStorable
-
- com.jalios.jcms.Data
-
- com.jalios.jcms.Member
-
- All Implemented Interfaces:
EditableData
,JcmsConstants
,ImportConstants
,MashupConstants
,Storable
,JaliosConstants
,LangPropertyArgument
,java.lang.Cloneable
,java.lang.Comparable<BasicStorable>
- Direct Known Subclasses:
DBMember
public class Member extends Data implements EditableData
AMember
object contains a set of information about a JCMS referenced user.- Version:
- $Revision: 136120 $
- Author:
- Olivier Dedieu, Olivier Jaquemet
- See Also:
Group
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Member.AccountSelector
Select a subset of members with the Account usage.static class
Member.AdministratorSelector
Select a subset of administrator membersstatic class
Member.AllAuthenticationSelector
Select member supporting all authentication (enabled account, with a valid local password).static class
Member.BelongsToWorkspaceOrChildSelector
static class
Member.ContactSelector
Select a subset of members with the Contact usage.static class
Member.DisabledSelector
Select a subset of members which are account and disabled.static class
Member.EnabledSelector
Select a subset of members which are account and not disabled.static class
Member.ExternalAuthenticationSelector
Select member with external authentication only (enabled account, without a valid local password).static class
Member.FirstNameComparator<T extends Member>
static class
Member.GroupComparator<T extends Member>
static class
Member.GroupSelector
Select a subset of members which belong to a given groupstatic class
Member.GuestSelector
Select a subset of members which are guests.static class
Member.LangComparator<T extends Member>
static class
Member.LastLdapSyncComparator<T extends Member>
static class
Member.LastLoginDateComparator<T extends Member>
Compare member based on their last login datestatic class
Member.LdapAccountComparator<T extends Member>
static class
Member.LoginComparator<T extends Member>
static class
Member.NameComparator<T extends Member>
static class
Member.NotificationPeriodSelector
static class
Member.PublicationCountComparator<T extends Member>
static class
Member.RightComparator<T extends Member>
static class
Member.SessionComparator<T extends Member>
static class
Member.TextSelector
Select a set of members matching the given text in the name or in the email.static class
Member.UsageSelector
Select a subset of members matching the specified Usage.static class
Member.ValidEmailSelector
static class
Member.WebdavComparator<T extends Member>
static class
Member.WorkerSelector
Select a subset of worker members-
Nested classes/interfaces inherited from class com.jalios.jcms.Data
Data.AuthorComparator<T extends Data>, Data.AuthorizedSelector, Data.AuthorSelector, Data.CdateSelector, Data.DataNameComparator<T extends Data>, Data.DeletableSelector, Data.ImportSelector, Data.MdateSelector, Data.OpAuthorComparator<T extends Data>, Data.RowIdComparator<T extends Data>, Data.StrongLockSelector
-
Nested classes/interfaces inherited from class com.jalios.jstore.BasicStorable
BasicStorable.CdateComparator<T extends Storable>, BasicStorable.IdComparator<T extends Storable>, BasicStorable.MdateComparator<T extends Storable>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
address
protected java.util.Set<AlertRule>
alertRuleSet
protected Member
assistant
protected java.lang.String
assistantDBID
static java.lang.String
ASYNC_DELETE
Name of context map attribute that can be specified when invokingperformDelete(Member, Map)
to explicitely request either an synchronous delete, with valueBoolean.FALSE
, or else an asynchronous delete, with valueBoolean.TRUE
If context map attribute is not specified, the default behavior can be configured with propertymember.async-delete.enabled: true
protected boolean
canEditCategories
protected boolean
canManageContentStaled
protected boolean
canPublishContent
protected boolean
canUpdateDeleteContent
protected java.lang.String
country
static java.lang.String
CTX_SKIP_ACTIVITY
static 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 checkIntegritystatic 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 checkIntegrityprotected Group[]
declaredGroups
protected Member
declaredManager
protected java.lang.String
declaredManagerDBID
protected java.util.Set<java.lang.String>
delegateMbrIdSet
protected boolean
delegateMbrIdSetInit
protected java.util.TreeSet<Member>
delegateMemberSet
protected java.util.HashSet<java.lang.String>
delegateMemberSetDBID
protected java.lang.String
department
static 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.static java.lang.String
DO_NOT_REASSIGN_PUBLICATION
When a member is deleted his publications are reassigned to the workspace admin or the default admin.protected java.lang.String
email
protected java.lang.String
encodedAlertRules
static java.lang.String
EXTERNAL_PASSWORD
Specify this value as parameter ofsetPassword(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).static java.lang.String
EXTRADBDATA_LAST_LOGIN_TIME
Deprecated.since JCMS-6281, last login time are store in dedicated tablestatic java.lang.String
FEATURE_CADDY_ACL
protected java.lang.String
firstName
protected java.lang.String
fullEmail
protected java.lang.String
fullName
protected Group[]
groups
static java.lang.String
GUEST_GROUP_VID
The CollaborativeSpace's Guest Group virtual identifier property.static 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.protected java.lang.String
info
protected boolean
isAdmin
protected boolean
isEmailVisible
protected boolean
isWorkspaceSetUpToDate
protected java.lang.String
jobTitle
protected java.lang.String
language
protected java.util.Date
lastLdapSynchro
protected boolean
ldapSync
protected java.util.Locale
locale
protected java.lang.String
locality
protected java.lang.String
login
static int
MAX_LAST_LOGIN_DATE_HISTORY
Deprecated.since JCMS-6281.static int
MEMBER_STATUS_AWAY
static int
MEMBER_STATUS_DND
static int
MEMBER_STATUS_OFFLINE
static int
MEMBER_STATUS_ONLINE
protected java.lang.String
mobile
protected java.lang.String
name
protected Notification
notification
protected java.lang.String
organization
protected java.lang.String
password
protected java.lang.String
phone
protected java.lang.String
photo
protected java.lang.String
poBox
protected java.lang.String
postalCode
protected java.util.TreeSet<Category>
readCategorySet
protected java.lang.String
region
static java.lang.String
REVISION
protected java.util.HashMap<java.lang.String,DataRight>
rightFromClassMap
protected java.lang.String
salutation
protected java.lang.String
street
static int
UGC_COUNT_LIMIT_THREAD
protected int
usage
static int
USAGE_ACCOUNT
static int
USAGE_CONTACT
static int
USE_CATEGORY_GROUP_AND_MEMBER
static int
USE_CATEGORY_GROUP_ONLY
static int
USE_CATEGORY_MEMBER_ONLY
protected int
useCategoryMode
protected java.util.TreeSet<Category>
useCategorySet
protected boolean
webdavAccess
protected java.time.ZoneId
zoneId
-
Fields inherited from class com.jalios.jcms.Data
author, authorDBID, channel, DISPLAY_URL_EXTRA_INFO, extension, extraDataMap, extraDBDataMapToSaveOnOp, importMap, opAuthor, opDelegate, WRITE_IN_PROGRESS_EXTRA_INFO
-
Fields inherited from class com.jalios.jstore.BasicStorable
cdate, ddate, id, isStoreCache, mdate, store
-
Fields inherited from interface com.jalios.jcms.mashup.ImportConstants
IMPORT_ALARM_MGR, IMPORT_AUTHOR_PROP, IMPORT_CATEGORY_DEFAULT, IMPORT_DC_ATTR, IMPORT_DC_STEP, IMPORT_DIR, IMPORT_ENABLED, IMPORT_JDOM_ELEMENT, IMPORT_LOG_FILE, IMPORT_LOG_MAX, IMPORT_OPTIONS, IMPORT_OPTIONS_DC_CONTEXT, IMPORT_ROOT_PROP, IMPORT_SOURCE_FILE, IMPORT_SOURCE_PREFIX_PROP, IMPORT_SOURCES_DIR, IMPORT_STEP_CLEAN, IMPORT_STEP_IMPORT, IMPORT_STEP_UPDATE_REF, IMPORT_WS_PROP
-
Fields inherited from interface com.jalios.util.JaliosConstants
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
-
Fields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, AJAX_MODE_ATTR, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, CLASS_PROPERTY, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, COUNTRY_SPRITE, CS_TYPOLOGY_ROOT_CAT_VID, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DEFAULT_PHOTO_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, GLYPH_ICON_PREFIX, ICON_ARCHIVE, ICON_ICON_PREFIX, ICON_LOCK, ICON_LOCK_STRONG, ICON_PREFIX_PROP, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, IS_IN_FRONT_OFFICE, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JCMS_TOASTR_COLLECTION, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LANG_SPRITE, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_CREATE_STR, OP_DEEP_COPY, OP_DEEP_COPY_STR, OP_DEEP_DELETE, OP_DEEP_DELETE_STR, OP_DELETE, OP_DELETE_STR, OP_MERGE, OP_MERGE_STR, OP_UPDATE, OP_UPDATE_STR, ORGANIZATION_ROOT_GROUP_PROP, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_PROP_PREFIX, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_PROP_PREFIX, PHOTO_LARGE_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_PROP_PREFIX, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_PROP_PREFIX, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_PROP_PREFIX, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, RAW_CONTENT_ICON_PREFIX, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SECURITY_LOG_FILE, SESSION_AUTHORIZED_FILENAMES_SET, SPRITE_ICON_PREFIX, STATS_REPORT_DIR, STATUS_PROP, STORE_XML, SUCCESS_MSG, SVG_ICON_PREFIX, SVGINLINE_ICON_PREFIX, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, TTCARD_MEDIA_HEIGHT, TTCARD_MEDIA_WIDTH, TYPES_ICON_ALT_PROP, TYPES_ICON_SUFFIX_PROP, TYPES_ICON_TITLE_PROP, TYPES_PREFIX_PROP, TYPES_THUMB_SUFFIX_PROP, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, UPLOAD_PERMISSION_COUNT_PROP_PREFIX, UPLOAD_PERMISSION_SIZE_PROP_PREFIX, URL_REGEXP, VID_LOGGED_MEMBER, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
-
Fields inherited from interface com.jalios.jcms.mashup.MashupConstants
DATA_TAG, DATASET_TAG, FIELD_CLASS, FIELD_ENTRY, FIELD_ITEM, FIELD_KEY, FIELD_NAME, FIELD_TAG, FIELD_VALUE, FILE_FIELD, FILE_ID, FILE_MTIME, FILE_SIZE, FILE_TAG, FILE_TICKET, FILESET_TAG, RELATED_TAG
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addGroup(Group group)
Add this member to a given group (this changes is not saved)boolean
alertSignup(java.lang.String password, boolean signupValidationRequired, boolean sendPassword)
- Send mails to signup administrators - Send validation mail or confirmation mailboolean
belongsToGroup(Group group)
This convenient method returns true if this member belongs to a given group.boolean
belongsToGroup(Group[] grps)
This convenient method returns true if this member belongs to at least one of the given groups.WKRole
belongsToRole()
WKRole
belongsToRole(boolean checkGroups)
boolean
belongsToRole(WKRole role)
boolean
belongsToRole(WKRole role, boolean checkGroups)
boolean
belongsToWorkspace(Workspace ws)
This convenient method returns true if this member belongs to the given workspace.java.lang.String
buildPhotoFilename(java.lang.String ext)
Returns the photo filename for this member.boolean
canArchive(Publication pub)
Check if the member is in a role that can archive the given publication.boolean
canBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo)
Checks if the specified member is authorized to read this Member.boolean
canCreateContact()
Check if this member can create a new contactboolean
canCreateWorkCopy(Publication pub)
Convenience methodboolean
canCreateWorkspace()
Check if the member can create a workspaceboolean
canCreateWorkspace(Workspace model)
Check if the member can duplicate the model to create a workspaceboolean
canDeleteOther(Data data)
boolean
canDeleteOther(Data data, RightInfo rightInfo)
boolean
canDeleteOther(java.lang.Class<?> clazz)
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.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.boolean
canEditCategories()
Check if the member can edit categories.boolean
canEditCategories(Workspace ws)
Return true if this member can edit at least one category of this workspaceboolean
canExportGroups(Workspace ws)
Check if this member is authorized to export (eg in CSV) the groups matching specified criteria.boolean
canExportMembers(Workspace ws, Group grp)
Check if this member is authorized to export (eg in CSV) the members matching specified criteria.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)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)boolean
canMergeWorkCopy(Publication pub)
Convenience methodboolean
canPublish(Data data)
Convenient methodboolean
canPublish(java.lang.Class<?> clazz)
Check if this member can publish the specified class of publication in at least one of his workspaces.boolean
canPublish(java.lang.Class<?> clazz, Workspace ws)
Check if this member can publish the specified class of publication in the specified workspace.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.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.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.boolean
canPublishAll(java.lang.Class<?> clazz)
Check if this member can publish on this class and all it's subclassboolean
canPublishContent()
Checks if if this member can publish something else than UGC.boolean
canPublishContent(Workspace ws)
Checks if if this member can publish something else than UGC.boolean
canPublishSome(java.lang.Class<?> clazz)
Check if this member can publish on this class or one of it's subclassboolean
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.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.boolean
canRead(Category cat, boolean searchInGroups, boolean searchInParent)
This convenient method checks if a member can read a categorie.boolean
canRead(Group grp)
This convenient method checks if this member can read a group.boolean
canRead(Publication pub, boolean searchInGroups)
This convenient method checks if a member can read a publication.boolean
canRequestUnlock(Data data)
Returns true if this member can request unlock for the given data.boolean
canSendMail(Workspace workspace)
Checks if Member can send Email to the given Workspace.boolean
canUnlock(Data data)
Returns true if this member can unlock the given data.boolean
canUpdateDeleteContent()
boolean
canUpdateDeleteContent(Workspace ws)
Check if member can perform Update or Delete for the gicen Workspaceboolean
canUpdateOther(Data data)
boolean
canUpdateOther(Data data, RightInfo rightInfo)
boolean
canUpdateOther(java.lang.Class<?> clazz)
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.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.boolean
canUploadPhoto()
Returns true if this member can upload a photo.boolean
canUseCaddy()
boolean
canUseCategory(Category cat)
Check if this member can use the given category.boolean
canUseCategory(Category cat, boolean searchInGroups, boolean searchInParent)
Check if this member can use the given category.boolean
canUseDescendantCategories(Category cat, boolean checkRoot)
Check if this member can use at least one descendant of the given category.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).boolean
canWorkOn(Publication pub, RightInfo rightInfo)
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.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.ControllerStatus
checkCreate(Member mbr, java.util.Map context)
Checks if the creation can be performedControllerStatus
checkDelete(Member mbr, java.util.Map context)
Checks if the deletion can be performedControllerStatus
checkIntegrity(java.util.Map context)
Checks whether or not data integrity constraints are respected.boolean
checkManagerInRole(Publication pub)
Check if this Member is an authorized manager actor in the current workflow state of the specified publication.ControllerStatus
checkMember(int op, Member mbr, java.util.Map context)
Checks if the given member can perform the given operation.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.ControllerStatus
checkWrite(int op, Member mbr, boolean checkIntegrity, java.util.Map context)
Checks if the given write operation can be performedprotected void
cleanHybridCollections()
This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.protected void
deleteMemberData(Member mbr, java.util.Map context)
protected static void
deleteMemberUserContent(java.lang.String mbrId)
void
disable()
Disable this account.void
exportXmlField(java.lang.StringBuffer sb, int indentLevel)
Fills the given StringBuffer with Xml export of fields of this data.protected void
exportXmlRelated(java.lang.StringBuffer sb, java.lang.String related, int indentLevel)
void
fillExportXmlFieldAttributes(java.lang.StringBuffer sb)
Fill the given string buffer with specific attributes of this data.java.lang.String
getAddress()
Gets the address of this member (street address, postal code, city, country and all).java.util.SortedSet<Workspace>
getAdministratedWorkspaceSet()
This convenient method returns all the workspace this member is the administrator of.java.util.List<Alert>
getAlertList()
Returns the alert list for this member.java.util.List<Alert>
getAlertList(Alert.Level level, java.lang.Boolean read)
Returns the alert list for this member.java.util.Set<AlertRule>
getAlertRuleSet()
Returns the alert rule set.java.util.Set<AlertRule>
getAlertRuleSet(boolean useDefault)
Returns the alert rule set.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)Member
getAssistant()
Returns the assistant of this Member.Member
getAssistant(boolean queryDB)
Returns the assistant of this Member.java.lang.String
getAssistantDBID()
Returns a JCMS ID of the assistant if it is persisted in the DB.static DataSelector
getBelongsToWorkspaceSelector(Workspace ws)
DataSelector which select aMember
which belongs to a workspace (directly)java.util.Set<Category>
getCategoryRootSet()
Returns the set of category roots the member can manage.java.util.Set<Category>
getCategoryRootSet(Workspace ws)
Returns the set of category roots the member can manage in a given workspace.static java.util.Comparator
getComparator(java.lang.String str, boolean reverse)
Deprecated.java.util.Set<Content>
getContentSet()
Get the value of contentSet.int
getCookieMaxAge()
Return the lowerest cookieMaxAge value of the groups the member belongs to.java.lang.String
getCountry()
Retrieves the country of this member.static java.lang.String
getCSVHeader(java.lang.String lang)
Returns the CSV header of this objectjava.lang.String
getDataIcon()
Returns source information for the icon associated to this Data, either a relative path or sprite classes name.java.lang.String
getDataIconHtml(java.lang.String userLang)
Returns the HTML code of the icon for this data in the specified language.java.lang.String
getDataImage()
Retrieves the image path of this data in the channel's main language.java.lang.String
getDataImage(java.lang.String lang, boolean useDefault)
Retrieves the image path of this data.java.lang.String
getDataName(java.lang.String language)
Return the name of this Data, every sub class Data which will be displayed to user should implements this method already.Group[]
getDeclaredGroups()
Get the value of declaredGroups.java.util.Set<Group>
getDeclaredGroupSet()
Get the value of declaredGroups ordered by name.java.util.Set<Group>
getDeclaredGroupSet(java.util.Comparator<Group> comp)
Get the value of declaredGroups ordered by given comparator.Member
getDeclaredManager()
Returns the declared manager of this member.Member
getDeclaredManager(boolean queryDB)
Returns the declared manager of this member.java.lang.String
getDeclaredManagerDBID()
Returns a JCMS ID of the declared manager if it is persisted in the DB.java.lang.String
getDeclaredManagerId()
Retrieve the id of the declared manager, without loading it in DB if it as DBMemberjava.util.TreeSet<Member>
getDelegateMemberSet()
Gets the Members allowed to login as this member using delegation.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.java.util.HashSet<java.lang.String>
getDelegateMemberSetDBID()
Internal method used to guarantee proper storage of DBMember set delegated members.java.util.Set<Member>
getDelegationHolderSet()
Retrieves the list of member into which this member has been allowed to log in.java.lang.String
getDepartment()
Gets the department of this member.int
getEditCategoryMode()
java.lang.String
getEmail()
Gets the email address of this member.java.lang.String
getEncodedAlertRules()
Returns the JSON encoded alert rule set.java.util.TreeSet<Category>
getExpandedUseCategorySet()
Return the category set this member can use according his category use mode (group, member or group and member).Workspace
getFavoriteWorkspace(Workspace currentWS, java.lang.Class<?> clazz)
Return the favorite Member Workspace where it can work onjava.lang.Object
getFieldValue(java.lang.String fieldName, java.lang.String lang, boolean useDefault)
Gets theObject
value of the given field name for thisMember
.java.lang.String
getFirstName()
Gets the first name of this member.static java.util.Comparator<Member>
getFirstNameComparator()
java.util.List<Publication>
getFollowedPublicationList()
Returns the list of publications followed by this member.java.lang.String
getFriendlyName()
Return the name of this member nicely formated for a communication purpose (email, newsletter, welcome)java.lang.String
getFullEmail()
Return the full email address of this Member.java.lang.String
getFullName()
static java.util.Comparator<Member>
getGroupComparator(java.util.Comparator<Group> groupComparator)
Group[]
getGroups()
Returns all the groups this member belongs to.java.util.Set<Group>
getGroupSet(Workspace ws)
Returns the groups of the given workspace the member belongs to.java.lang.String
getHtmlIcon(Workspace ws, java.lang.String userLang)
Return the img tag for the iconjava.lang.String
getHtmlIcon(java.lang.String userLang)
Return the img tag for the iconjava.lang.String
getIcon()
java.lang.String
getIcon(Workspace ws)
protected java.lang.String[]
getIconParameter(Workspace ws, java.lang.String userLang)
Return a String[2]: Title / Alt for the given parametersjava.util.Date
getIndexingDate()
Retrieve the Date at which this Member was indexed in its search engine.java.lang.String
getInfo()
Gets informations available for this member.java.lang.String
getInitials()
Returns member's initials based on its name and firstname.java.lang.String
getInitialsColor()
Returns an hexadecimal color code based on Member metaDatas.java.lang.String
getJobTitle()
Gets the job title of this member.static java.util.Comparator<Member>
getLangComparator()
java.lang.String
getLangSalutation(java.lang.String lang)
Return the salutation in the given languagejava.lang.String
getLanguage()
Retrieve the language of this Member.static java.util.Comparator<Member>
getLastLdapSyncComparator()
java.util.Date
getLastLdapSynchro()
Get the Date of the last LDAP synchronization of this member.java.util.Date
getLastLoginDate()
Retrieves the last login Date of this Member.static java.util.Comparator<Member>
getLastLoginDateComparator()
java.util.SortedSet<java.util.Date>
getLastLoginDateSet()
Retrieve the last login Date of this Member.java.lang.String
getLastName()
Gets the last name of this member.static java.util.Comparator<Member>
getLdapComparator()
boolean
getLdapSync()
java.util.Locale
getLocale()
Retrieve theLocale
of this member.java.lang.String
getLocality()
Retrieve the address locality of this Member.java.lang.String
getLogin()
Gets the login of this member.static java.util.Comparator<Member>
getLoginComparator()
java.util.Set<Member>
getManagedMemberSet()
Returns the set of member managed by this member.java.util.Set<Member>
getManagedMemberSet(boolean supportDBMember)
Returns the set of member managed by this member.Member
getManager()
Returns the manager of this member.Member
getManager(DataSelector dataSelector)
Find first manager of this member matching the given dataSelector (if not null).static Member
getMemberFromLogin(java.lang.String login, boolean checkDisabled)
Returns the member with the given login.static Member
getMemberFromPhoto(java.lang.String photoPath)
Retrieve the Member using the specified photo in its profile.java.lang.String
getMobile()
Gets the mobile phone number of this member.PhoneNumber
getMobilePhoneNumber()
Retrieve a PhoneNumber instance for this member mobile phone number.java.lang.String
getName()
Gets the name of this member.static java.util.Comparator<Member>
getNameComparator()
Notification
getNotification()
Get the Notificationjava.lang.String
getOrganization()
Gets the organization of this member.java.lang.String
getOrganizationAndDepartment()
A convenient method which returns the organization and the department.java.util.Set<Group>
getOrganizationGroupSet()
Returns the set of groups of the organization the given member belongs to.java.lang.String
getPassword()
Gets the (hashed) password of this member as defined by setter.java.lang.String
getPhone()
Gets the phone number of this member.PhoneNumber
getPhoneNumber()
Retrieve a PhoneNumber instance for this member phone number.java.lang.String
getPhoto()
Returns the member's photo.java.lang.String
getPoBox()
Retrieve the address postal office box of this Member.java.lang.String
getPostalCode()
Retrieve the address postal code of this Member.java.lang.String
getPreference(java.lang.String key)
Returns the given preference for the this memberjava.lang.String
getPreference(java.lang.String key, boolean useDefault)
Returns the given preference for the this memberstatic java.util.Comparator<Member>
getPublicationCountComparator()
java.util.Set<Publication>
getPublicationSet()
Retrieve a Set containing all the Publication of which this member is the author.java.util.TreeSet<Category>
getReadCategorySet()
Gets the TreeSet of Category used for Publication read right.java.lang.String
getRegion()
Retrieve the address region of this Member.DataRight
getRight(Data data)
DataRight
getRight(java.lang.Class<?> clazz, boolean searchInGroups)
Search for a Right object bound to clazz or one of its super class.DataRight
getRight(java.lang.Class<?> clazz, boolean searchInGroups, Workspace ws)
Search for a Right object bound to clazz or one class.static java.util.Comparator<Member>
getRightComparator()
java.util.HashMap<java.lang.String,DataRight>
getRightFromClassMap()
Get the value of rightFromClassMap.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.static java.util.Comparator<Member>
getSessionComparator()
java.lang.String
getSignupConfirmationUrl(java.lang.String password)
Build an URL for SignUp validation using password and other secret data.int
getStatus()
Return an interger Status of the Memberjava.lang.String
getStreet()
Retrieve the street address of this Member.PortalInterface
getTeamPortal()
Returns the team portal for this member.Data
getUpdateInstance()
Returns an instance of this object to update it.int
getUsage()
Get the value of usage.java.lang.String
getUsageName(java.lang.String lang)
Returns the name of the usage (eg: Account, Contact).int
getUseCategoryMode()
Get the value of useCategoryMode.java.util.TreeSet<Category>
getUseCategorySet()
Get the value of useCategorySet.boolean
getWebdavAccess()
Get the value of webdavAccessstatic java.util.Comparator<Member>
getWebdavComparator()
java.util.Set<Publication>
getWorkspacePublicationSet()
java.util.Set<Workspace>
getWorkspaceSet()
java.time.ZoneId
getZoneId()
Retrieve theZoneId
of this member.protected void
handleDeleteMemberUserContent(java.lang.String mbrId)
boolean
hasAcl()
Check if this member belongs to at least one group with an Access Control Listboolean
hasAnyAddress()
Checks if current member has any addressboolean
hasExplicitRights()
boolean
hasPhoto()
Returns true if this member has got a photo.boolean
hasRead(Publication pub)
Check if the given publication has been read by this memberboolean
hasStructuredAddress()
Checks if current member address uses the new structured address format.boolean
hasWebdavAccess()
This method check if member have a webdav access or belongs to a group having webdav access.static void
indexLogin(Member mbr)
Index the login of the given member.protected boolean
internalCanCreateWorkspace(Workspace model)
protected boolean
internalCanDeleteOther(Data data, RightInfo rightInfo)
protected boolean
internalCanManageCategory(Category cat, boolean searchInGroups, boolean searchInParent)
protected boolean
internalCanPublish(java.lang.Class<?> clazz, java.util.Set<? extends Workspace> workspaceSet)
protected boolean
internalCanUpdateDeleteOtherCommon(java.lang.Class<?> clazz, Workspace ws, boolean checkUpdate)
protected boolean
internalCanUpdateOther(Data data, RightInfo rightInfo)
protected boolean
internalCanUseCategory(Category cat, boolean searchInGroups, boolean searchInParent)
protected ControllerStatus
internalCheckMember(int op, Member mbr, java.util.Map context)
protected boolean
internalIsWorker()
protected boolean
internalIsWorker(Workspace ws)
protected void
internalSetLastLoginDate(java.util.Date date)
Performs the persistance of the new last login date.void
invalidateCanManageContent()
Invalidate the current status of canManageContent (the next time it will be called, it will be computed).boolean
isAccount()
Returns true if this Member's usage isUSAGE_ACCOUNT
.boolean
isAdmin()
Checks if this member is an administrator of the site.boolean
isAdmin(Workspace ws)
Returns true if this member is an administrator of the given workspaceboolean
isAllAuthentication()
Check if this Member support all authentication, including local password and external authentication.boolean
isAManager()
Check if this member is a manager of at least one Member or group.boolean
isAssistedBy(Member mbr)
Returns true if the given member is the assistant of this Member.boolean
isContact()
Returns true if this Member's usage isUSAGE_CONTACT
.boolean
isDeclaredGroup(Group group)
Returns true if the given group is a declared groups.boolean
isDisabled()
Check if this member account has been disabled.boolean
isEmailValid(boolean checkDisable)
Check if the email of this member is not empty (does not check email format validity).boolean
isEmailVisible()
Retrieves whether this member's email is visible to other members or not.boolean
isExternalAuthentication()
Check if this Member is an account whose authentication is not the local password.boolean
isGuest()
Check if this member belongs to the CollaborativeSpace's Guests Group.boolean
isLdapAccount()
Check if this member account has been created from LDAP or synchronized with LDAP.boolean
isManagerOf(Group group)
Returns true if this member is manager of the given group.boolean
isValidAccount()
boolean
isWorkAdmin()
This convenient method check if this member is administrator of at least one workspace.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()).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()).protected void
performBeforeWrite(int op, Member mbr, java.util.Map context)
Called to perform some action before the write.void
performDelete(Member mbr, java.util.Map context)
Performs deletionjava.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.void
performUpdate(Member mbr, java.util.Map context)
Performs updateprotected 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.void
refreshGroups()
Refresh the groups (force groups to be inferred from declared groups)static void
refreshLoginIndex()
Refresh login index.void
refreshWorkspaceSet()
Refresh the workspaces this member belongs to.void
removeAllPhotos(boolean removePhoto)
Removes all photo and thumbnail files for this member.void
removeGroup(Group group)
Remove this member from a given group(this changes is not saved)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).void
savePreference(java.lang.String key, java.lang.String value)
Save the preference (key/value) for this member.void
setAddress(java.lang.String address)
Deprecated.since jcms-9.0.0, use individual fieldsvoid
setAdmin(boolean isAdmin)
Sets if this member can administrate the site.void
setAlertRuleSet(java.util.Set<AlertRule> alertRuleSet)
Set the alert rule set.void
setAssistant(Member v)
Sets the assistant of this Member.void
setAssistantDBID(java.lang.String v)
Sets the assistantDBID of this Member.void
setCountry(java.lang.String countryCode)
Set the country of this member.void
setDeclaredGroups(Group[] v)
Set the value of declaredGroups.void
setDeclaredManager(Member v)
Sets the declared manager of this member.void
setDeclaredManagerDBID(java.lang.String v)
Sets the declaredManagerDBID of this member.void
setDelegateMemberSet(java.util.TreeSet<Member> memberSet)
Set which members are authorized to delegate to this member.void
setDelegateMemberSetDBID(java.util.HashSet<java.lang.String> idSet)
Internal method used to guarantee proper storage of DBMember set delegated members.void
setDepartment(java.lang.String department)
Set the department of this member.void
setEmail(java.lang.String email)
Set the email address of this member.void
setEmailVisible(boolean visible)
Sets whether this member's email is visible to other members or not.void
setEncodedAlertRules(java.lang.String encodedAlertRules)
Sets the JSON encoded alert rule set.void
setFieldValue(java.lang.String fieldName, java.lang.Object value, java.lang.String lang)
Sets the value of the givenObject
field name for the currentMember
.void
setFirstName(java.lang.String firstName)
Set the first name of this member.void
setInfo(java.lang.String info)
Set some informations available for this member.void
setJobTitle(java.lang.String jobTitle)
Set the job title of this member.void
setLanguage(java.lang.String languageKey)
Set the language of this Member.void
setLastLdapSynchro(java.util.Date lastSyncDate)
Set the Date of the last LDAP synchronization of this member.void
setLastLoginDate(java.util.Date date)
Sets the last login Date of this Member.void
setLastName(java.lang.String lastName)
Sets the last name of this member.void
setLdapSync(boolean ldapSync)
Set if this Member should be synchronized with ldap or not.void
setLocale(java.util.Locale locale)
void
setLocality(java.lang.String locality)
Set the address locality of this Member.void
setLogin(java.lang.String login)
Set the login of this member.void
setMobile(java.lang.String mobile)
Set the mobile phone number of this member.void
setName(java.lang.String name)
Set the name of this member.void
setNotification(Notification notification)
Sets the Notificationvoid
setOrganization(java.lang.String organization)
Set the organization of this member.void
setPassword(java.lang.String password)
Set the (hashed) password of this member.void
setPhone(java.lang.String phone)
Set the phone number of this member.void
setPhoto(java.lang.String photo)
Set the member's photo.void
setPoBox(java.lang.String postOfficeBox)
Set the address postal office box of this Member.void
setPostalCode(java.lang.String postalCode)
Set the address postal code of this Member.void
setReadCategorySet(java.util.TreeSet<Category> v)
Set the value of readCategorySet.void
setRegion(java.lang.String region)
Set the address region of this Member.void
setRightFromClassMap(java.util.HashMap<java.lang.String,DataRight> v)
Set the value of rightFromClassMap.void
setSalutation(java.lang.String salutation)
Set the salutation of this member.void
setStreet(java.lang.String street)
Set the street address of this Member.void
setUsage(int usage)
Set the value of usage (ie: Account or Contact).void
setUseCategoryMode(int v)
Set the value of useCategoryMode.void
setUseCategorySet(java.util.TreeSet<Category> v)
Set the value of useCategorySet.void
setWebdavAccess(boolean webdavAccess)
Set the value of webdavAccessvoid
setZoneId(java.time.ZoneId zoneId)
Set theZoneId
of this member.protected void
splitHybridCollections(Data previousData)
This method must be overrided by sub-classes that are persisted in JStore and that have hybrid collection/array.java.lang.String
toCSV(java.lang.String lang)
Returns a CSV view of this objectjava.lang.String
toFullString()
java.lang.String
toString()
static void
unindexLogin(Member mbr)
Unindex the login of the given member.void
updateContentSet(Content content, boolean add)
Update contentSet indexvoid
updateDelegationHolderSet(Member mbr, boolean add)
Internal method used to update the (transient) delegation holder set.java.lang.StringBuilder
updateDisplayLinkCss(java.lang.StringBuilder builder)
Returns a StringBuilder which contains css, whom you can modify or replace in your subclassesDataAttribute
updateDisplayLinkDataAttribute(DataAttribute dataAttribute)
Returns a DataAttribute which contains data attributes, whom you can modify or replace in your subclassesvoid
updatePublicationSet(Publication pub, boolean add)
Update publicationSet indexprotected void
updateRights(Member mbr, java.util.Map context)
Clears the references of current Member in category, and publication authorizedMemberSet, updateMemberSet.void
updateWorkspaceSet(Workspace ws, boolean add)
Update workspaceSet index-
Methods inherited from class com.jalios.jcms.Data
canBeReadBy, canBeUnlockedBy, canRequestUnlock, checkAndPerformCreate, checkAndPerformCreate, checkAndPerformDelete, checkAndPerformDelete, checkAndPerformUpdate, checkAndPerformUpdate, checkCreate, checkDelete, checkIntegrity, checkLockMember, checkStrongLockMember, checkStrongLockMember, checkUpdate, checkUpdate, cleanHybridCollection, cleanHybridCollection, cleanHybridCollection, clone, computeDBIDArray, computeDBIDList, computeDBIDSet, exportXml, exportXml, exportXml, exportXml, exportXmlRelated, getAllReferrerSet, getAllReferrerSet, getAllTypeFieldEntry, getAuthor, getAuthor, getAuthorComparator, getAuthorDBID, getAuthorId, getAuthorSelector, getBooleanFieldValue, getBooleanFieldValue, getCaddyComparator, getCategoryFieldValue, getCategoryFieldValue, getCdateSelector, getDataIconAlt, getDataIconCSS, getDataIconHtml, getDataIconTitle, getDataImage, getDataNameComparator, getDate, getDate, getDateSelector, getDeletableSelector, getDisplayLink, getDisplayLink, getDisplayLink, getDisplayLinkCss, getDisplayLinkDataAttribute, getDisplayLinkHtmlAttributes, getDisplayUrl, getDoubleFieldValue, getDoubleFieldValue, getExportXmlDataValue, getExtension, getExtraData, getExtraDataMap, getExtraDBData, getExtraDBDataMap, getExtraInfo, getExtraInfoMap, getFieldStatusMap, getFieldValue, getFieldValue, getFieldValue, getGenericThumbnail, getGenericThumbnail, getImportAuthor, getImportBatch, getImportDate, getImportDisplayUrl, getImportId, getImportMap, getImportMdate, getImportSelector, getImportSignature, getImportSource, getImportSourceUrl, getImportUrl, getIntFieldValue, getIntFieldValue, getLangPropertyValue, getLinkCount, getLinkIndexedDataSet, getLinkIndexedDataSet, getLockDate, getLockInfo, getLockMember, getLongFieldValue, getLongFieldValue, getMdateSelector, getNewDefaultExtraDataMap, getNewDefaultExtraDataMap, getNewDefaultExtraDataMap, getNewDefaultExtraDataMap, getNewDefaultExtraDBDataMap, getNewDefaultExtraDBDataMap, getNewDefaultExtraDBDataMap, getNewDefaultExtraDBDataMap, getOpAuthor, getOpAuthorComparator, getOpAuthorId, getOpDelegate, getReadAuthorizedSelector, getReferrerSet, getRowId, getRowIdComparator, getStrongLock, getStrongLockContext, getStrongLockContextData, getStrongLockDate, getStrongLockInfo, getStrongLockMember, getStrongLockSelector, getTypeEntry, getTypeFieldsEntries, getVirtualIDSet, importXml, importXmlFieldsWithReferences, importXmlFiles, importXmlReferences, initializeDBDataCollections, isDBData, isImported, isImportUpdated, isInDatabase, isLocked, isPersisted, isStrongLocked, lock, markNewImport, mergeHybridLink, mergeHybridLink, performAfterWrite, performCreate, performCreate, performDelete, performUpdate, prepareUpdateContext, printDataName, printDisplayLinkEnd, printDisplayLinkStart, printDisplayLinkStart, printDisplayUrl, printDisplayUrl, putStrongLock, putStrongLock, releaseStrongLock, releaseStrongLock, removeExtraData, removeExtraDBData, removeExtraInfo, setAuthor, setAuthorDBID, setAuthorId, setBooleanFieldValue, setCategoryFieldValue, setDoubleFieldValue, setExtension, setExtraData, setExtraDataMap, setExtraDBData, setExtraDBDataMap, setExtraDBDataMap, setExtraInfo, setFieldValue, setId, setImportAuthor, setImportBatch, setImportDate, setImportDisplayUrl, setImportId, setImportMap, setImportMdate, setImportSignature, setImportSource, setImportSourceUrl, setImportUpdated, setIntFieldValue, setLongFieldValue, setMdate, setOpAuthor, setOpAuthorId, setOpDelegate, setRowId, unlock, unlock, unmarkNewImport, updateDisplayLinkHtmlAttributes, updateExtraDataMap, updateExtraDBDataMap, updateIndexTreeSet
-
Methods inherited from class com.jalios.jstore.BasicStorable
clearId, compareTo, equals, getAttribute, getAttributes, getCdate, getCdateComparator, getDdate, getId, getIdComparator, getMdate, getMdateComparator, getStore, getUrid, hasBeenUpdated, hashCode, isStored, resetInternalCaches, resolveAtt, resolveVal, setAttributes, setAttributes, setCdate, setDdate, setStore, toXml
-
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
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
-
USAGE_ACCOUNT
public static final int USAGE_ACCOUNT
- See Also:
- Constant Field Values
-
USAGE_CONTACT
public static final int USAGE_CONTACT
- See Also:
- Constant Field Values
-
UGC_COUNT_LIMIT_THREAD
public static final int UGC_COUNT_LIMIT_THREAD
- 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 ofsetPassword(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
-
notification
protected Notification notification
-
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
-
MEMBER_STATUS_OFFLINE
public static final int MEMBER_STATUS_OFFLINE
- See Also:
- Constant Field Values
-
MEMBER_STATUS_ONLINE
public static final int MEMBER_STATUS_ONLINE
- See Also:
- Constant Field Values
-
MEMBER_STATUS_AWAY
public static final int MEMBER_STATUS_AWAY
- See Also:
- Constant Field Values
-
MEMBER_STATUS_DND
public static final int MEMBER_STATUS_DND
- See Also:
- Constant Field Values
-
ASYNC_DELETE
public static final java.lang.String ASYNC_DELETE
Name of context map attribute that can be specified when invokingperformDelete(Member, Map)
to explicitely request- either an synchronous delete, with value
Boolean.FALSE
, - or else an asynchronous delete, with value
Boolean.TRUE
member.async-delete.enabled: true
- Since:
- 10.0.7 / JCMS-9292
- See Also:
- Constant Field Values
- either an synchronous delete, with value
-
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 tableThe 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 classData
- 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 theObject
value of the given field name for thisMember
.- Overrides:
getFieldValue
in classData
- 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 givenPublication
.- 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 givenObject
field name for the currentMember
.
If the field is multilingual, the given language will be used.
Do not retrieveCategory
fields, see #getCategoryFieldValue(String, Member).- Overrides:
setFieldValue
in classData
- 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 givenData
.- Since:
- jcms-7.0.0
-
toFullString
public java.lang.String toFullString()
- Overrides:
toFullString
in classData
-
toCSV
public java.lang.String toCSV(java.lang.String lang)
Returns a CSV view of this object
-
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
-
fillExportXmlFieldAttributes
public void fillExportXmlFieldAttributes(java.lang.StringBuffer sb)
Fill the given string buffer with specific attributes of this data.- Overrides:
fillExportXmlFieldAttributes
in classData
- Parameters:
sb
- the StringBuffer- Since:
- jcms-5.7.1
- See Also:
Data.fillExportXmlFieldAttributes(StringBuffer)
-
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 classData
- Parameters:
sb
- the StringBufferindentLevel
- 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 classData
- Returns:
- a relative path (eg
images/jalios/icon/abstract.gif
) or sprite classes name (egss_sprite ss_date
). - See Also:
Data.getDataIconHtml(String)
- Either by specifying a relative image path :
-
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
-
getDataIconHtml
public java.lang.String getDataIconHtml(java.lang.String userLang)
Description copied from class:Data
Returns the HTML code of the icon for this data in the specified language.This method uses value returned by methods
Data.getDataIcon()
,Data.getDataIconAlt(String)
andData.getDataIconTitle(String)
to build an HTML IMG tag.- Overrides:
getDataIconHtml
in classData
- Parameters:
userLang
- the user language.- Returns:
- the HTML code of the icon for this data.
- See Also:
Data.getDataIcon()
,Data.getDataIconTitle(String)
,Data.getDataIconAlt(String)
-
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 WorkspaceuserLang
- 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 NulluserLang
- 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 categoriesearchInGroups
- 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 publicationsearchInGroups
- 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 checkedws
- 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 checkedws
- the workspace to be checkedcontextMap
- 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 (egArticle.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 (egArticle.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 (egArticle.class
,FileDocument.class
, ...)ws
- the Workspace in which to check publish rightcontextMap
- 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)
orData.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 (egArticle.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)
orData.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 (egArticle.class
,FileDocument.class
, ...)workspaceSet
- the set of workspace in which to check publish rightcontextMap
- 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 checkedws
- 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 checkedws
- the workspace to be checkedcontextMap
- 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)
-
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(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 checkedws
- 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 checkedws
- the workspace to be checkedcontextMap
- 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 forsearchInGroups
- 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 forsearchInGroups
- if true, the search will be continued in the groups rights if none member rights have been foundws
- 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
-
canWorkOn
public boolean canWorkOn(Publication pub, RightInfo rightInfo)
-
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.- disable an account by using method
disable()
, - enable an account by setting a valid password using method
setPassword(String)
.
- Returns:
- true if the account is disabeld
- Since:
- jcms-4.0
- disable an account by using method
-
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
-
getDeclaredGroups
public Group[] getDeclaredGroups()
Get the value of declaredGroups.- Returns:
- Value of declaredGroups.
- Since:
- jcms-5.6.0
- See Also:
getDeclaredGroupSet()
,getDeclaredGroupSet(Comparator)
-
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 testsearchInGroups
- 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.
- Parameters:
cat
- the category to checksearchInGroups
- 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 checkcheckRoot
- 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 fromUSAGE_ACCOUNT
orUSAGE_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
-
isAccount
public boolean isAccount()
Returns true if this Member's usage isUSAGE_ACCOUNT
.- Returns:
- true if
getUsage()
isUSAGE_ACCOUNT
, otherwise false.
-
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
-
isContact
public boolean isContact()
Returns true if this Member's usage isUSAGE_CONTACT
.- Returns:
- true if
getUsage()
isUSAGE_CONTACT
, otherwise false.
-
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 eitherDelegationAuthenticationHandler.getDelegationHolderSet(Member)
to retrieve a filtered set,
orDelegationAuthenticationHandler.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 classData
- 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 classData
-
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 (egzh-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 (egzh-Hant
).Valid value (which is enforced) can be found in
jcms.prop
by looking at properties prefixed withlang.
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 javaLocale
- 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 removedadd
- 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 WKRolecheckGroups
- 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 Workspaceclazz
- 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 passwordsignupValidationRequired
- true if the signup validation is requiredsendPassword
- 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.
Default behaviour is to return toFullString() of Data or empty string if toFullString is null.- Overrides:
getDataName
in classData
- 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 classData
- 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 classData
- 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"
"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"
"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
-
getPhoneNumber
public PhoneNumber getPhoneNumber()
Retrieve a PhoneNumber instance for this member phone number.- Returns:
- a PhoneNumber instance or null if phone number could not be parsed
- Since:
- jcms-9.0.0 - JCMS-3741
- See Also:
getPhone()
,PhoneNumberUtil.parseNumber(String, String)
-
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
-
getMobilePhoneNumber
public PhoneNumber getMobilePhoneNumber()
Retrieve a PhoneNumber instance for this member mobile phone number.- Returns:
- a PhoneNumber instance or null if phone number could not be parsed
- Since:
- jcms-9.0.0 - JCMS-3741
- See Also:
getMobile()
,PhoneNumberUtil.parseNumber(String, String)
-
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()
-
hasStructuredAddress
public boolean hasStructuredAddress()
Checks if current member address uses the new structured address format.- Returns:
true
if currentMember
uses the new structured address format- Since:
- jcms-9.0
- See Also:
getStreet()
,getLocality()
,getRegion()
,getPoBox()
,getPostalCode()
-
setAddress
public void setAddress(java.lang.String address)
Deprecated.since jcms-9.0.0, use individual fieldsSet the address of this member.- Parameters:
address
- the address (street address, postal code, city, country and all) to use.- Since:
- jcms-4.0
- See Also:
setStreet(String)
,setPostalCode(String)
,setPoBox(String)
,setRegion(String)
,setLocality(String)
,setCountry(String)
-
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 removedadd
- 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 removedadd
- 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()
-
getComparator
public static java.util.Comparator getComparator(java.lang.String str, boolean reverse)
Deprecated.Retrieves a newComparator
given a name representing it. The returned comparator can be used to sort anyCollection
containingMember
s.
You can specify any of the following value:"name"
:getNameComparator()
"login"
:getLoginComparator()
"group"
:getGroupComparator(Comparator)
"pubCount"
:getPublicationCountComparator()
"right"
:getRightComparator()
"ldap"
:getLdapComparator()
"lang"
:getLangComparator()
"session"
:getSessionComparator()
"webdav"
:getWebdavComparator()
"lastLdapSync"
:getLastLdapSyncComparator()
"lastLoginDate"
:getLastLoginDateComparator()
And also any of the value available throughData.getComparator(String, boolean)
- Parameters:
str
- a string representing the comparatorreverse
- a boolean indicating whether the comparator should have its behavior reversed (true
) or unchanged (false
)- Returns:
- a new instance of
Comparator
. - See Also:
Data.getComparator(String, boolean)
-
checkIntegrity
public ControllerStatus checkIntegrity(java.util.Map context)
Checks whether or not data integrity constraints are respected.- Overrides:
checkIntegrity
in classData
- 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 classData
- Parameters:
op
- the operation (OP_CREATE, OP_UPDATE, ...)mbr
- the member which requests the write operationcontext
- 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 classData
- Parameters:
mbr
- the member which requests the write operationcontext
- 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 classData
- Parameters:
op
- the operation (OP_CREATE, OP_UPDATE, ...)mbr
- the member which requests the write operationcheckIntegrity
- if true, requires the constraints integrity to be checkedcontext
- 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 classData
- Parameters:
mbr
- the member which requests the write operationcontext
- 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 modificationmodifiedGroup
- the group to which the modifiedMember is added or removedmodifiedMember
- the member which is added or removed from the modifiedGroupcheckParentGroup
- 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 classData
- Parameters:
op
- the operation (OP_CREATE, OP_UPDATE, ...)mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)
-
performUpdate
public void performUpdate(Member mbr, java.util.Map context)
Performs update- Overrides:
performUpdate
in classData
- Parameters:
mbr
- the member which requests the write operationcontext
- 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 operationcontextMap
- 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 classData
- Parameters:
mbr
- the member which requests the write operationcontext
- 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 operationcontext
- 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 operationcontext
- 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 operationcontext
- 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 logincheckDisabled
- 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 theLocale
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 theZoneId
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 theZoneId
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 asupload/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 classData
-
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 anyAccessControlList
, 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 aMember
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 workspacegrp
- 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 notisManager
to prevent conflict semantic with existinggetManager()
- 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 preferenceuseDefault
- 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 preferencevalue
- 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 classData
- 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
- aRightInfo
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 classData
- Parameters:
builder
- theStringBuilder
- Returns:
- a
StringBuilder
which contains css of display link
-
updateDisplayLinkDataAttribute
public DataAttribute updateDisplayLinkDataAttribute(DataAttribute dataAttribute)
Description copied from class:Data
Returns a DataAttribute which contains data attributes, whom you can modify or replace in your subclasses- Overrides:
updateDisplayLinkDataAttribute
in classData
- Parameters:
dataAttribute
- theDataAttribute
- Returns:
- a
DataAttribute
which contains data attributes 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
-
-