public interface User extends Person
User
objects in the
Escenic system. Users can be given roles on catalogs and sections. Possible roles can be retrieved
by calling the RoleManager.getRoles(String)
method. Typical roles are:
This interface contains several utility methods for retrieving sections and catalogs where this user has roles. It is also possible to find all groups where this user is a member.
RoleManager
IOAtom.ObjectType
ID_INVALID, OBJECTTYPE_AGREEMENTINFO, OBJECTTYPE_ARTICLE, OBJECTTYPE_CATALOG, OBJECTTYPE_CATEGORY, OBJECTTYPE_ENTITY, OBJECTTYPE_FORUM, OBJECTTYPE_LAYOUT, OBJECTTYPE_MAX, OBJECTTYPE_MIN, OBJECTTYPE_PERSON, OBJECTTYPE_POOL, OBJECTTYPE_POSTING, OBJECTTYPE_PRESENTATION_FORUM, OBJECTTYPE_PRESENTATION_POSTING, OBJECTTYPE_PRESENTATION_THREAD, OBJECTTYPE_PROFILE, OBJECTTYPE_PUBLICATION, OBJECTTYPE_SECTION, OBJECTTYPE_THREAD, OBJECTTYPE_TOPIC, OBJECTTYPE_UNKNOWN, OBJECTTYPE_USERGROUP
Modifier and Type | Method and Description |
---|---|
String |
createAuthToken(String name,
Date expireDate)
Create an authentication token for a specific identifier.
|
void |
deleteAuthToken(String name)
Remove an authentication token entirely from the backing store.
|
String |
getAuthToken(String name)
Get a specific, identifiable Authentication Token for this user.
|
Date |
getAuthTokenExpireDate(String name)
Returns the expireDate of the specified token.
|
Collection |
getAuthTokenNames()
List authentication token names for this user.
|
Section |
getDefaultSection()
Returns the default section of this user in his owner publication.
|
Section |
getDefaultSection(int pPublicationId)
Returns the default section of this user in a specific publication.
|
int |
getFailedLoginAttempts()
Get the number of failed login attempts for this user.
|
String[] |
getGroups()
Retrieves all groups in which this user is member.
|
Date |
getLastFailedLoginAttempt()
Get the date of last failed login attempt.
|
Date |
getLastLogin()
Get the date of last successful login.
|
Date |
getLastPasswordChange()
Get the date when the password for this user was changed.
|
Collection |
getNonInheritSections()
Deprecated.
Use
APIUtil.resolveUserSectionsForPublication instead. |
Collection |
getNonInheritSections(int pubId)
Deprecated.
Use
APIUtil.resolveUserSectionsForPublication instead. |
Set<ProtectionDomain> |
getProtectionDomains()
Returns the protection domains for this user.
|
List<Publication> |
getPublications()
Get the publications the user has access to.
|
Map<ProtectionDomain,List<neo.xredsys.acl.Role>> |
getRoles() |
Collection |
getRoles(int pSectionId)
Retrieves a user's roles for a section.
|
Collection |
getSections()
Deprecated.
Use
APIUtil.resolveUserSectionsForPublication instead. |
Collection |
getSections(int pubId)
Deprecated.
Use
APIUtil.resolveUserSectionsForPublication instead. |
Collection |
getSections(String pRole)
Deprecated.
Use
APIUtil.resolveUserSectionsForPublication instead. |
Collection |
getSections(String pRole,
int pubId)
Deprecated.
Use
APIUtil.resolveUserSectionsForPublication instead. |
Type |
getStatus()
Get the user's status.
|
Date |
getStatusChange()
Get the last time the user's status changed.
|
boolean |
hasRole(String pRole) |
boolean |
isAuthTokenValid(String pToken)
Check if the given token is valid.
|
void |
refresh()
Removes all cached sections and catalogs from this
User object. |
getAddress, getArticlesByRoleKeeper, getDescription, getEmailAddress, getEmailAddresses, getFirstName, getFriendlyPublicationIds, getLoginRealms, getName, getOccupation, getPhoneMobile, getPhonePrivate, getPhoneWorkDirect, getPostNumber, getPostPlace, getProfiles, getSurName, getUserName, isExternal, isPrivileged, isUser
getArticleRelations, getArticleRelations, getArticles, getArticles, getCreationDate, getFirstPublished, getGenericName, getLastModified, getPublishDate, getReferenceState, getReferenceType, getSourceId, getSourceName, getStateChange, getUrl, isPublished
getProtectionDomain, getUserGroups
breakAndLock, createTransaction, getChecksum, getHashKey, getId, getLockKeeper, getObjectType, getOwnerPublicationId, isLocked, isPreview, isValid, lock, lock, lock, lock
Type getStatus()
Date getStatusChange()
int getFailedLoginAttempts()
Date getLastFailedLoginAttempt()
Date getLastLogin()
Date getLastPasswordChange()
boolean hasRole(String pRole)
Map<ProtectionDomain,List<neo.xredsys.acl.Role>> getRoles()
List<Publication> getPublications()
Collection getRoles(int pSectionId)
pSectionId
- The section@Deprecated Collection getSections(String pRole)
APIUtil.resolveUserSectionsForPublication
instead.pRole
- the role to search for this userSection
@Deprecated Collection getSections()
APIUtil.resolveUserSectionsForPublication
instead.Section
@Deprecated Collection getSections(String pRole, int pubId)
APIUtil.resolveUserSectionsForPublication
instead.pRole
- the role to search for this userpubId
- the id of the publication in which the roles in question should be foundSection
@Deprecated Collection getSections(int pubId)
APIUtil.resolveUserSectionsForPublication
instead.pubId
- the id of the publication in which the roles in question should be foundSection
String[] getGroups()
@Deprecated Collection getNonInheritSections()
APIUtil.resolveUserSectionsForPublication
instead.Collection
of Section
objects.@Deprecated Collection getNonInheritSections(int pubId)
APIUtil.resolveUserSectionsForPublication
instead.Collection
of Section
objects.void refresh()
User
object.String createAuthToken(String name, Date expireDate)
A token is an alpha numeric string which matches the regular expression '^[a-zA-Z0-9]*$' -- safe for transmission over most protocols. The token is typically around 35 to 40 characters long.
name
- a String
value identifying this
token from other tokens. The identifier must conform to the
regular expression '^[a-z0-9\-]*$'expireDate
- is the time the token should expire, may not be
null, if you want an eternal token, use new
Date(Long.MAX_VALUE).
void deleteAuthToken(String name)
name
- a String
valueCollection getAuthTokenNames()
java.util.Collection
of Strings, each of
which represent a valid authentication token. If none can be
found, an empty collection is returned.String getAuthToken(String name)
name
- the String which identifies the tokennull
will be returned.Date getAuthTokenExpireDate(String name)
name
- The token namenull
0 if the token does not exist, or the actual
date that the token will expire.boolean isAuthTokenValid(String pToken)
pToken
- The token as returned from createAuthTokenSet<ProtectionDomain> getProtectionDomains()
getProtectionDomains
in interface IOObject
Set
of the protection domains for this userSection getDefaultSection()
Section getDefaultSection(int pPublicationId)
pPublicationId
- the id of the publication.© 1998- 2018 Stibo DX