com.opensymphony.user
Class User

java.lang.Object
  extended by com.opensymphony.user.Entity
      extended by com.opensymphony.user.User
All Implemented Interfaces:
com.atlassian.crowd.embedded.api.User, Serializable, Comparable<com.atlassian.crowd.embedded.api.User>, Principal
Direct Known Subclasses:
MockOSUser

Deprecated. since 4.3 - use User instead

@Deprecated
public class User
extends Entity
implements com.atlassian.crowd.embedded.api.User

Entity to represent an actual User of the system. The user is backed by Crowd's Embedded Service.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.opensymphony.user.Entity
mutable, name
 
Constructor Summary
User(String name, ProviderAccessor providerAccessor, com.atlassian.crowd.embedded.api.CrowdService crowdService)
          Deprecated. Constructor is only called by UserManager.
User(com.atlassian.crowd.embedded.api.User crowdUser, com.atlassian.crowd.embedded.api.CrowdService crowdService)
          Deprecated.  
 
Method Summary
 boolean addToGroup(Group group)
          Deprecated. Add this User as a member to supplied Group.
 boolean authenticate(String password)
          Deprecated. Verify that the supplied password matches the stored password for the user.
 int compareTo(com.atlassian.crowd.embedded.api.User other)
          Deprecated.  
 boolean equals(Object o)
          Deprecated. Compare name.
 long getDirectoryId()
          Deprecated.  
 String getDisplayName()
          Deprecated.  
 String getEmail()
          Deprecated. Please use getEmailAddress().
 String getEmailAddress()
          Deprecated.  
 String getFullName()
          Deprecated. Please call getDisplayName()
 List<String> getGroups()
          Deprecated. List all Groups that User is a member of.
 int hashCode()
          Deprecated. Hashcode of name.
 boolean inGroup(Group group)
          Deprecated. Determine whether User is member of supplied Group.
 boolean inGroup(String groupName)
          Deprecated. Determine whether User is member of supplied Group.
 boolean isActive()
          Deprecated.  
 void remove()
          Deprecated. Remove User from CredentialsProvider (providing it is mutable).
 boolean removeFromGroup(Group group)
          Deprecated. Remove this User as a member from supplied Group.
 void setEmail(String email)
          Deprecated. Convenience method to access property.
 void setFullName(String fullName)
          Deprecated. Convenience method to access property.
 void setPassword(String password)
          Deprecated. Change the User's password.
 void store()
          Deprecated. Force update to underlying data-stores.
protected  void update()
          Deprecated. Persists the current user in the embedded Crowd back-end.
 
Methods inherited from class com.opensymphony.user.Entity
getAccessProvider, getCredentialsProvider, getName, getProfileProvider, getPropertySet, getUserManager, isMutable, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.security.Principal
getName, toString
 

Constructor Detail

User

public User(com.atlassian.crowd.embedded.api.User crowdUser,
            com.atlassian.crowd.embedded.api.CrowdService crowdService)
Deprecated. 

User

public User(String name,
            ProviderAccessor providerAccessor,
            com.atlassian.crowd.embedded.api.CrowdService crowdService)
Deprecated. 
Constructor is only called by UserManager. If the user with the supplied name exists, then the user's attributes

Parameters:
name - username.
providerAccessor - accessors.
crowdService - service
Method Detail

setEmail

public void setEmail(String email)
Deprecated. 
Convenience method to access property. This actually persists the new email address.

Parameters:
email - new email address.

getEmail

public String getEmail()
Deprecated. Please use getEmailAddress().

Convenience method to access property.

Returns:
email address.

setFullName

public void setFullName(String fullName)
Deprecated. 
Convenience method to access property. This actually persists the new full name.

Parameters:
fullName - new display name.

getFullName

public String getFullName()
Deprecated. Please call getDisplayName()

Convenience method to access property.

Returns:
the full name.

getGroups

public List<String> getGroups()
Deprecated. 
List all Groups that User is a member of. Modifiying this Collection will not add or remove Groups.

Returns:
list of groups the user belongs to.

setPassword

public void setPassword(String password)
                 throws ImmutableException
Deprecated. 
Change the User's password.

Parameters:
password - new password.
Throws:
ImmutableException - should never be thrown as all users from this implementation are "mutable".

addToGroup

public boolean addToGroup(Group group)
Deprecated. 
Add this User as a member to supplied Group. Returns whether any modifications were made.

Parameters:
group - group to add membership.
Returns:
true if membership added successfully.

authenticate

public boolean authenticate(String password)
Deprecated. 
Verify that the supplied password matches the stored password for the user.

Parameters:
password - current password.
Returns:
true if the authentication was successful.

inGroup

public boolean inGroup(Group group)
Deprecated. 
Determine whether User is member of supplied Group.

Parameters:
group - group to check membership.
Returns:
true if the user is a member of the group.

inGroup

public boolean inGroup(String groupName)
Deprecated. 
Determine whether User is member of supplied Group.

Parameters:
groupName - name of group to check membership.
Returns:
true if the user is a member of the group.

remove

public void remove()
            throws ImmutableException
Deprecated. 
Remove User from CredentialsProvider (providing it is mutable). Note that this also removes all custom attributes (profile) of the user too by virtue of cascade on the Crowd Service.

Specified by:
remove in class Entity
Throws:
ImmutableException

removeFromGroup

public boolean removeFromGroup(Group group)
Deprecated. 
Remove this User as a member from supplied Group. Returns whether any modifications were made.

Parameters:
group - group to remove membership.
Returns:
true if user successfully removed from group.

store

public void store()
           throws ImmutableException
Deprecated. 
Force update to underlying data-stores. This allows providers that do not update persistent data on the fly to store changes. If any of the providers are immutable and fields that cannot be updated have changed, ImmutableException shall be thrown.

Overrides:
store in class Entity
Throws:
ImmutableException

update

protected void update()
Deprecated. 
Persists the current user in the embedded Crowd back-end.


getDirectoryId

public long getDirectoryId()
Deprecated. 
Specified by:
getDirectoryId in interface com.atlassian.crowd.embedded.api.User

isActive

public boolean isActive()
Deprecated. 
Specified by:
isActive in interface com.atlassian.crowd.embedded.api.User

getEmailAddress

public String getEmailAddress()
Deprecated. 
Specified by:
getEmailAddress in interface com.atlassian.crowd.embedded.api.User

getDisplayName

public String getDisplayName()
Deprecated. 
Specified by:
getDisplayName in interface com.atlassian.crowd.embedded.api.User

equals

public boolean equals(Object o)
Deprecated. 
Description copied from class: Entity
Compare name.

Specified by:
equals in interface com.atlassian.crowd.embedded.api.User
Specified by:
equals in interface Principal
Overrides:
equals in class Entity

hashCode

public int hashCode()
Deprecated. 
Description copied from class: Entity
Hashcode of name.

Specified by:
hashCode in interface com.atlassian.crowd.embedded.api.User
Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Entity

compareTo

public int compareTo(com.atlassian.crowd.embedded.api.User other)
Deprecated. 
Specified by:
compareTo in interface com.atlassian.crowd.embedded.api.User
Specified by:
compareTo in interface Comparable<com.atlassian.crowd.embedded.api.User>


Copyright © 2002-2011 Atlassian. All Rights Reserved.