public class UserTransactionImpl extends PersonTransactionImpl implements UserTransaction
IOAtom.ObjectType
mCreationDate, mFirstPublished, mLastModified, mPerson, mPublishDate, mReferenceState, mReferenceType, mStateChange, mUserGroups
LOGGER, sRefreshObjectBeforeLock
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
Constructor and Description |
---|
UserTransactionImpl(UserImpl person)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
create()
Deprecated.
Creates a new object in the persistence layer.
|
String |
createAuthToken(String pName,
Date pExpireDate)
Deprecated.
Create an authentication token for a specific identifier.
|
boolean |
delete()
Deprecated.
Removes an existing
IOObject from the persistence layer. |
void |
deleteAuthToken(String pName)
Deprecated.
Remove an authentication token entirely from the backing store.
|
String |
getAuthToken(String pName)
Deprecated.
Get a specific, identifiable Authentication Token for this user.
|
Date |
getAuthTokenExpireDate(String pName)
Deprecated.
Returns the expireDate of the specified token.
|
Collection |
getAuthTokenNames()
Deprecated.
List authentication token names for this user.
|
Section |
getDefaultSection()
Deprecated.
Returns the default section of this user in his owner publication.
|
Section |
getDefaultSection(int pPublicationId)
Deprecated.
Returns the default section of this user in a specific publication.
|
int |
getFailedLoginAttempts()
Deprecated.
Get the number of failed login attempts for this user.
|
String[] |
getGroups()
Deprecated.
Retrieves all groups in which this user is member.
|
Date |
getLastFailedLoginAttempt()
Deprecated.
Get the date of last failed login attempt.
|
Date |
getLastLogin()
Deprecated.
Get the date of last successful login.
|
Date |
getLastPasswordChange()
Deprecated.
Get the date when the password for this user was changed.
|
Collection |
getNonInheritSections()
Deprecated.
|
Collection |
getNonInheritSections(int pPubId)
Deprecated.
|
Set<ProtectionDomain> |
getProtectionDomains()
Deprecated.
Retrieves all
ProtectionDomain s of this object |
List<Publication> |
getPublications()
Deprecated.
Get the publications the user has access to.
|
Map<ProtectionDomain,List<neo.xredsys.acl.Role>> |
getRoles()
Deprecated.
|
Collection |
getRoles(int pSectionId)
Deprecated.
Retrieves a user's roles for a section.
|
Collection |
getSections()
Deprecated.
|
Collection |
getSections(int pPubId)
Deprecated.
|
Collection |
getSections(String pRole)
Deprecated.
|
Collection |
getSections(String pRole,
int pPubId)
Deprecated.
|
Type |
getStatus()
Deprecated.
Get the user's status.
|
Date |
getStatusChange()
Deprecated.
Get the last time the user's status changed.
|
boolean |
hasRole(String pRole)
Deprecated.
|
boolean |
isAuthTokenValid(String pToken)
Deprecated.
Check if the given token is valid.
|
boolean |
release()
Deprecated.
Releases the lock on this
IOObject . |
void |
setObject(IOObject m)
Deprecated.
|
void |
setStatus(Type pStatus)
Deprecated.
Set the status for this user.
|
boolean |
update()
Deprecated.
Updates the database with the changes made on this
IOObject . |
addProfile, createAsUser, getObject, getPersonManager, getProfiles, refresh, removeProfile, removeProfiles, setAddress, setCreationDate, setDescription, setEmailAddress, setFirstName, setFirstPublished, setGenericName, setId, setLastModified, setLoginRealms, setOccupation, setOwnerPublicationId, setPassword, setPhoneMobile, setPhonePrivate, setPhoneWorkDirect, setPostNumber, setPostPlace, setPrivileged, setPublishDate, setReferenceState, setSourceId, setSourceName, setStateChange, setSurName, setType, setUrl, setUserName
checkLoaded, getAddress, getArticleRelations, getArticleRelations, getArticles, getArticles, getArticlesByRoleKeeper, getChecksum, getCreationDate, getDescription, getEmailAddress, getEmailAddresses, getFirstName, getFirstPublished, getFriendlyPublicationIds, getGenericName, getLastModified, getLoginRealms, getName, getOccupation, getPhoneMobile, getPhonePrivate, getPhoneWorkDirect, getPostNumber, getPostPlace, getProfileType, getProtectionDomain, getPublishDate, getReferenceState, getReferenceType, getSourceId, getSourceName, getStateChange, getSurName, getTransactionObjectImpl, getUrl, getUserGroups, getUserName, getUUID, isExternal, isPrivileged, isPublished, isUser, refreshDates
breakAndLock, compareTo, createTransaction, equals, getDefaultProtectionDomain, getHashKey, getId, getLockKeeper, getObjectType, getOwnerPublicationId, getValid, hashCode, isLocked, isPreview, isStillValid, isValid, lock, lock, lock, lock, objectTypeAsString, setValid, stringToObjectType, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addProfile, createAsUser, removeProfile, removeProfiles, setAddress, setDescription, setEmailAddress, setFirstName, setLoginRealms, setOccupation, setPassword, setPhoneMobile, setPhonePrivate, setPhoneWorkDirect, setPostNumber, setPostPlace, setPrivileged, setSurName, setUserName
getAddress, getArticlesByRoleKeeper, getDescription, getEmailAddress, getEmailAddresses, getFirstName, getFriendlyPublicationIds, getLoginRealms, getName, getOccupation, getPhoneMobile, getPhonePrivate, getPhoneWorkDirect, getPostNumber, getPostPlace, getProfiles, getSurName, getUserName, isExternal, isPrivileged, isUser
getProtectionDomain, getUserGroups
setCreationDate, setFirstPublished, setGenericName, setLastModified, setPublishDate, setReferenceState, setSourceId, setSourceName, setStateChange, setType, setUrl
getArticleRelations, getArticleRelations, getArticles, getArticles, getCreationDate, getFirstPublished, getGenericName, getLastModified, getPublishDate, getReferenceState, getReferenceType, getSourceId, getSourceName, getStateChange, getUrl, isPublished
getObject, setId, setOwnerPublicationId
breakAndLock, createTransaction, getChecksum, getHashKey, getId, getLockKeeper, getObjectType, getOwnerPublicationId, isLocked, isPreview, isValid, lock, lock, lock, lock
public UserTransactionImpl(UserImpl person)
public void setObject(IOObject m)
setObject
in class PersonTransactionImpl
public boolean update() throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
IOTransaction
IOObject
.update
in interface IOTransaction
update
in class PersonTransactionImpl
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existIllegalOperationException
- if the state of the object did not pass validation checkspublic boolean create() throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
IOTransaction
create
in interface IOTransaction
create
in class PersonTransactionImpl
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existIllegalOperationException
- if the state of the object did not pass validation checkspublic boolean delete() throws PersistentStoreException, NoSuchObjectException, IllegalOperationException
IOTransaction
IOObject
from the persistence layer.delete
in interface IOTransaction
delete
in class PersonTransactionImpl
PersistentStoreException
- if an error occurs in the persistence layerNoSuchObjectException
- if trying to retrieve an object that does not existIllegalOperationException
- if the state of the object did not pass validation checkspublic boolean release() throws IllegalArgumentException, IllegalOperationException
IOTransaction
IOObject
. A new lock must be retrieved when new modifications should be made
on this object.release
in interface IOTransaction
release
in class PersonTransactionImpl
IllegalOperationException
- if this user is not authorized to perform this actionIllegalArgumentException
public void setStatus(Type pStatus)
UserTransaction
setStatus
in interface UserTransaction
pStatus
- Set the staus of the user. The category should
be Type.UserStatuspublic Type getStatus()
User
public Date getStatusChange()
User
getStatusChange
in interface User
public int getFailedLoginAttempts()
User
getFailedLoginAttempts
in interface User
public Date getLastFailedLoginAttempt()
User
getLastFailedLoginAttempt
in interface User
public Date getLastLogin()
User
getLastLogin
in interface User
public Date getLastPasswordChange()
User
getLastPasswordChange
in interface User
public Map<ProtectionDomain,List<neo.xredsys.acl.Role>> getRoles()
public List<Publication> getPublications()
User
getPublications
in interface User
public Collection getRoles(int pSectionId)
User
@Deprecated public Collection getSections(String pRole)
User
getSections
in interface User
pRole
- the role to search for this userSection
@Deprecated public Collection getSections()
User
getSections
in interface User
Section
@Deprecated public Collection getSections(String pRole, int pPubId)
User
getSections
in interface User
pRole
- the role to search for this userpPubId
- the id of the publication in which the roles in question should be foundSection
@Deprecated public Collection getSections(int pPubId)
User
getSections
in interface User
pPubId
- the id of the publication in which the roles in question should be foundSection
public String[] getGroups()
User
@Deprecated public Collection getNonInheritSections()
User
getNonInheritSections
in interface User
Collection
of Section
objects.@Deprecated public Collection getNonInheritSections(int pPubId)
User
getNonInheritSections
in interface User
Collection
of Section
objects.public String createAuthToken(String pName, Date pExpireDate)
User
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.
createAuthToken
in interface User
pName
- a String
value identifying this
token from other tokens. The identifier must conform to the
regular expression '^[a-z0-9\-]*$'pExpireDate
- is the time the token should expire, may not be
null, if you want an eternal token, use new
Date(Long.MAX_VALUE).
public void deleteAuthToken(String pName)
User
deleteAuthToken
in interface User
pName
- a String
valuepublic Collection getAuthTokenNames()
User
getAuthTokenNames
in interface User
java.util.Collection
of Strings, each of
which represent a valid authentication token. If none can be
found, an empty collection is returned.public String getAuthToken(String pName)
User
getAuthToken
in interface User
pName
- the String which identifies the tokennull
will be returned.public Date getAuthTokenExpireDate(String pName)
User
getAuthTokenExpireDate
in interface User
pName
- The token namenull
0 if the token does not exist, or the actual
date that the token will expire.public boolean isAuthTokenValid(String pToken)
User
isAuthTokenValid
in interface User
pToken
- The token as returned from createAuthTokenpublic Set<ProtectionDomain> getProtectionDomains()
IOObject
ProtectionDomain
s of this objectgetProtectionDomains
in interface IOObject
getProtectionDomains
in interface User
getProtectionDomains
in class IOObjectImpl
public Section getDefaultSection()
User
getDefaultSection
in interface User
public Section getDefaultSection(int pPublicationId)
User
getDefaultSection
in interface User
pPublicationId
- the id of the publication.© 1998- 2021 Escenic AS