com.redhat.rhn.domain.user
Interface User

All Known Implementing Classes:
LegacyRhnUserImpl

public interface User

Class User that reflects the DB representation of web_contact and ancillary tables. DB table: web_contact


Method Summary
 void addChange(StateChange change)
          Add a change to the users stateChanges set
 void addRole(Role label)
          Add a role to this User's Role Set.
 void addServer(Server server)
          Give this user permission to manage a server.
 boolean authenticate(java.lang.String thePassword)
          Authenticate the user
 java.lang.String getAddress1()
          Getter for address1
 java.lang.String getAddress2()
          Getter for address2
 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()
           
 java.lang.String getCountry()
          Getter for country
 java.util.Date getCreated()
          Gets the current value of created
 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()
          Getter for fax
 java.lang.String getFirstNames()
          Gets the current value of firstNames
 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
 java.util.Date getModified()
          Gets the current value of modified
 java.util.Set getNotificationMethods()
          Get the notification methods set
 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.lang.String getPhone()
          Getter for 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 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.
 RhnTimeZone getTimeZone()
          Gets the current timezone
 java.lang.String getTitle()
          Gets the current value of title
 boolean getUsePamAuthentication()
          Gets the current value of usePamAuthentication
 java.lang.String getZip()
          Getter for zip
 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 isDisabled()
          Tells whether or not a user is disabled
 void removeRole(Role label)
          Remove a role to this User's Role Set.
 void removeServer(Server server)
          Remover permission for the user to manage this server.
 void setAddress1(java.lang.String address1In)
          Setter for address1
 void setAddress2(java.lang.String address2In)
          Setter for address2
 void setCity(java.lang.String cityIn)
          Setter for city
 void setCompany(java.lang.String companyIn)
           
 void setCountry(java.lang.String countryIn)
          Setter for country
 void setCreated(java.util.Date createdIn)
          Sets the value of created to new value
 void setDefaultSystemGroupIds(java.util.Set groups)
          Updates the User's Default System groups.
 void setEmail(java.lang.String emailIn)
          Sets the email value
 void setEmailNotify(int emailNotifyIn)
          Sets the value of emailNotify to new value
 void setFax(java.lang.String faxIn)
          Setter for fax
 void setFirstNames(java.lang.String firstNamesIn)
          Sets the value of firstNames to new value
 void setHiddenPanes(java.util.Set panes)
          Sets the set of PaneObjects instances.
 void setId(java.lang.Long l)
          Set the current value of id
 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 setModified(java.util.Date modifiedIn)
          Set the value of the modified date.
 void setNotificationMethods(java.util.Set methodsIn)
          Set the notification method set.
 void setOrg(Org orgIn)
          set the org of this user
 void setPageSize(int pageSizeIn)
          Sets the value of pageSize to new value
 void setPassword(java.lang.String passwordIn)
          Sets the password.
 void setPhone(java.lang.String phoneIn)
          Setter for phone
 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 setShowSystemGroupList(java.lang.String showSystemGroupListIn)
          Sets the value of showSystemGroupList to new value
 void setState(java.lang.String stateIn)
          Setter for state
 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
 void setZip(java.lang.String zipIn)
          Setter for zip
 

Method Detail

getId

java.lang.Long getId()
Gets the current value of id

Returns:
long the current value

setId

void setId(java.lang.Long l)
Set the current value of id

Parameters:
l - long value

getCreated

java.util.Date getCreated()
Gets the current value of created

Returns:
Date the current value

setCreated

void setCreated(java.util.Date createdIn)
Sets the value of created to new value

Parameters:
createdIn - New value for created

getModified

java.util.Date getModified()
Gets the current value of modified

Returns:
Date the modified date

setModified

void setModified(java.util.Date modifiedIn)
Set the value of the modified date.

Parameters:
modifiedIn - new value for modified

getPageSize

int getPageSize()
Gets the current value of pageSize

Returns:
int the current value

setPageSize

void setPageSize(int pageSizeIn)
Sets the value of pageSize to new value

Parameters:
pageSizeIn - New value for pageSize

getUsePamAuthentication

boolean getUsePamAuthentication()
Gets the current value of usePamAuthentication

Returns:
String the current value

setUsePamAuthentication

void setUsePamAuthentication(boolean usePamAuthenticationIn)
Sets the value of usePamAuthentication to new value

Parameters:
usePamAuthenticationIn - New value for usePamAuthentication

getShowSystemGroupList

java.lang.String getShowSystemGroupList()
Gets the current value of showSystemGroupList

Returns:
String the current value

setShowSystemGroupList

void setShowSystemGroupList(java.lang.String showSystemGroupListIn)
Sets the value of showSystemGroupList to new value

Parameters:
showSystemGroupListIn - New value for showSystemGroupList

getRoles

java.util.Set<Role> getRoles()
Gets the roles assigned to this user. The Map returned from this method has been decorated with a call to Collections.unmodifiableMap(java.util.Map) 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.

Returns:
Set of Roles that this user has

hasRole

boolean hasRole(Role label)
Check to see if this user has the passed in label in the Collection of Roles assigned to this user

Parameters:
label - the label used to lookup
Returns:
if the user has the role assigned or not.

addRole

void addRole(Role label)
Add a role to this User's Role Set.

Parameters:
label - The label of the Role you want to add.

removeRole

void removeRole(Role label)
Remove a role to this User's Role Set.

Parameters:
label - The label of the Role you want to remove.

authenticate

boolean authenticate(java.lang.String thePassword)
Authenticate the user

Parameters:
thePassword - password to check if matches against this User's
Returns:
boolean if the password is correct

getOrg

Org getOrg()
helper method to get the associated Org for the user

Returns:
Org associated with this User

setOrg

void setOrg(Org orgIn)
set the org of this user

Parameters:
orgIn - to set

getDefaultSystemGroupIds

java.util.Set getDefaultSystemGroupIds()
Gets the Set of SystemGroup IDs (Long) associated with this User.

Returns:
Set the current value

setDefaultSystemGroupIds

void setDefaultSystemGroupIds(java.util.Set groups)
Updates the User's Default System groups. This

Parameters:
groups - Set of Long System Group IDs

isDisabled

boolean isDisabled()
Tells whether or not a user is disabled

Returns:
Returns true if the user is disabled

addChange

void addChange(StateChange change)
Add a change to the users stateChanges set

Parameters:
change - The change to add

getStateChanges

java.util.Set getStateChanges()
Returns the set of state changes for a user. These consist of disable/enable events in rhnWebContactChangeLog

Returns:
Returns the set of stateChanges

setNotificationMethods

void setNotificationMethods(java.util.Set methodsIn)
Set the notification method set.

Parameters:
methodsIn - notification methods

getNotificationMethods

java.util.Set getNotificationMethods()
Get the notification methods set

Returns:
Set notification methods

getLogin

java.lang.String getLogin()
Gets the current value of login

Returns:
String the current value

setLogin

void setLogin(java.lang.String loginIn)
Sets the value of login to new value

Parameters:
loginIn - New value for login

getLoginUc

java.lang.String getLoginUc()
Gets the current value of loginUc

Returns:
String the current value

setLoginUc

void setLoginUc(java.lang.String loginUcIn)
Sets the value of loginUc to new value

Parameters:
loginUcIn - New value for loginUc

getPassword

java.lang.String getPassword()
Gets the current value of password

Returns:
String the current value

setPassword

void setPassword(java.lang.String passwordIn)
Sets the password.

Parameters:
passwordIn - the password to set

getLastLoggedIn

java.util.Date getLastLoggedIn()
Gets the current value of lastLoggedIn

Returns:
Date the current value

setLastLoggedIn

void setLastLoggedIn(java.util.Date lastLoggedInIn)
Sets the value of lastLoggedIn to new value

Parameters:
lastLoggedInIn - New value for lastLoggedIn

getPrefix

java.lang.String getPrefix()
Gets the current value of prefix

Returns:
String the current value

setPrefix

void setPrefix(java.lang.String prefixIn)
Sets the value of prefix to new value

Parameters:
prefixIn - New value for prefix

getFirstNames

java.lang.String getFirstNames()
Gets the current value of firstNames

Returns:
String the current value

setFirstNames

void setFirstNames(java.lang.String firstNamesIn)
Sets the value of firstNames to new value

Parameters:
firstNamesIn - New value for firstNames

getLastName

java.lang.String getLastName()
Gets the current value of lastName

Returns:
String the current value

setLastName

void setLastName(java.lang.String lastNameIn)
Sets the value of lastName to new value

Parameters:
lastNameIn - New value for lastName

getTitle

java.lang.String getTitle()
Gets the current value of title

Returns:
String the current value

setTitle

void setTitle(java.lang.String titleIn)
Sets the value of title to new value

Parameters:
titleIn - New value for title

getEmail

java.lang.String getEmail()
Gets the current value of email

Returns:
String the current value

setEmail

void setEmail(java.lang.String emailIn)
Sets the email value

Parameters:
emailIn - the email value to set

getTimeZone

RhnTimeZone getTimeZone()
Gets the current timezone

Returns:
the current timezone

setTimeZone

void setTimeZone(RhnTimeZone timeZoneIn)
Sets the current timezone

Parameters:
timeZoneIn - The timezone to be set

setCompany

void setCompany(java.lang.String companyIn)
Parameters:
companyIn - the company value

getCompany

java.lang.String getCompany()
Returns:
returns the company value

getAddress1

java.lang.String getAddress1()
Getter for address1

Returns:
Address1

setAddress1

void setAddress1(java.lang.String address1In)
Setter for address1

Parameters:
address1In - New value for address1

getAddress2

java.lang.String getAddress2()
Getter for address2

Returns:
Address2

setAddress2

void setAddress2(java.lang.String address2In)
Setter for address2

Parameters:
address2In - New value for address2

getCity

java.lang.String getCity()
Getter for city

Returns:
City

setCity

void setCity(java.lang.String cityIn)
Setter for city

Parameters:
cityIn - New value for city

getState

java.lang.String getState()
Getter for state

Returns:
State

setState

void setState(java.lang.String stateIn)
Setter for state

Parameters:
stateIn - New value for state

getZip

java.lang.String getZip()
Getter for zip

Returns:
Zip

setZip

void setZip(java.lang.String zipIn)
Setter for zip

Parameters:
zipIn - New value for zip

getCountry

java.lang.String getCountry()
Getter for country

Returns:
Country

setCountry

void setCountry(java.lang.String countryIn)
Setter for country

Parameters:
countryIn - New value for country

getPhone

java.lang.String getPhone()
Getter for phone

Returns:
Phone

setPhone

void setPhone(java.lang.String phoneIn)
Setter for phone

Parameters:
phoneIn - New value for phone

getFax

java.lang.String getFax()
Getter for fax

Returns:
Fax

setFax

void setFax(java.lang.String faxIn)
Setter for fax

Parameters:
faxIn - New value for fax

getIsPoBox

java.lang.String getIsPoBox()
Getter for isPoBox

Returns:
isPoBox

setIsPoBox

void setIsPoBox(java.lang.String isPoBoxIn)
Setter for isPoBox

Parameters:
isPoBoxIn - New value for isPoBox

getEnterpriseUser

EnterpriseUser getEnterpriseUser()
Get the EnterpriseUser

Returns:
enterprise user

getHiddenPanes

java.util.Set getHiddenPanes()
Retrieves the set of Pane object instances This method retrieves the

Returns:
Set of panes used by the user

setHiddenPanes

void setHiddenPanes(java.util.Set panes)
Sets the set of PaneObjects instances.

Parameters:
panes - a set of pane objects

getPreferredLocale

java.lang.String getPreferredLocale()
Returns the user's preferred locale

Returns:
String locale

setPreferredLocale

void setPreferredLocale(java.lang.String locale)
Sets the user's preferred locale

Parameters:
locale - overrides browser locale

setEmailNotify

void setEmailNotify(int emailNotifyIn)
Sets the value of emailNotify to new value

Parameters:
emailNotifyIn - New value for emailNotify

getEmailNotify

int getEmailNotify()
Gets the current value of emailNotify

Returns:
int the current value

getAssociatedServerGroups

java.util.Set getAssociatedServerGroups()
Retrieves the set of server groups associated to this user. Note: this is NOT getAllServerGroups this is getAssociatedServerGroups Subtle difference here is, if the user is an ORG Admin the return value is an empty list, since all the servergroups are implicitly subscribed. In DB terms the list here directly maps to rhnUserServerGroupPerms

Returns:
set of server groups

getServers

java.util.Set getServers()
Returns the set of Server's this user has permissions to manage.

Returns:
set of servers

addServer

void addServer(Server server)
Give this user permission to manage a server.

Parameters:
server - Server to add permission for.

removeServer

void removeServer(Server server)
Remover permission for the user to manage this server.

Parameters:
server - Server to remove permission for.