|
Clearspace API (1.7.0) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface User
The User interface provides information about and services for users of the system. Users can be identified by a unique id or username. Users can also be organized into groups for easier management of permissions.
The name and email field will normally be required fields when creating user accounts for most implementations. However, some users may wish to keep that information private. Therefore, there are two flags to set if the name and email fields should be made visible to other users. If the flags are set to deny access, getName() and getEmail() will throw UnauthorizedExceptions to users that don't have administrator permissions.
Security for User objects is provide by UserProxy protection proxy objects.
Instructions for those that wish to implement this interface to provide a custom User implementation appear in red.
Group| Method Summary | |
|---|---|
java.util.Date |
getCreationDate()
Returns the date that the user was created. |
java.lang.String |
getEmail()
Returns the user's email address. |
long |
getID()
Returns the user's id. |
java.util.Date |
getLastLoggedIn()
Returns the date the user last logged in. |
java.util.Date |
getModificationDate()
Returns the date that the user was last modified. |
java.lang.String |
getName()
Returns the user's name. |
java.lang.String |
getPasswordHash()
Returns the user's password in hashed form. |
Permissions |
getPermissions(AuthToken authToken)
Returns the permissions for the user that correspond to the passed-in AuthToken. |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Retrieve a map of all the extended properties for the user. |
java.lang.String |
getUsername()
Returns the user's username. |
boolean |
isAuthorized(long permissionType)
Returns true if the handle on the object has the permission specified. |
boolean |
isEmailVisible()
Returns true if the user has chosen to make her email visible to other users. |
boolean |
isEnabled()
Returns true if the user is disabled, meaning they cannot log in. |
boolean |
isNameVisible()
Returns true if the user has chosen to make her name visible to other users. |
void |
setCreationDate(java.util.Date creationDate)
Sets the creation date of the user. |
void |
setEmail(java.lang.String email)
Sets the user's email address. |
void |
setEmailVisible(boolean visible)
Sets whether a user's email is visible to other users. |
void |
setEnabled(boolean enabled)
If this field is set to false the user is disabled, meaning they cannot log in. |
void |
setLastLoggedIn(java.util.Date date)
Sets the date the user last logged in. |
void |
setModificationDate(java.util.Date modificationDate)
Sets the date the user was last modified. |
void |
setName(java.lang.String name)
Sets the user's name. |
void |
setNameVisible(boolean visible)
Sets whether a user's name is visible to other users. |
void |
setPassword(java.lang.String password)
Sets the users's password. |
void |
setPasswordHash(java.lang.String passwordHash)
Sets the user's password in hashed form. |
void |
setUsername(java.lang.String username)
Sets the user's name. |
| Methods inherited from interface com.jivesoftware.community.JiveObject |
|---|
getObjectType |
| Method Detail |
|---|
long getID()
getID in interface JiveObjectjava.lang.String getUsername()
void setUsername(java.lang.String username)
throws UnauthorizedException,
UserAlreadyExistsException
username - new username for the user.
UnauthorizedException - if does not have administrator permissions.
UserAlreadyExistsException - if the username is taken by another user.java.lang.String getName()
void setName(java.lang.String name)
throws UnauthorizedException
name - new name for the user.
UnauthorizedException - if does not have administrator permissions.boolean isNameVisible()
void setNameVisible(boolean visible)
throws UnauthorizedException
visible - boolean value to determin if the name should be visible.
UnauthorizedException - if does not have administrator permissions.
void setPassword(java.lang.String password)
throws UnauthorizedException
password - new password for the user.
UnauthorizedException - if does not have administrator permissions.
java.lang.String getPasswordHash()
throws UnauthorizedException
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
UnauthorizedException - if does not have administrator permissions.
void setPasswordHash(java.lang.String passwordHash)
throws UnauthorizedException
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
passwordHash - the hashedPassword for the user.
UnauthorizedException - if does not have administrator permissions.java.lang.String getEmail()
If your back-end user store does not support this operation, always return null.
void setEmail(java.lang.String email)
throws UnauthorizedException
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
email - new email address for the user.
UnauthorizedException - if does not have administrator permissions.boolean isEmailVisible()
void setEmailVisible(boolean visible)
throws UnauthorizedException
visible - boolean value to determin if the name should be visible.
UnauthorizedException - if does not have administrator permissions.java.util.Date getCreationDate()
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
void setCreationDate(java.util.Date creationDate)
throws UnauthorizedException
creationDate - the date the user was created.
UnauthorizedException - if does not have administrator permissions.java.util.Date getModificationDate()
void setModificationDate(java.util.Date modificationDate)
throws UnauthorizedException
modificationDate - the date the user was modified.
UnauthorizedException - if does not have administrator permissions.java.util.Map<java.lang.String,java.lang.String> getProperties()
If the user is not authorized to modify the user any method which modifies the map will fail with a UnsupportedOperationException;
Permissions getPermissions(AuthToken authToken)
authToken - the auth token to look up permissions with.
boolean isAuthorized(long permissionType)
Because proxy objects will implement real security checking, this
method should be implemented as:
return true;.
permissionType - the permission to check for.
Permissionsvoid setLastLoggedIn(java.util.Date date)
date - the date the user last logged in.java.util.Date getLastLoggedIn()
void setEnabled(boolean enabled)
enabled - If this field is set to false the user is disabled, meaning they cannot log in. Disabled
Users do not count against perseat licensing.boolean isEnabled()
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||