public class UserImpl extends BaseDomainHelper implements User
Constructor and Description |
---|
UserImpl()
Create a new empty user
|
Modifier and Type | Method and Description |
---|---|
void |
addChange(StateChange change)
Add a change to the users stateChanges set
|
void |
addPermanentRole(Role label)
Add a role to this User's Role Set.
|
void |
addServer(Server server)
Give this user permission to manage a server.
|
void |
addTemporaryRole(Role label)
Add a temporaty role to this User's Role Set.
|
boolean |
authenticate(java.lang.String thePassword)
Authenticate the user
|
boolean |
equals(java.lang.Object other) |
protected Address |
getAddress() |
java.lang.String |
getAddress1()
Getter for address1
|
java.lang.String |
getAddress2()
Getter for address2
|
protected java.util.Set<Address> |
getAddresses()
Get the addresses
|
java.util.Set |
getAssociatedServerGroups()
Retrieves the set of server groups associated
to this user.
|
java.lang.String |
getCity()
Getter for city
|
java.lang.String |
getCompany()
Gets the current value of company
|
java.lang.String |
getCountry()
Getter for country
|
char |
getCsvSeparator()
Gets the current value of csvSeparator
|
java.util.Set |
getDefaultSystemGroupIds()
Gets the Set of SystemGroup IDs (Long) associated with this User.
|
java.lang.String |
getEmail()
Gets the current value of email
|
int |
getEmailNotify()
Gets the current value of emailNotify
|
EnterpriseUser |
getEnterpriseUser()
Get the EnterpriseUser
|
java.lang.String |
getFax()
Gets the current value of fax
|
java.lang.String |
getFirstNames()
Gets the current value of firstNames
|
protected java.util.Set<UserGroupMembers> |
getGroupMembers()
get the set of user group members
|
java.util.Set |
getHiddenPanes()
Retrieves the set of Pane object instances
This method retrieves the
|
java.lang.Long |
getId()
Gets the current value of id
|
java.lang.String |
getIsPoBox()
Getter for isPoBox
|
java.util.Date |
getLastLoggedIn()
Gets the current value of lastLoggedIn
|
java.lang.String |
getLastName()
Gets the current value of lastName
|
java.lang.String |
getLogin()
Gets the current value of login
|
java.lang.String |
getLoginUc()
Gets the current value of loginUc
|
Org |
getOrg()
helper method to get the associated Org for the user
|
int |
getPageSize()
Gets the current value of pageSize
|
java.lang.String |
getPassword()
Gets the current value of password
|
java.util.Set<Role> |
getPermanentRoles()
Gets the permanent roles assigned to this user.
|
protected PersonalInfo |
getPersonalInfo()
Return the PersonalInfo object
|
java.lang.String |
getPhone()
Gets the current value of phone
|
java.lang.String |
getPreferredLocale()
Returns the user's preferred locale
|
java.lang.String |
getPrefix()
Gets the current value of prefix
|
java.util.Set<Role> |
getRoles()
Gets the roles assigned to this user.
|
java.util.Set<Server> |
getServers()
Returns the set of Server's this user has permissions to manage.
|
java.lang.String |
getShowSystemGroupList()
Gets the current value of showSystemGroupList
|
java.lang.String |
getState()
Getter for state
|
java.util.Set |
getStateChanges()
Returns the set of state changes for a user.
|
boolean |
getTaskoNotify() |
java.util.Set<Role> |
getTemporaryRoles()
Gets the temporary roles assigned to this user.
|
RhnTimeZone |
getTimeZone()
Gets the current timezone
|
java.lang.String |
getTitle()
Gets the current value of title
|
boolean |
getUsePamAuthentication()
Gets the current value of usePamAuthentication
|
protected java.util.Set<UserGroup> |
getUserGroups()
get the set of usergroups
|
UserInfo |
getUserInfo()
Get the UserInfo sub object
|
java.lang.String |
getZip()
Getter for zip
|
int |
hashCode() |
boolean |
hasPermanentRole(Role label)
Check to see if this user has the passed in label
in the Collection of permanent Roles assigned to this user
|
boolean |
hasRole(Role label)
Check to see if this user has the passed in label
in the Collection of Roles assigned to this user
|
boolean |
hasTemporaryRole(Role label) |
boolean |
isDisabled()
Convenience method to determine whether a user is disabled
or not
|
boolean |
isReadOnly() |
void |
removePermanentRole(Role label)
Remove a role from the User's Role Set.
|
void |
removeServer(Server server)
Remover permission for the user to manage this server.
|
void |
removeTemporaryRole(Role label)
Remove a temporary role from the User's Role Set.
|
void |
resetWasOrgAdmin()
Reset the wasOrgAdmin value.
|
protected void |
setAddress(Address addIn) |
void |
setAddress1(java.lang.String address1In)
Setter for address1
|
void |
setAddress2(java.lang.String address2In)
Setter for address2
|
protected void |
setAddresses(java.util.Set<Address> s)
Set the addresses.
|
protected void |
setAssociatedServerGroups(java.util.Set serverGroups)
Sets the associatedServerGroups..
|
void |
setCity(java.lang.String cityIn)
Setter for city
|
void |
setCompany(java.lang.String companyIn)
Sets the value of company to new value
|
void |
setCountry(java.lang.String countryIn)
Setter for country
|
void |
setCsvSeparator(char csvSeparator)
Sets the current value of csvSeparator
|
void |
setDefaultSystemGroupIds(java.util.Set dsg)
Updates the User's Default System groups.
|
void |
setEmail(java.lang.String emailIn)
Sets the value of email to new value
|
void |
setEmailNotify(int emailNotifyIn)
Sets the value of emailNotify to new value
|
void |
setFax(java.lang.String faxIn)
Sets the value of fax to new value
|
void |
setFirstNames(java.lang.String firstNamesIn)
Sets the value of firstNames to new value
|
protected void |
setGroupMembers(java.util.Set<UserGroupMembers> ugIn)
Set the user group members set
|
void |
setHiddenPanes(java.util.Set p)
Sets the set of PaneObjects instances.
|
void |
setId(java.lang.Long idIn)
Sets the value of id to new value
|
void |
setIsPoBox(java.lang.String isPoBoxIn)
Setter for isPoBox
|
void |
setLastLoggedIn(java.util.Date lastLoggedInIn)
Sets the value of lastLoggedIn to new value
|
void |
setLastName(java.lang.String lastNameIn)
Sets the value of lastName to new value
|
void |
setLogin(java.lang.String loginIn)
Sets the value of login to new value
|
void |
setLoginUc(java.lang.String loginUcIn)
Sets the value of loginUc to new value
|
void |
setOrg(Org orgIn)
Associates the user with an Org.
|
void |
setPageSize(int pageSizeIn)
Sets the value of pageSize to new value
|
void |
setPassword(java.lang.String passwordIn)
Sets the value of password to new value
|
protected void |
setPersonalInfo(PersonalInfo persIn)
Set the PersonalInfo object
|
void |
setPhone(java.lang.String phoneIn)
Sets the value of phone to new value
|
void |
setPreferredLocale(java.lang.String locale)
Sets the user's preferred locale
|
void |
setPrefix(java.lang.String prefixIn)
Sets the value of prefix to new value
|
void |
setRawPassword(java.lang.String passwordIn)
Sets the value of password as is to new value, no encryption
|
void |
setReadOnly(boolean readOnlyIn) |
void |
setShowSystemGroupList(java.lang.String showSystemGroupListIn)
Sets the value of showSystemGroupList to new value
|
void |
setState(java.lang.String stateIn)
Setter for state
|
void |
setStateChanges(java.util.Set s) |
void |
setTaskoNotify(boolean taskoNotifyIn) |
void |
setTimeZone(RhnTimeZone timeZoneIn)
Sets the current timezone
|
void |
setTitle(java.lang.String titleIn)
Sets the value of title to new value
|
void |
setUsePamAuthentication(boolean usePamAuthenticationIn)
Sets the value of usePamAuthentication to new value
|
protected void |
setUserInfo(UserInfo infoIn)
Set the UserInfo object
|
void |
setZip(java.lang.String zipIn)
Setter for zip
|
java.lang.String |
toString()
Output User to String for debugging
|
java.lang.Boolean |
wasOrgAdmin()
Determine if this was org admin.
|
getCreated, getModified, setCreated, setModified
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getCreated, getModified, setCreated, setModified
public java.lang.Long getId()
public void setId(java.lang.Long idIn)
public java.lang.String getLogin()
public void setLogin(java.lang.String loginIn)
public java.lang.String getLoginUc()
getLoginUc
in interface User
public void setLoginUc(java.lang.String loginUcIn)
setLoginUc
in interface User
loginUcIn
- New value for loginUcpublic java.lang.String getPassword()
getPassword
in interface User
public void setRawPassword(java.lang.String passwordIn)
setRawPassword
in interface User
passwordIn
- New raw value for passwordpublic void setPassword(java.lang.String passwordIn)
setPassword
in interface User
passwordIn
- New value for passwordprotected void setGroupMembers(java.util.Set<UserGroupMembers> ugIn)
ugIn
- The new Set of UserGroupMembers to setprotected java.util.Set<UserGroup> getUserGroups()
protected java.util.Set<UserGroupMembers> getGroupMembers()
public java.util.Set<Role> getRoles()
Collections.unmodifiableMap(java.util.Map<? extends K, ? extends V>)
in order to enforce the rule that roles are not changeable
during runtime.
If this requirement changes then we will need to remove this
restriction later.public java.util.Set<Role> getTemporaryRoles()
getTemporaryRoles
in interface User
public java.util.Set<Role> getPermanentRoles()
getPermanentRoles
in interface User
public boolean hasRole(Role label)
public boolean hasTemporaryRole(Role label)
public boolean hasPermanentRole(Role label)
hasPermanentRole
in interface User
label
- the label used to lookuppublic void addTemporaryRole(Role label)
addTemporaryRole
in interface User
label
- The label of the temporary Role you want to add.public void addPermanentRole(Role label)
addPermanentRole
in interface User
label
- The label of the Role you want to add.public void removeTemporaryRole(Role label)
removeTemporaryRole
in interface User
label
- The label of the temporary Role you want to remove.public void removePermanentRole(Role label)
removePermanentRole
in interface User
label
- The label of the Role you want to remove.public java.lang.Boolean wasOrgAdmin()
public void resetWasOrgAdmin()
public boolean authenticate(java.lang.String thePassword)
authenticate
in interface User
thePassword
- password to check if matches against this User'spublic void setOrg(Org orgIn)
public Org getOrg()
public java.util.Set getDefaultSystemGroupIds()
getDefaultSystemGroupIds
in interface User
public void setDefaultSystemGroupIds(java.util.Set dsg)
setDefaultSystemGroupIds
in interface User
dsg
- Set of Long System Group IDsprotected PersonalInfo getPersonalInfo()
protected void setPersonalInfo(PersonalInfo persIn)
persIn
- the PersonalInfo objectprotected void setUserInfo(UserInfo infoIn)
infoIn
- the UserInfo objectpublic UserInfo getUserInfo()
public boolean isDisabled()
isDisabled
in interface User
public void addChange(StateChange change)
public java.util.Set getStateChanges()
getStateChanges
in interface User
public void setStateChanges(java.util.Set s)
s
- The stateChanges to set.public int getPageSize()
getPageSize
in interface User
public void setPageSize(int pageSizeIn)
setPageSize
in interface User
pageSizeIn
- New value for pageSizepublic boolean getUsePamAuthentication()
getUsePamAuthentication
in interface User
public void setUsePamAuthentication(boolean usePamAuthenticationIn)
setUsePamAuthentication
in interface User
usePamAuthenticationIn
- New value for usePamAuthenticationpublic java.lang.String getShowSystemGroupList()
getShowSystemGroupList
in interface User
public void setShowSystemGroupList(java.lang.String showSystemGroupListIn)
setShowSystemGroupList
in interface User
showSystemGroupListIn
- New value for showSystemGroupListpublic java.util.Date getLastLoggedIn()
getLastLoggedIn
in interface User
public void setLastLoggedIn(java.util.Date lastLoggedInIn)
setLastLoggedIn
in interface User
lastLoggedInIn
- New value for lastLoggedInpublic void setPreferredLocale(java.lang.String locale)
setPreferredLocale
in interface User
locale
- overrides browser localepublic java.lang.String getPreferredLocale()
getPreferredLocale
in interface User
public void setCsvSeparator(char csvSeparator)
setCsvSeparator
in interface User
csvSeparator
- New value for csvSeparatorpublic char getCsvSeparator()
getCsvSeparator
in interface User
public java.lang.String getPrefix()
public void setPrefix(java.lang.String prefixIn)
public java.lang.String getFirstNames()
getFirstNames
in interface User
public void setFirstNames(java.lang.String firstNamesIn)
setFirstNames
in interface User
firstNamesIn
- New value for firstNamespublic java.lang.String getLastName()
getLastName
in interface User
public void setLastName(java.lang.String lastNameIn)
setLastName
in interface User
lastNameIn
- New value for lastNamepublic java.lang.String getCompany()
getCompany
in interface User
public void setCompany(java.lang.String companyIn)
setCompany
in interface User
companyIn
- New value for companypublic java.lang.String getTitle()
public void setTitle(java.lang.String titleIn)
public java.lang.String getPhone()
public void setPhone(java.lang.String phoneIn)
public java.lang.String getFax()
public void setFax(java.lang.String faxIn)
public java.lang.String getEmail()
public void setEmail(java.lang.String emailIn)
public RhnTimeZone getTimeZone()
getTimeZone
in interface User
public void setTimeZone(RhnTimeZone timeZoneIn)
setTimeZone
in interface User
timeZoneIn
- The timezone to be setpublic java.lang.String toString()
toString
in class BaseDomainHelper
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getAddress1()
getAddress1
in interface User
public void setAddress1(java.lang.String address1In)
setAddress1
in interface User
address1In
- New value for address1public java.lang.String getAddress2()
getAddress2
in interface User
public void setAddress2(java.lang.String address2In)
setAddress2
in interface User
address2In
- New value for address2public java.lang.String getCity()
public void setCity(java.lang.String cityIn)
public java.lang.String getState()
public void setState(java.lang.String stateIn)
public java.lang.String getZip()
public void setZip(java.lang.String zipIn)
public java.lang.String getCountry()
getCountry
in interface User
public void setCountry(java.lang.String countryIn)
setCountry
in interface User
countryIn
- New value for countrypublic java.lang.String getIsPoBox()
getIsPoBox
in interface User
public void setIsPoBox(java.lang.String isPoBoxIn)
setIsPoBox
in interface User
isPoBoxIn
- New value for isPoBoxpublic EnterpriseUser getEnterpriseUser()
getEnterpriseUser
in interface User
public java.util.Set getHiddenPanes()
getHiddenPanes
in interface User
public void setHiddenPanes(java.util.Set p)
setHiddenPanes
in interface User
p
- a set of pane objectsprotected void setAddress(Address addIn)
protected Address getAddress()
protected void setAddresses(java.util.Set<Address> s)
s
- the setprotected java.util.Set<Address> getAddresses()
public void setEmailNotify(int emailNotifyIn)
setEmailNotify
in interface User
emailNotifyIn
- New value for emailNotifypublic int getEmailNotify()
getEmailNotify
in interface User
public java.util.Set getAssociatedServerGroups()
getAssociatedServerGroups
in interface User
protected void setAssociatedServerGroups(java.util.Set serverGroups)
serverGroups
- the servergroups to set.public java.util.Set<Server> getServers()
getServers
in interface User
public void addServer(Server server)
public void removeServer(Server server)
removeServer
in interface User
server
- Server to remove permission for.public boolean isReadOnly()
isReadOnly
in interface User
public void setReadOnly(boolean readOnlyIn)
setReadOnly
in interface User
readOnlyIn
- readOnly to setpublic boolean getTaskoNotify()
getTaskoNotify
in interface User
public void setTaskoNotify(boolean taskoNotifyIn)
setTaskoNotify
in interface User
taskoNotifyIn
- tasko_notify to set