|
Xindice API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xindice.server.User
User is the atomic representation of a Xindice user. Users can be stored in an application-independent fashion using custom implementations of UserManager. StdUserManager uses Java's serialization mechanism to stream User instances to and from a file in a directory on disk. TODO: At some point, this system will be replaced by a repository- based user management system using XML as the storage and representation format.
StdUserManager
, Serialized FormConstructor Summary | |
User(java.lang.String username)
|
|
User(java.lang.String username,
java.lang.String password)
|
|
User(java.lang.String username,
java.lang.String password,
java.util.Map props)
|
Method Summary | |
boolean |
appendProperty(java.lang.String key,
java.io.Serializable value,
java.lang.String delimiter)
appendProperty appends a value to an existing property in the User's property set. |
java.lang.Object |
clone()
Serializable clone() implementation - The easy way to do it! |
boolean |
getActive()
getActive returns the User's actively available status. |
java.lang.String |
getPassword()
getPassword returns the User's password. |
void |
getPersistentState(Gateway gateway)
getPersistentState allows a Script to retrieve the Gateway's current session state from the current User, having been serialized as part of the User's image in the UserManager's data store. |
java.lang.Object |
getProperty(java.lang.String key)
getProperty returns the value for a property in the User's property set. |
int |
getRealm(java.lang.String realm)
getRealm returns the authentication realm value that is associated with the User's access control. |
UserManager |
getUserManager()
getUserManager returns the originating UserManager for this User. |
java.lang.String |
getUsername()
getUsername returns the User's name. |
boolean |
isDirty()
isDirty returns whether or not the User's record has been modified since its last save. |
java.lang.String[] |
listProperties()
listProperties returns an array of Strings containing the names of all of the properties that the User has available in their property set. |
void |
removePersistentState()
removePersistentState allows a Script to completely remove all serialized Session state from the User's record. |
boolean |
removeProperty(java.lang.String key)
removeProperty removes a property from the User's property set. |
boolean |
save()
save instructs the UserManager to save this User to its data store. |
void |
setActive(boolean active)
setActive sets whether the User is actively available in the User data store. |
void |
setPassword(java.lang.String password)
setPassword allows the User to replace their password. |
void |
setPersistentState(Gateway gateway)
setPersistentState allows a Script to store the Gateway's current session state to the current User and serialize that state as part of the User's image in the UserManager's data store. |
boolean |
setProperty(java.lang.String key,
java.io.Serializable value)
setProperty sets a value in the User's property set. |
void |
setRealm(java.lang.String realm,
int value)
setRealm adds or replaces an authentication realm value in the User's access control. |
void |
setUserManager(UserManager manager)
setUserManager attaches the originating UserManager to this User in order to allow the User to save any changes that it has performed back to the data store via the UserManager. |
void |
setUsername(java.lang.String username)
setUsername sets the User's name, basically replacing the User in the data store with a new User object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public User(java.lang.String username, java.lang.String password, java.util.Map props)
public User(java.lang.String username, java.lang.String password)
public User(java.lang.String username)
Method Detail |
public void setUserManager(UserManager manager)
manager
- The originating UserManager for this Userpublic UserManager getUserManager()
public void setUsername(java.lang.String username) throws ParameterException
username
- The new usernameParameterException
- if the username is taken or invalidpublic void setPassword(java.lang.String password) throws ParameterException
password
- The new passwordParameterException
- if the password is invalidpublic void setActive(boolean active)
active
- The new User active statuspublic void setRealm(java.lang.String realm, int value)
realm
- The realm to addvalue
- The Access Methods the user will be affordedScript
public int getRealm(java.lang.String realm)
realm
- The realm to retrieveScript
public boolean setProperty(java.lang.String key, java.io.Serializable value)
key
- The property namevalue
- The property valuepublic java.lang.String getUsername()
public java.lang.String getPassword()
public boolean getActive()
public java.lang.Object getProperty(java.lang.String key)
key
- The property namepublic boolean removeProperty(java.lang.String key)
key
- The property namepublic boolean appendProperty(java.lang.String key, java.io.Serializable value, java.lang.String delimiter)
key
- The property namevalue
- The value to appenddelimiter
- The delimiter to usepublic java.lang.String[] listProperties()
public boolean isDirty()
public boolean save()
public void setPersistentState(Gateway gateway)
gateway
- The Gateway to query for session statepublic void getPersistentState(Gateway gateway)
gateway
- The Gateway to store the session state inpublic void removePersistentState()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
- If an error occurs.
|
Xindice API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |