Package com.atlassian.crowd.model.user
Class UserTemplate
java.lang.Object
com.atlassian.crowd.model.user.UserTemplate
- All Implemented Interfaces:
User,DirectoryEntity,User,Serializable,Comparable<User>,Principal
- Direct Known Subclasses:
UserTemplateWithAttributes
A publicly mutable User implementation.
Used to create or update a user.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUserTemplate(User user) Build a template from an existing user.UserTemplate(User user) Build a template from an existing user.UserTemplate(String name) UserTemplate(String username, long directoryId) Build a template for a new user.UserTemplate(String username, String firstName, String lastName, String displayName) -
Method Summary
Modifier and TypeMethodDescriptionintbooleanlonggetName()inthashCode()booleanisActive()voidsetActive(boolean active) voidsetDirectoryId(long directoryId) voidsetDisplayName(String displayName) voidsetEmailAddress(String emailAddress) voidsetExternalId(String externalId) voidsetFirstName(String firstName) voidsetLastName(String lastName) voidtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.crowd.embedded.api.User
isMarkedAsDeleted
-
Constructor Details
-
UserTemplate
Build a template for a new user.Used to create a user.
- Parameters:
username- username of new user.directoryId- ID of the directory in which to store the new user.
-
UserTemplate
-
UserTemplate
Build a template from an existing user.Used to update a user.
- Parameters:
user- user to build template from.
-
UserTemplate
-
UserTemplate
Build a template from an existing user.Used to update a user.
- Parameters:
user- user to build template from.
-
-
Method Details
-
setDirectoryId
public void setDirectoryId(long directoryId) -
setName
-
getDirectoryId
public long getDirectoryId()- Specified by:
getDirectoryIdin interfaceDirectoryEntity- Specified by:
getDirectoryIdin interfaceUser
-
isActive
public boolean isActive() -
setActive
public void setActive(boolean active) -
getName
- Specified by:
getNamein interfaceDirectoryEntity- Specified by:
getNamein interfacePrincipal
-
getEmailAddress
- Specified by:
getEmailAddressin interfaceUser
-
setEmailAddress
-
getFirstName
- Specified by:
getFirstNamein interfaceUser
-
setFirstName
-
getLastName
- Specified by:
getLastNamein interfaceUser
-
setLastName
-
getDisplayName
- Specified by:
getDisplayNamein interfaceUser
-
setDisplayName
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<User>- Specified by:
compareToin interfaceUser
-
getExternalId
- Specified by:
getExternalIdin interfaceUser
-
setExternalId
-
toString
-