com.atlassian.jira.user
Class DelegatingApplicationUser

java.lang.Object
  extended by com.atlassian.jira.user.DelegatingApplicationUser
All Implemented Interfaces:
com.atlassian.crowd.embedded.api.User, ApplicationUser, Comparable<com.atlassian.crowd.embedded.api.User>, Principal

public class DelegatingApplicationUser
extends Object
implements ApplicationUser

An ApplicationUser comprising of a String key and an embedded crowd User.

Since:
v5.1.1

Constructor Summary
DelegatingApplicationUser(String key, com.atlassian.crowd.embedded.api.User user)
           
 
Method Summary
 int compareTo(com.atlassian.crowd.embedded.api.User user)
           
 boolean equals(Object obj)
          Implementations must ensure equality based on getKey().
 long getDirectoryId()
           
 String getDisplayName()
           
 String getEmailAddress()
           
 String getKey()
          Returns the key which distinguishes the ApplicationUser as unique.
 String getName()
           
 int hashCode()
          Implementations must produce a hashcode based on getKey().
 boolean isActive()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DelegatingApplicationUser

public DelegatingApplicationUser(String key,
                                 com.atlassian.crowd.embedded.api.User user)
Method Detail

getKey

public String getKey()
Description copied from interface: ApplicationUser
Returns the key which distinguishes the ApplicationUser as unique. The same key is shared by all users with the same username (ignoring case) across all directories.

Specified by:
getKey in interface ApplicationUser
Returns:
the key which distinguishes the ApplicationUser as unique

getDirectoryId

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

isActive

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

getEmailAddress

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

getDisplayName

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

compareTo

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

getName

public String getName()
Specified by:
getName in interface Principal

equals

public boolean equals(Object obj)
Description copied from interface: ApplicationUser
Implementations must ensure equality based on getKey().

Specified by:
equals in interface com.atlassian.crowd.embedded.api.User
Specified by:
equals in interface ApplicationUser
Specified by:
equals in interface Principal
Overrides:
equals in class Object
Parameters:
obj - object to compare to.
Returns:
true if and only if the key matches.

hashCode

public int hashCode()
Description copied from interface: ApplicationUser
Implementations must produce a hashcode based on getKey().

Specified by:
hashCode in interface com.atlassian.crowd.embedded.api.User
Specified by:
hashCode in interface ApplicationUser
Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Object
Returns:
hashcode.

toString

public String toString()
Specified by:
toString in interface Principal
Overrides:
toString in class Object


Copyright © 2002-2013 Atlassian. All Rights Reserved.