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 User
getDirectoryId
in interface DirectoryEntity
public boolean isActive()
public void setActive(boolean active)
public String getName()
getName
in interface DirectoryEntity
getName
in interface Principal
public String getEmailAddress()
getEmailAddress
in interface User
public 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 User
public void setDisplayName(String displayName)
public boolean equals(Object o)
DirectoryEntity
equals
in interface User
equals
in interface DirectoryEntity
equals
in interface Principal
equals
in class Object
o
- object to compare to.true
if and only if the directoryId
and the lowercase names of the directory entities match.public int hashCode()
DirectoryEntity
public int compareTo(User other)
User
compareTo
in interface User
compareTo
in interface Comparable<User>
public String getExternalId()
public void setExternalId(String externalId)
Copyright © 2021 Atlassian. All rights reserved.