|
Jive API (3.0.13) 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. Note that as of 2.0, the contract for this object has been simplified to be read-only. All changes must be made via an underlying template such as the UserTemplate.
Group,
UserTemplate| Nested Class Summary | |
|---|---|
static class |
User.Status
|
| Field Summary | |
|---|---|
static String |
EMAIL_VISIBILITY_ALLOW_TOGGLE
A JiveProperty key to get the setting for allowing the user to choose email address visiblity. |
static String |
EMAIL_VISIBILITY_DEFAULT
A JiveProperty key to get the default setting for email address visiblity. |
static String |
NAME_VISIBILITY_ALLOW_TOGGLE
A JiveProperty key to get the setting for allowing the user to choose name visiblity. |
| Method Summary | |
|---|---|
Date |
getCreationDate()
Returns the date that the user was created. |
String |
getEmail()
Returns the user's email address. |
String |
getFirstName()
Returns the user's first name. |
long |
getID()
Returns the user's id. |
Date |
getLastLoggedIn()
Returns the date the user last logged in. |
String |
getLastName()
Returns the user's last name. |
Date |
getLastProfileUpdate()
Returns the date the user's profile was last updated, or null if not set. |
Date |
getModificationDate()
Returns the date that the user was last modified. |
String |
getName()
Returns the user's name. |
String |
getPassword()
Exposes a raw password. |
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. |
Map<String,String> |
getProperties()
Retrieve a map of all the extended properties for the user. |
User.Status |
getStatus()
Returns the current status of the user in regards to moderation. |
String |
getUsername()
Returns the user's username. |
boolean |
isAnonymous()
Returns true if the user represents an anonymous user. |
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 |
isExternal()
Indicates if the user is simply a representation of an external identity and not a Jive SBS system user. |
boolean |
isFederated()
Indicates if a user is a federated - if their identity is managed outside the Jive SBS application. |
boolean |
isGetPasswordHashSupported()
Indicates whether retrieving a password hash is supported for this user. |
boolean |
isNameVisible()
Returns true if the user has chosen to make her name visible to other users. |
boolean |
isPropertyEditSupported()
Indicates whether the property methods (get, set, delete, etc.) are supported. |
boolean |
isSetEmailSupported()
Indicates whether setting the email address is supported for this user. |
boolean |
isSetEmailVisibleSupported()
Indicates whether setting the visibility of the email address is supported for this user. |
boolean |
isSetNameSupported()
Indicates whether setting the full name is supported for this user. |
boolean |
isSetNameVisibleSupported()
Indicates whether setting the visibility of the name is supported for this user. |
boolean |
isSetPasswordHashSupported()
Indicates whether modifying the hash of the user's password is supported for this user. |
boolean |
isSetPasswordSupported()
Indicates whether modifying the user's password is supported. |
boolean |
isSetUsernameSupported()
Indicates whether setting the username is supported for this user. |
| Field Detail |
|---|
static final String EMAIL_VISIBILITY_DEFAULT
static final String EMAIL_VISIBILITY_ALLOW_TOGGLE
static final String NAME_VISIBILITY_ALLOW_TOGGLE
| Method Detail |
|---|
long getID()
getID in interface JiveObjectString getUsername()
String getName()
String getFirstName()
getName() to retrieve the full name, as the first
name will be returned only if it exists in persistence.
String getLastName()
getName() to retrieve the full name, as the first
name will be returned only if it exists in persistence.
boolean isNameVisible()
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.
String getPassword()
throws UnauthorizedException
UnauthorizedExceptionString getEmail()
If your back-end user store does not support this operation, always return null.
boolean isEmailVisible()
Date getCreationDate()
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
Date getModificationDate()
Map<String,String> getProperties()
If the user is not authorized to modify the user any method which modifies the map will fail with a UnsupportedOperationException; Changes to the properties requires updates.
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:
permissionType - the permission to check for.
PermissionsDate getLastLoggedIn()
Date getLastProfileUpdate()
boolean isEnabled()
boolean isFederated()
boolean isExternal()
boolean isSetPasswordSupported()
boolean isGetPasswordHashSupported()
boolean isSetPasswordHashSupported()
boolean isSetNameSupported()
boolean isSetUsernameSupported()
boolean isSetEmailSupported()
boolean isSetNameVisibleSupported()
boolean isSetEmailVisibleSupported()
boolean isPropertyEditSupported()
User.Status getStatus()
boolean isAnonymous()
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||