|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.base.ldap.LdapUser
public class LdapUser
LDAP implementation of the User interface. This class supports storing all user information in the LDAP directory, or only getting critical data from LDAP and storing all other data in the database.
| Constructor Summary | |
|---|---|
protected |
LdapUser(long userID,
java.lang.Object fakeParam)
Load a LdapUser object specified by userID. |
protected |
LdapUser(java.lang.String username)
Creates a new LdapUser. |
protected |
LdapUser(java.lang.String username,
java.lang.Object fakeParam)
Load a LdapUser object specified by username. |
| Method Summary | |
|---|---|
void |
deleteProperty(java.lang.String name)
Deletes an extended property. |
boolean |
equals(java.lang.Object object)
|
int |
getCachedSize()
Returns the approximate size of the Object in bytes. |
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 |
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.lang.String |
getProperty(java.lang.String name)
Returns an extended property of the user. |
java.util.Iterator |
getPropertyNames()
Returns an Iterator for all the names of the extended user properties. |
java.lang.String |
getUserDN()
Returns the user's LDAP DN. |
java.lang.String |
getUsername()
Returns the user's username. |
int |
hashCode()
|
boolean |
isAuthorized(long type)
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 |
isGetPasswordHashSupported()
false, not supported in ldap implementation |
boolean |
isNameVisible()
Returns true if the user has chosen to make her name visible to other users. |
boolean |
isPropertyEditSupported()
supported, returns true |
boolean |
isReadOnly()
not read only, returns false |
boolean |
isSetEmailSupported()
Returns true only if in Full LDAP mode and the Jive Property "ldap.fullMode.updateDirectory.enabled" is set to "true". |
boolean |
isSetEmailVisibleSupported()
supported, returns true |
boolean |
isSetNameSupported()
Returns true only if in Full LDAP mode and the Jive Property "ldap.fullMode.updateDirectory.enabled" is set to "true". |
boolean |
isSetNameVisibleSupported()
supported, returns true |
boolean |
isSetPasswordHashSupported()
false, not supported in ldap implementation |
boolean |
isSetPasswordSupported()
false, not supported in ldap implementation |
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 |
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 |
setProperty(java.lang.String name,
java.lang.String value)
Sets an extended property of the user. |
java.lang.String |
toString()
Returns a String representation of the User object using the username. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected LdapUser(java.lang.String username)
throws UserNotFoundException
username - the username for the new entry.
UserNotFoundException
protected LdapUser(long userID,
java.lang.Object fakeParam)
throws UserNotFoundException
userID - the userID of the user to load.
UserNotFoundException
protected LdapUser(java.lang.String username,
java.lang.Object fakeParam)
throws UserNotFoundException
username - the username of the user to load.
UserNotFoundException| Method Detail |
|---|
public long getID()
User
getID in interface Userpublic java.lang.String getUsername()
User
getUsername in interface Userpublic java.lang.String getName()
User
getName in interface Userpublic void setName(java.lang.String name)
User
setName in interface Username - new name for the user.public boolean isNameVisible()
User
isNameVisible in interface Userpublic void setNameVisible(boolean visible)
User
setNameVisible in interface Uservisible - boolean value to determin if the name should be visible.public void setPassword(java.lang.String password)
User
setPassword in interface Userpassword - new password for the user.public java.lang.String getPasswordHash()
UserIf your back-end user store does not support this operation, throw an UnsupportedOperationException.
getPasswordHash in interface Userpublic void setPasswordHash(java.lang.String passwordHash)
UserIf your back-end user store does not support this operation, throw an UnsupportedOperationException.
setPasswordHash in interface UserpasswordHash - the hashedPassword for the user.public java.lang.String getEmail()
UserIf your back-end user store does not support this operation, always return null.
getEmail in interface Userpublic void setEmail(java.lang.String email)
UserIf your back-end user store does not support this operation, throw an UnsupportedOperationException.
setEmail in interface Useremail - new email address for the user.public boolean isEmailVisible()
User
isEmailVisible in interface Userpublic void setEmailVisible(boolean visible)
User
setEmailVisible in interface Uservisible - boolean value to determin if the name should be visible.public java.util.Date getCreationDate()
UserIf your back-end user store does not support this operation, throw an UnsupportedOperationException.
getCreationDate in interface Userpublic void setCreationDate(java.util.Date creationDate)
User
setCreationDate in interface UsercreationDate - the date the user was created.public java.util.Date getModificationDate()
User
getModificationDate in interface Userpublic void setModificationDate(java.util.Date modificationDate)
User
setModificationDate in interface UsermodificationDate - the date the user was modified.public java.lang.String getProperty(java.lang.String name)
User
getProperty in interface Username - the name of the property to get.
public void setProperty(java.lang.String name,
java.lang.String value)
User
setProperty in interface Username - the name of the property to set.value - the new value for the property.public void deleteProperty(java.lang.String name)
Username does not exist,
this method will do nothing.
deleteProperty in interface Username - the name of the property to delete.public java.util.Iterator getPropertyNames()
User
This method should typically be implemented as:
if (auth.getUserID() == id) {
return new Permissions(Permissions.USER_ADMIN);
}
else {
return new Permissions(Permissions.NONE);
}
getPropertyNames in interface Userpublic Permissions getPermissions(AuthToken authToken)
User
getPermissions in interface UserauthToken - the auth token to look up permissions with.public boolean isAuthorized(long type)
User
Because proxy objects will implement real security checking, this
method should be implemented as:
return true;.
isAuthorized in interface Usertype - the permission to check for.Permissionspublic int getCachedSize()
Cacheable
getCachedSize in interface Cacheablepublic java.lang.String getUserDN()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic boolean isSetPasswordSupported()
isSetPasswordSupported in interface IntrospectiveUserpublic boolean isGetPasswordHashSupported()
isGetPasswordHashSupported in interface IntrospectiveUserpublic boolean isSetPasswordHashSupported()
isSetPasswordHashSupported in interface IntrospectiveUserpublic boolean isSetNameSupported()
isSetNameSupported in interface IntrospectiveUserpublic boolean isSetEmailSupported()
isSetEmailSupported in interface IntrospectiveUserpublic boolean isSetNameVisibleSupported()
isSetNameVisibleSupported in interface IntrospectiveUserpublic boolean isSetEmailVisibleSupported()
isSetEmailVisibleSupported in interface IntrospectiveUserpublic boolean isPropertyEditSupported()
isPropertyEditSupported in interface IntrospectiveUserpublic boolean isReadOnly()
isReadOnly in interface IntrospectiveUser
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||