|
Jive Forums API (5.5.20.2-oracle) 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 User
public java.lang.String getUsername()
User
getUsername
in interface User
public java.lang.String getName()
User
getName
in interface User
public void setName(java.lang.String name)
User
setName
in interface User
name
- new name for the user.public boolean isNameVisible()
User
isNameVisible
in interface User
public void setNameVisible(boolean visible)
User
setNameVisible
in interface User
visible
- boolean value to determin if the name should be visible.public void setPassword(java.lang.String password)
User
setPassword
in interface User
password
- new password for the user.public java.lang.String getPasswordHash()
User
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
getPasswordHash
in interface User
public void setPasswordHash(java.lang.String passwordHash)
User
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
setPasswordHash
in interface User
passwordHash
- the hashedPassword for the user.public java.lang.String getEmail()
User
If your back-end user store does not support this operation, always return null.
getEmail
in interface User
public void setEmail(java.lang.String email)
User
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
setEmail
in interface User
email
- new email address for the user.public boolean isEmailVisible()
User
isEmailVisible
in interface User
public void setEmailVisible(boolean visible)
User
setEmailVisible
in interface User
visible
- boolean value to determin if the name should be visible.public java.util.Date getCreationDate()
User
If your back-end user store does not support this operation, throw an UnsupportedOperationException.
getCreationDate
in interface User
public void setCreationDate(java.util.Date creationDate)
User
setCreationDate
in interface User
creationDate
- the date the user was created.public java.util.Date getModificationDate()
User
getModificationDate
in interface User
public void setModificationDate(java.util.Date modificationDate)
User
setModificationDate
in interface User
modificationDate
- the date the user was modified.public java.lang.String getProperty(java.lang.String name)
User
getProperty
in interface User
name
- the name of the property to get.
public void setProperty(java.lang.String name, java.lang.String value)
User
setProperty
in interface User
name
- the name of the property to set.value
- the new value for the property.public void deleteProperty(java.lang.String name)
User
name
does not exist,
this method will do nothing.
deleteProperty
in interface User
name
- 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 User
public Permissions getPermissions(AuthToken authToken)
User
getPermissions
in interface User
authToken
- 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 User
type
- the permission to check for.Permissions
public int getCachedSize()
Cacheable
getCachedSize
in interface Cacheable
public java.lang.String getUserDN()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public boolean isSetPasswordSupported()
isSetPasswordSupported
in interface IntrospectiveUser
public boolean isGetPasswordHashSupported()
isGetPasswordHashSupported
in interface IntrospectiveUser
public boolean isSetPasswordHashSupported()
isSetPasswordHashSupported
in interface IntrospectiveUser
public boolean isSetNameSupported()
isSetNameSupported
in interface IntrospectiveUser
public boolean isSetEmailSupported()
isSetEmailSupported
in interface IntrospectiveUser
public boolean isSetNameVisibleSupported()
isSetNameVisibleSupported
in interface IntrospectiveUser
public boolean isSetEmailVisibleSupported()
isSetEmailVisibleSupported
in interface IntrospectiveUser
public boolean isPropertyEditSupported()
isPropertyEditSupported
in interface IntrospectiveUser
public 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 |