|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jstore.BasicStorable com.jalios.jcms.Data com.jalios.jcms.Member com.jalios.jcms.dbmember.DBMember
public class DBMember
Nested Class Summary | |
---|---|
static class |
DBMember.Fields
|
Nested classes/interfaces inherited from class com.jalios.jcms.Member |
---|
Member.AccountSelector, Member.AdministratorSelector, Member.ContactSelector, Member.DisabledSelector, Member.EnabledSelector, Member.GroupComparator<T extends Member>, Member.LangComparator<T extends Member>, Member.LastLdapSyncComparator<T extends Member>, Member.LastLoginDateComparator<T extends Member>, Member.LdapAccountComparator<T extends Member>, Member.LoginComparator<T extends Member>, Member.NameComparator<T extends Member>, Member.NotificationPeriodSelector, Member.PublicationCountComparator<T extends Member>, Member.RightComparator<T extends Member>, Member.SessionComparator<T extends Member>, Member.TextSelector, Member.UsageSelector, Member.ValidEmailSelector, Member.WebdavComparator<T extends Member>, Member.WorkerSelector |
Nested classes/interfaces inherited from class com.jalios.jcms.Data |
---|
Data.AuthorComparator<T extends Data>, 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 | |
---|---|
static String |
REVISION
|
Fields inherited from class com.jalios.jcms.Data |
---|
author, authorDBID, channel, DISPLAY_URL_EXTRA_INFO, extension, extraDataMap, extraDBDataMapToSaveOnOp, importMap, opAuthor, opDelegate |
Fields inherited from class com.jalios.jstore.BasicStorable |
---|
cdate, ddate, id, mdate, store |
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.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.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 |
Constructor Summary | |
---|---|
DBMember()
|
|
DBMember(Member other)
Constructor by copy : creates a new instance of DBMember from the specified Member. |
Method Summary | |
---|---|
boolean |
belongsToGroup(Group group)
This convenient method returns true if this member belongs to a given group. |
WKRole |
belongsToRole()
|
WKRole |
belongsToRole(boolean checkGroups)
|
boolean |
belongsToRole(WKRole role)
|
boolean |
belongsToRole(WKRole role,
boolean checkGroups)
|
boolean |
canCreateWorkCopy(Publication pub)
Convenience method |
boolean |
canCreateWorkspace()
Check if the member can create a workspace |
boolean |
canCreateWorkspace(Workspace model)
Check if the member can duplicate the model to create a 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 workspace |
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 method |
boolean |
canPublishContent(Workspace ws)
Checks if if this member can publish something else than UGC. |
Member |
convertToMember(Member opAuthor)
Converts this DBMember to a member. |
static void |
exportCSV(Collection<String> dbMemberIdColl,
String lang,
Writer writer)
Export a dataSet to CSV |
void |
exportXmlField(StringBuffer sb,
int indentLevel)
Fills the given StringBuffer with Xml export of fields of this data. |
SortedSet<Workspace> |
getAdministratedWorkspaceSet()
This convenient method returns all the workspace this member is the administrator of. |
Set<Category> |
getCategoryRootSet()
Returns the set of category roots the member can manage |
Set<Category> |
getCategoryRootSet(Workspace ws)
Returns the set of category roots the member can manage in a given workspace |
Set<Content> |
getContentSet()
Get the value of contentSet. |
String |
getCountry()
Retrieves the country of this member. |
static String |
getCSVHeader(String lang)
Returns the CSV header of this object |
TreeSet<Member> |
getDelegateMemberSet()
Gets the TreeSet of Member allowed to login as this member. |
Set<Member> |
getDelegationHolderSet()
Retrieves the list of member into which this member was allowed to log in. |
int |
getEditCategoryMode()
|
Boolean |
getEmailPublic()
Retrieves whether this member's email is visible to other members or not. |
String |
getGids()
Returns the Group ids to which this member belongs. |
protected String[] |
getIconParameter(Workspace ws,
String userLang)
Return a String[2]: Title / Alt for the given parameters |
String |
getInfo()
Gets informations available for this member. |
String |
getLanguage()
Get the value of language. |
Date |
getLastLdapSynchro()
Get the value of lastLdapSynchro. |
SortedSet<Date> |
getLastLoginDateSet()
Retrieve the last login Date of this Member. |
String |
getLastLoginTimes()
Retrieve a comma seperated list of last login time of this member. |
boolean |
getLdapSync()
|
static DBMember |
getMemberFromEmail(String email,
boolean checkDisabled)
Retrieve the DBMember having the specified email. |
static DBMember |
getMemberFromLogin(String login,
boolean checkDisabled)
Retrieve the DBMember having the specified login. |
Notification |
getNotification()
Get the Notification |
Set<Publication> |
getPublicationSet()
Retrieve a Set containing all the Publication of which this member is the author. |
TreeSet<Category> |
getReadCategorySet()
Gets the TreeSet of Category used for Publication read right. |
HashMap<String,DataRight> |
getRightFromClassMap()
Get the value of rightFromClassMap. |
Data |
getUpdateInstance()
Returns an instance of this object to update it. |
boolean |
getWebdavAccess()
Get the value of webdavAccess |
Set<Publication> |
getWorkspacePublicationSet()
|
Set<Workspace> |
getWorkspaceSet()
|
boolean |
hasExplicitRights()
|
boolean |
hasWebdavAccess()
This method check if member have a webdav access or belongs to a group having webdav access. |
protected boolean |
internalCanManageCategory(Category cat,
boolean searchInGroups,
boolean searchInParent)
|
protected boolean |
internalIsWorker()
|
protected void |
internalSetLastLoginDate(Date date)
Performs the persistance of the new last login date. |
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 workspace |
boolean |
isLdapAccount()
Check if this member account has been created from LDAP |
boolean |
isWorkAdmin()
This convenient method check if this member is administrator of at least one workspace. |
protected void |
reassignMemberPubs(Member mbr,
Map context)
|
void |
refreshGroups()
Refresh the groups (force groups to be inferred from declared groups) |
void |
refreshWorkspaceSet()
Refresh the workspaces this member belongs to. |
void |
setAddress(String address)
Set the address of this member. |
void |
setAdmin(boolean isAdmin)
Sets if this member can administrate the site. |
void |
setCountry(String countryCode)
Set the country of this member. |
void |
setDelegateMemberSet(TreeSet<Member> v)
Set the value of delegateMbrSet. |
void |
setDepartment(String department)
Set the department of this member. |
void |
setEmail(String email)
Set the email address of this member. |
void |
setEmailFormat(String emailFormat)
Set the email format that will be used to send mail to this member. |
void |
setEmailPublic(Boolean visible)
Sets whether this member's email is visible to other members or not. |
void |
setFirstName(String firstName)
Set the first name of this member. |
void |
setInfo(String info)
Set some informations available for this member. |
void |
setJobTitle(String jobTitle)
Set the job title of this member. |
void |
setLanguage(String lang)
Set the value of language. |
void |
setLastLdapSynchro(Date v)
Set the value of lastLdapSynchro. |
void |
setLastLoginTimes(String lastLoginTimes)
Set the comma seperated list of last login time of this member. |
void |
setLdapSync(boolean sync)
Set if this Member should be synchronized with ldap or not. |
void |
setLogin(String login)
Set the login of this member. |
void |
setMobile(String mobile)
Set the mobile phone number of this member. |
void |
setName(String name)
Set the name of this member. |
void |
setNotification(Notification notification)
Sets the Notification |
void |
setOrganization(String organization)
Set the organization of this member. |
void |
setPassword(String password)
Set the password of this member. |
void |
setPhone(String phone)
Set the phone number of this member. |
void |
setReadCategorySet(TreeSet<Category> v)
Set the value of readCategorySet. |
void |
setRightFromClassMap(HashMap<String,DataRight> v)
Set the value of rightFromClassMap. |
void |
setSalutation(String salutation)
Set the salutation of this member. |
void |
setUseCategoryMode(int v)
Set the value of useCategoryMode. |
void |
setUseCategorySet(TreeSet<Category> v)
Set the value of useCategorySet. |
void |
setWebdavAccess(boolean webdavAccess)
Set the value of webdavAccess |
String |
toCSV(String lang)
Returns a CSV view of this object |
String |
toFullString()
|
void |
updateContentSet(Content content,
boolean add)
Update contentSet index |
void |
updateDelegationHolderSet(Member mbr,
boolean add)
Internal method used to update the (transient) delegation holder set. |
void |
updatePublicationSet(Publication pub,
boolean add)
Update publicationSet index |
protected void |
updateRights(Member mbr,
Map context)
|
void |
updateWorkspaceSet(Workspace ws,
boolean add)
Update workspaceSet index |
Methods inherited from class com.jalios.jstore.BasicStorable |
---|
clearId, compareTo, equals, getAttribute, getAttributes, getCdate, getCdateComparator, getDdate, getId, getIdComparator, getMdate, getMdateComparator, getStore, getUrid, hasBeenUpdated, isStored, resolveAtt, resolveVal, setAttributes, setCdate, setDdate, setId, setStore, toXml |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jalios.jcms.db.DBData |
---|
getRowId, setRowId |
Field Detail |
---|
public static final String REVISION
Constructor Detail |
---|
public DBMember()
public DBMember(Member other)
Warning : Do not use this constructor to create
an update instance for a DBMember, instead use getUpdateInstance()
:
Member updated = (Member) member.getUpdateInstance(); update.performUpdate(...)
other
- the member to copy, must not be null.Method Detail |
---|
public Data getUpdateInstance()
Data
getUpdateInstance
in class Member
public String toFullString()
toFullString
in class Member
public String toCSV(String lang)
Member
toCSV
in class Member
lang
- the output language
public static String getCSVHeader(String lang)
lang
- the output language
public static void exportCSV(Collection<String> dbMemberIdColl, String lang, Writer writer)
dbMemberIdColl
- the set of DBMember's id to be exportedlang
- the languagewriter
- the writer where to print the exportpublic void exportXmlField(StringBuffer sb, int indentLevel)
Data
exportXmlField
in class Member
sb
- the StringBufferindentLevel
- the indent levelprotected String[] getIconParameter(Workspace ws, String userLang)
Member
getIconParameter
in class Member
ws
- the Workspace or NulluserLang
- the UserLang or null
protected boolean internalIsWorker()
internalIsWorker
in class Member
public boolean canPublishContent(Workspace ws)
Member
canPublishContent
in class Member
ws
- the Workspace to work on
public int getEditCategoryMode()
getEditCategoryMode
in class Member
public boolean isAdmin(Workspace ws)
Member
isAdmin
in class Member
ws
- the workspace to be checked
public boolean hasExplicitRights()
hasExplicitRights
in class Member
public boolean hasWebdavAccess()
Member
hasWebdavAccess
in class Member
public boolean isLdapAccount()
Member
isLdapAccount
in class Member
public Date getLastLdapSynchro()
Member
getLastLdapSynchro
in class Member
public void setLastLdapSynchro(Date v)
Member
setLastLdapSynchro
in class Member
v
- Value to assign to lastLdapSynchro.public boolean getLdapSync()
getLdapSync
in class Member
public void setLdapSync(boolean sync)
Member
setLdapSync
in class Member
sync
- true
if LDAP synchronization of this Member should
be performed if needed, false
otherwise.public boolean getWebdavAccess()
Member
getWebdavAccess
in class Member
public void setWebdavAccess(boolean webdavAccess)
Member
setWebdavAccess
in class Member
public Boolean getEmailPublic()
Member.isEmailVisible()
public void setEmailPublic(Boolean visible)
visible
- true if it is visible, false otherwiseMember.setEmailVisible(boolean)
public String getGids()
public boolean belongsToGroup(Group group)
Member
belongsToGroup
in class Member
group
- the group
public Notification getNotification()
Member
getNotification
in class Member
public void setNotification(Notification notification)
Member
setNotification
in class Member
notification
- the notificationpublic boolean canEditCategories()
Member
canEditCategories
in class Member
Member.getCategoryRootSet()
public boolean canEditCategories(Workspace ws)
Member
canEditCategories
in class Member
ws
- the Workspace to check with
Member.getCategoryRootSet()
public Set<Category> getCategoryRootSet()
Member
getCategoryRootSet
in class Member
public Set<Category> getCategoryRootSet(Workspace ws)
Member
getCategoryRootSet
in class Member
ws
- the Workspace to be test (null for all workspace)
public boolean canManageCategory(Category cat)
Member
canManageCategory
in class Member
cat
- the category to test
public boolean canManageCategory(Category cat, boolean searchInGroups, boolean searchInParent)
Member
canManageCategory
in class Member
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
protected boolean internalCanManageCategory(Category cat, boolean searchInGroups, boolean searchInParent)
internalCanManageCategory
in class Member
public boolean canCreateWorkspace()
Member
canCreateWorkspace
in class Member
public boolean canCreateWorkspace(Workspace model)
Member
canCreateWorkspace
in class Member
model
- the workspace to duplicate
public void setUseCategorySet(TreeSet<Category> v)
Member
setUseCategorySet
in class Member
v
- Value to assign to useCategorySet.public void setUseCategoryMode(int v)
Member
setUseCategoryMode
in class Member
v
- Value to assign to useCategoryMode.public TreeSet<Category> getReadCategorySet()
Member
getReadCategorySet
in class Member
public void setReadCategorySet(TreeSet<Category> v)
Member
setReadCategorySet
in class Member
v
- Value to assign to readCategorySet.public TreeSet<Member> getDelegateMemberSet()
Member
getDelegateMemberSet
in class Member
public void setDelegateMemberSet(TreeSet<Member> v)
Member
setDelegateMemberSet
in class Member
v
- Value to assign to delegateMbrSet.public void updateDelegationHolderSet(Member mbr, boolean add)
Member
updateDelegationHolderSet
in class Member
mbr
- the member to add or remove from the delegation holder set.add
- true -> add, false -> removepublic Set<Member> getDelegationHolderSet()
Member
Warning : If some Member have been excluded from delegation
using property "auth-mgr.delegation.excluded-mbr-ids", this list
will not filter them. Use DelegationAuthenticationHandler.filterExcludedMember(Set)
to retrieve a filtered list.
getDelegationHolderSet
in class Member
public String getLanguage()
Member
getLanguage
in class Member
public void setLanguage(String lang)
Member
setLanguage
in class Member
lang
- Value to assign to language.public String getCountry()
Member
getCountry
in class Member
Locale
public void setCountry(String countryCode)
Member
setCountry
in class Member
countryCode
- an ISO 3166 country code as used by java Locale
public boolean canCreateWorkCopy(Publication pub)
Member
canCreateWorkCopy
in class Member
pub
- used to create work copy
Publication.canCreateWorkCopy(Member)
public boolean canMergeWorkCopy(Publication pub)
Member
canMergeWorkCopy
in class Member
pub
- The publication to merge.
Publication.canMergeWorkCopy(Member)
public Set<Workspace> getWorkspaceSet()
getWorkspaceSet
in class Member
public void refreshWorkspaceSet()
Member
refreshWorkspaceSet
in class Member
public void updateWorkspaceSet(Workspace ws, boolean add)
Member
updateWorkspaceSet
in class Member
ws
- the workspace to be added or removedadd
- add if true, remove if falsepublic void refreshGroups()
Member
refreshGroups
in class Member
public Set<Publication> getWorkspacePublicationSet()
getWorkspacePublicationSet
in class Member
public WKRole belongsToRole()
belongsToRole
in class Member
public WKRole belongsToRole(boolean checkGroups)
belongsToRole
in class Member
checkGroups
- check also for member groups
public boolean belongsToRole(WKRole role)
belongsToRole
in class Member
role
- a WKRole
public boolean belongsToRole(WKRole role, boolean checkGroups)
belongsToRole
in class Member
role
- a WKRolecheckGroups
- check also for member groups
public SortedSet<Workspace> getAdministratedWorkspaceSet()
Member
getAdministratedWorkspaceSet
in class Member
public boolean isWorkAdmin()
Member
isWorkAdmin
in class Member
public void setName(String name)
Member
setName
in class Member
name
- the name to use.public void setFirstName(String firstName)
Member
setFirstName
in class Member
firstName
- the first name to use.public boolean isAdmin()
Member
isAdmin
in class Member
true
if this member is and administrator, false
otherwise.public void setAdmin(boolean isAdmin)
Member
setAdmin
in class Member
isAdmin
- true
if this member is and administrator, false
otherwise.public void setSalutation(String salutation)
Member
setSalutation
in class Member
salutation
- the salutation token to use, usually one those values
"mr"
"mrs"
"miss"
"ui.com.lbl.salut.{value}"
public void setOrganization(String organization)
Member
setOrganization
in class Member
organization
- the organization to use.public void setDepartment(String department)
Member
setDepartment
in class Member
department
- the department to use for this Member.public void setJobTitle(String jobTitle)
Member
setJobTitle
in class Member
jobTitle
- the job title to use.public void setPhone(String phone)
Member
setPhone
in class Member
phone
- the phone number to use.public void setMobile(String mobile)
Member
setMobile
in class Member
mobile
- the mobile phone number to use.public void setAddress(String address)
Member
setAddress
in class Member
address
- the address (street address, postal code, city, country and all) to use.public void setEmail(String email)
Member
setEmail
in class Member
email
- the email address to use.public void setEmailFormat(String emailFormat)
Member
setEmailFormat
in class Member
emailFormat
- the email format to use, must be one of the following values :
As of current implementation, default value for a new member is Member.EMAIL_FORMAT_HTML
.public String getInfo()
Member
getInfo
in class Member
public void setInfo(String info)
Member
setInfo
in class Member
info
- the informations to use.public void setLogin(String login)
Member
setLogin
in class Member
login
- the login to use, can be any string (id, email, ...), as
long as it is kept unique over all members.public void setPassword(String password)
Member
setPassword
in class Member
password
- the password to use. Use constants Member.DISABLED_PASSWORD
as password value to disable this member.public HashMap<String,DataRight> getRightFromClassMap()
Member
getRightFromClassMap
in class Member
public void setRightFromClassMap(HashMap<String,DataRight> v)
Member
setRightFromClassMap
in class Member
v
- Value to assign to rightFromClassMap.public Set<Publication> getPublicationSet()
Member
getPublicationSet
in class Member
public void updatePublicationSet(Publication pub, boolean add)
Member
updatePublicationSet
in class Member
pub
- the publication to be added or removedadd
- add if true, remove if falsepublic Set<Content> getContentSet()
Member
getContentSet
in class Member
public void updateContentSet(Content content, boolean add)
Member
updateContentSet
in class Member
content
- the content to be added or removedadd
- add if true, remove if falseprotected void reassignMemberPubs(Member mbr, Map context)
reassignMemberPubs
in class Member
protected void updateRights(Member mbr, Map context)
updateRights
in class Member
public static DBMember getMemberFromLogin(String login, boolean checkDisabled)
login
- the member's logincheckDisabled
- if true, return null if account is disabled
public static DBMember getMemberFromEmail(String email, boolean checkDisabled)
email
- the member's emailcheckDisabled
- if true, return null if account is disabled
public String getLastLoginTimes()
public void setLastLoginTimes(String lastLoginTimes)
lastLoginTimes
- a coma seperated list of time in millisecond.public SortedSet<Date> getLastLoginDateSet()
Member
getLastLoginDateSet
in class Member
protected void internalSetLastLoginDate(Date date)
Member
internalSetLastLoginDate
in class Member
public Member convertToMember(Member opAuthor)
opAuthor
- the author of this operation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |