|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.liquidsite.core.content.PersistentObject
org.liquidsite.core.content.User
A system user.
| Field Summary | |
static java.lang.String |
NAME_CHARS
The permitted user name characters. |
| Fields inherited from class org.liquidsite.core.content.PersistentObject |
BINDERS, LOWER_CASE, NUMBERS, UPPER_CASE |
| Constructor Summary | |
User(ContentManager manager,
Domain domain,
java.lang.String name)
Creates a new user with default values. |
|
| Method Summary | |
void |
addToGroup(Group group)
Adds this user to the specified group. |
protected void |
doDelete(DataSource src,
User user)
Deletes the object data from the database. |
protected void |
doInsert(DataSource src,
User user,
boolean restore)
Inserts the object data into the database. |
protected void |
doUpdate(DataSource src,
User user)
Updates the object data in the database. |
protected void |
doValidate()
Validates the object data before writing to the database. |
boolean |
equals(java.lang.Object obj)
Checks if this user equals another object. |
boolean |
equals(User obj)
Checks if this user equals another user. |
static java.lang.String |
generatePassword()
Generates a password suggestion that should be sufficiently hard to crack. |
java.lang.String |
getComment()
Returns the user comment. |
Domain |
getDomain()
Returns the user domain. |
java.lang.String |
getDomainName()
Returns the user domain name |
java.lang.String |
getEmail()
Returns the user e-mail address. |
boolean |
getEnabled()
Returns the enabled flag. |
Group[] |
getGroups()
Returns the groups that this user belongs to. |
java.lang.String |
getName()
Returns the user name. |
java.lang.String |
getPassword()
Returns the encoded user password. |
java.lang.String |
getRealName()
Returns the real user name. |
java.util.TimeZone |
getTimeZone()
Returns the user time zone. |
boolean |
isSuperUser()
Checks if this user is a super user. |
void |
removeFromGroup(Group group)
Removes this user from the specified group. |
void |
setComment(java.lang.String comment)
Sets the user comment. |
void |
setEmail(java.lang.String email)
Sets the user e-mail address. |
void |
setEnabled(boolean enabled)
Sets the enabled flag. |
void |
setPassword(java.lang.String password)
Sets the user password. |
void |
setPasswordEncoded(java.lang.String password)
Sets the encoded user password. |
void |
setRealName(java.lang.String realName)
Sets the real user name. |
java.lang.String |
toString()
Returns a string representation of this object. |
boolean |
verifyPassword(java.lang.String password)
Verifies the user password. |
| Methods inherited from class org.liquidsite.core.content.PersistentObject |
decodeMap, delete, delete, encodeMap, getContentManager, hasAdminAccess, hasPublishAccess, hasReadAccess, hasWriteAccess, isPersistent, restore, restore, save, save, validateChars, validateSize |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String NAME_CHARS
| Constructor Detail |
public User(ContentManager manager,
Domain domain,
java.lang.String name)
manager - the content manager to usedomain - the domain, or null for a superusername - the user name| Method Detail |
public static java.lang.String generatePassword()
public boolean equals(java.lang.Object obj)
obj - the object to compare with
public boolean equals(User obj)
obj - the object to compare with
public java.lang.String toString()
public boolean isSuperUser()
public Domain getDomain()
throws ContentException
ContentException - if no content manager is availablepublic java.lang.String getDomainName()
public java.lang.String getName()
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password - the new user passwordpublic void setPasswordEncoded(java.lang.String password)
password - the new encoded user passwordpublic boolean getEnabled()
public void setEnabled(boolean enabled)
enabled - the new enabled flagpublic boolean verifyPassword(java.lang.String password)
password - the user password
public java.lang.String getRealName()
public void setRealName(java.lang.String realName)
realName - the new real user namepublic java.lang.String getEmail()
public void setEmail(java.lang.String email)
email - the new user e-mail addresspublic java.util.TimeZone getTimeZone()
public java.lang.String getComment()
public void setComment(java.lang.String comment)
comment - the new user comment
public Group[] getGroups()
throws ContentException
ContentException - if the database couldn't be accessed
properlypublic void addToGroup(Group group)
group - the group objectpublic void removeFromGroup(Group group)
group - the group object
protected void doValidate()
throws ContentException
doValidate in class PersistentObjectContentException - if the object data wasn't valid
protected void doInsert(DataSource src,
User user,
boolean restore)
throws ContentException
doInsert in class PersistentObjectsrc - the data source to useuser - the user performing the operationrestore - the restore flag
ContentException - if the database couldn't be accessed
properly
protected void doUpdate(DataSource src,
User user)
throws ContentException
doUpdate in class PersistentObjectsrc - the data source to useuser - the user performing the operation
ContentException - if the database couldn't be accessed
properly
protected void doDelete(DataSource src,
User user)
throws ContentException
doDelete in class PersistentObjectsrc - the data source to useuser - the user performing the operation
ContentException - if the database couldn't be accessed
properly
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||