com.atlassian.crowd.integration.jive
Class CrowdUser

java.lang.Object
  extended by com.atlassian.crowd.integration.jive.CrowdUser
All Implemented Interfaces:
com.jivesoftware.base.IntrospectiveUser, com.jivesoftware.base.User, com.jivesoftware.util.Cacheable, java.io.Serializable

public class CrowdUser
extends java.lang.Object
implements com.jivesoftware.base.IntrospectiveUser, com.jivesoftware.util.Cacheable

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.

Author:
Matt Tucker
See Also:
Serialized Form

Constructor Summary
protected CrowdUser(long userID, java.lang.Object fakeParam)
          Load a Crowd user specified by userID.
protected CrowdUser(long userID, java.lang.Object fakeParam, SecurityServerClient securityServerClient)
           
protected CrowdUser(java.lang.String username)
          Creates a new Crowd user.
protected CrowdUser(java.lang.String username, java.lang.Object fakeParam)
          Load a LdapUser object specified by username.
protected CrowdUser(java.lang.String username, java.lang.Object fakeParam, SecurityServerClient securityServerClient)
           
protected CrowdUser(java.lang.String username, SecurityServerClient securityServerClient)
           
 
Method Summary
 void deleteProperty(java.lang.String name)
           
 boolean equals(java.lang.Object object)
           
 int getCachedSize()
           
 java.util.Date getCreationDate()
           
 java.lang.String getEmail()
           
 long getID()
           
 java.util.Date getModificationDate()
           
 java.lang.String getName()
           
 java.lang.String getPasswordHash()
           
 com.jivesoftware.base.Permissions getPermissions(com.jivesoftware.base.AuthToken authToken)
           
 java.lang.String getProperty(java.lang.String name)
           
 java.util.Iterator getPropertyNames()
           
 java.lang.String getUsername()
           
 int hashCode()
           
 boolean isAuthorized(long type)
           
 boolean isEmailVisible()
           
 boolean isGetPasswordHashSupported()
          false, not supported in ldap implementation
 boolean isNameVisible()
           
 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)
           
 void setEmail(java.lang.String email)
           
 void setEmailVisible(boolean visible)
           
 void setModificationDate(java.util.Date modificationDate)
           
 void setName(java.lang.String name)
           
 void setNameVisible(boolean visible)
           
 void setPassword(java.lang.String password)
           
 void setPasswordHash(java.lang.String passwordHash)
           
 void setProperty(java.lang.String name, java.lang.String value)
           
 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

CrowdUser

protected CrowdUser(java.lang.String username)
             throws com.jivesoftware.base.UserNotFoundException
Creates a new Crowd user. This doesn't actually create a new Crowd principal, but instead creates the db record that supports an existing Crowd principal.

Parameters:
username - the username for the new entry.
Throws:
com.jivesoftware.base.UserNotFoundException

CrowdUser

protected CrowdUser(java.lang.String username,
                    SecurityServerClient securityServerClient)
             throws com.jivesoftware.base.UserNotFoundException
Throws:
com.jivesoftware.base.UserNotFoundException

CrowdUser

protected CrowdUser(long userID,
                    java.lang.Object fakeParam)
             throws com.jivesoftware.base.UserNotFoundException
Load a Crowd user specified by userID.

Parameters:
userID - the userID of the user to load.
Throws:
com.jivesoftware.base.UserNotFoundException

CrowdUser

protected CrowdUser(long userID,
                    java.lang.Object fakeParam,
                    SecurityServerClient securityServerClient)
             throws com.jivesoftware.base.UserNotFoundException
Throws:
com.jivesoftware.base.UserNotFoundException

CrowdUser

protected CrowdUser(java.lang.String username,
                    java.lang.Object fakeParam)
             throws com.jivesoftware.base.UserNotFoundException
Load a LdapUser object specified by username.

Parameters:
username - the username of the user to load.
Throws:
com.jivesoftware.base.UserNotFoundException

CrowdUser

protected CrowdUser(java.lang.String username,
                    java.lang.Object fakeParam,
                    SecurityServerClient securityServerClient)
             throws com.jivesoftware.base.UserNotFoundException
Throws:
com.jivesoftware.base.UserNotFoundException
Method Detail

getID

public long getID()
Specified by:
getID in interface com.jivesoftware.base.User

getUsername

public java.lang.String getUsername()
Specified by:
getUsername in interface com.jivesoftware.base.User

getName

public java.lang.String getName()
Specified by:
getName in interface com.jivesoftware.base.User

setName

public void setName(java.lang.String name)
Specified by:
setName in interface com.jivesoftware.base.User

isNameVisible

public boolean isNameVisible()
Specified by:
isNameVisible in interface com.jivesoftware.base.User

setNameVisible

public void setNameVisible(boolean visible)
Specified by:
setNameVisible in interface com.jivesoftware.base.User

setPassword

public void setPassword(java.lang.String password)
Specified by:
setPassword in interface com.jivesoftware.base.User

getPasswordHash

public java.lang.String getPasswordHash()
Specified by:
getPasswordHash in interface com.jivesoftware.base.User

setPasswordHash

public void setPasswordHash(java.lang.String passwordHash)
Specified by:
setPasswordHash in interface com.jivesoftware.base.User

getEmail

public java.lang.String getEmail()
Specified by:
getEmail in interface com.jivesoftware.base.User

setEmail

public void setEmail(java.lang.String email)
Specified by:
setEmail in interface com.jivesoftware.base.User

isEmailVisible

public boolean isEmailVisible()
Specified by:
isEmailVisible in interface com.jivesoftware.base.User

setEmailVisible

public void setEmailVisible(boolean visible)
Specified by:
setEmailVisible in interface com.jivesoftware.base.User

getCreationDate

public java.util.Date getCreationDate()
Specified by:
getCreationDate in interface com.jivesoftware.base.User

setCreationDate

public void setCreationDate(java.util.Date creationDate)
Specified by:
setCreationDate in interface com.jivesoftware.base.User

getModificationDate

public java.util.Date getModificationDate()
Specified by:
getModificationDate in interface com.jivesoftware.base.User

setModificationDate

public void setModificationDate(java.util.Date modificationDate)
Specified by:
setModificationDate in interface com.jivesoftware.base.User

getProperty

public java.lang.String getProperty(java.lang.String name)
Specified by:
getProperty in interface com.jivesoftware.base.User

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Specified by:
setProperty in interface com.jivesoftware.base.User

deleteProperty

public void deleteProperty(java.lang.String name)
Specified by:
deleteProperty in interface com.jivesoftware.base.User

getPropertyNames

public java.util.Iterator getPropertyNames()
Specified by:
getPropertyNames in interface com.jivesoftware.base.User

getPermissions

public com.jivesoftware.base.Permissions getPermissions(com.jivesoftware.base.AuthToken authToken)
Specified by:
getPermissions in interface com.jivesoftware.base.User

isAuthorized

public boolean isAuthorized(long type)
Specified by:
isAuthorized in interface com.jivesoftware.base.User

getCachedSize

public int getCachedSize()
Specified by:
getCachedSize in interface com.jivesoftware.util.Cacheable

toString

public java.lang.String toString()
Returns a String representation of the User object using the username.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of the User object.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

isSetPasswordSupported

public boolean isSetPasswordSupported()
false, not supported in ldap implementation

Specified by:
isSetPasswordSupported in interface com.jivesoftware.base.IntrospectiveUser
Returns:
false

isGetPasswordHashSupported

public boolean isGetPasswordHashSupported()
false, not supported in ldap implementation

Specified by:
isGetPasswordHashSupported in interface com.jivesoftware.base.IntrospectiveUser
Returns:
false

isSetPasswordHashSupported

public boolean isSetPasswordHashSupported()
false, not supported in ldap implementation

Specified by:
isSetPasswordHashSupported in interface com.jivesoftware.base.IntrospectiveUser
Returns:
false

isSetNameSupported

public boolean isSetNameSupported()
Returns true only if in Full LDAP mode and the Jive Property "ldap.fullMode.updateDirectory.enabled" is set to "true".

Specified by:
isSetNameSupported in interface com.jivesoftware.base.IntrospectiveUser
Returns:
true only if in Full LDAP mode and the Jive Property "ldap.fullMode.updateDirectory.enabled" is set to "true".

isSetEmailSupported

public boolean isSetEmailSupported()
Returns true only if in Full LDAP mode and the Jive Property "ldap.fullMode.updateDirectory.enabled" is set to "true".

Specified by:
isSetEmailSupported in interface com.jivesoftware.base.IntrospectiveUser
Returns:
true only if in Full LDAP mode and the Jive Property "ldap.fullMode.updateDirectory.enabled" is set to "true".

isSetNameVisibleSupported

public boolean isSetNameVisibleSupported()
supported, returns true

Specified by:
isSetNameVisibleSupported in interface com.jivesoftware.base.IntrospectiveUser
Returns:
true

isSetEmailVisibleSupported

public boolean isSetEmailVisibleSupported()
supported, returns true

Specified by:
isSetEmailVisibleSupported in interface com.jivesoftware.base.IntrospectiveUser
Returns:
true

isPropertyEditSupported

public boolean isPropertyEditSupported()
supported, returns true

Specified by:
isPropertyEditSupported in interface com.jivesoftware.base.IntrospectiveUser
Returns:
true

isReadOnly

public boolean isReadOnly()
not read only, returns false

Specified by:
isReadOnly in interface com.jivesoftware.base.IntrospectiveUser
Returns:
false


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.