public class UserTemplate extends Object implements User, Serializable
Used to create or update a user.
| Constructor and Description |
|---|
UserTemplate(String name) |
UserTemplate(String username,
long directoryId)
Build a template for a new user.
|
UserTemplate(String username,
String firstName,
String lastName,
String displayName) |
UserTemplate(User user)
Build a template from an existing user.
|
UserTemplate(User user)
Build a template from an existing user.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(User other)
CompareTo must be compatible with the equals() and hashCode() methods
|
boolean |
equals(Object o)
Implementations must ensure equality based on
getDirectoryId() and case-insensitive getName().
|
long |
getDirectoryId() |
String |
getDisplayName() |
String |
getEmailAddress() |
String |
getExternalId() |
String |
getFirstName() |
String |
getLastName() |
String |
getName() |
int |
hashCode()
Implementations must produce a hashcode based on
getDirectoryId() and case-insensitive getName().
|
boolean |
isActive() |
void |
setActive(boolean active) |
void |
setDirectoryId(long directoryId) |
void |
setDisplayName(String displayName) |
void |
setEmailAddress(String emailAddress) |
void |
setExternalId(String externalId) |
void |
setFirstName(String firstName) |
void |
setLastName(String lastName) |
void |
setName(String name) |
String |
toString() |
public UserTemplate(String username, long directoryId)
Used to create a user.
username - username of new user.directoryId - ID of the directory in which to store the new user.public UserTemplate(String name)
public UserTemplate(User user)
Used to update a user.
user - user to build template from.public UserTemplate(String username, String firstName, String lastName, String displayName)
public UserTemplate(User user)
Used to update a user.
user - user to build template from.public void setDirectoryId(long directoryId)
public void setName(String name)
public long getDirectoryId()
getDirectoryId in interface UsergetDirectoryId in interface DirectoryEntitypublic boolean isActive()
public void setActive(boolean active)
public String getName()
getName in interface DirectoryEntitygetName in interface Principalpublic String getEmailAddress()
getEmailAddress in interface Userpublic void setEmailAddress(String emailAddress)
public String getFirstName()
public void setFirstName(String firstName)
public String getLastName()
public void setLastName(String lastName)
public String getDisplayName()
getDisplayName in interface Userpublic void setDisplayName(String displayName)
public boolean equals(Object o)
DirectoryEntityequals in interface Userequals in interface DirectoryEntityequals in interface Principalequals in class Objecto - object to compare to.true if and only if the directoryId
and the lowercase names of the directory entities match.public int hashCode()
DirectoryEntitypublic int compareTo(User other)
UsercompareTo in interface UsercompareTo in interface Comparable<User>public String getExternalId()
public void setExternalId(String externalId)
Copyright © 2020 Atlassian. All rights reserved.