com.atlassian.jira.user
Interface ApplicationUser

All Superinterfaces:
Comparable<com.atlassian.crowd.embedded.api.User>, Principal, com.atlassian.crowd.embedded.api.User
All Known Implementing Classes:
DelegatingApplicationUser, MockUser

public interface ApplicationUser
extends com.atlassian.crowd.embedded.api.User

Represents a person who uses JIRA. This differs from a User, which represents a user in a directory. An ApplicationUser encompasses all users with the same username (ignoring case) across all directories. This is intended to be used to allow for renaming of usernames in version 6.0.

Since:
v5.1.1

Method Summary
 boolean equals(Object obj)
          Implementations must ensure equality based on getKey().
 String getKey()
          Returns the key which distinguishes the ApplicationUser as unique.
 int hashCode()
          Implementations must produce a hashcode based on getKey().
 
Methods inherited from interface com.atlassian.crowd.embedded.api.User
compareTo, getDirectoryId, getDisplayName, getEmailAddress, isActive
 
Methods inherited from interface java.security.Principal
getName, toString
 

Method Detail

getKey

String getKey()
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.

Returns:
the key which distinguishes the ApplicationUser as unique

equals

boolean equals(Object obj)
Implementations must ensure equality based on getKey().

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

hashCode

int hashCode()
Implementations must produce a hashcode based on getKey().

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


Copyright © 2002-2013 Atlassian. All Rights Reserved.