imcode.server.user
Class UserDomainObject

java.lang.Object
  extended by imcode.server.user.UserDomainObject
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class UserDomainObject
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

See Also:
Serialized Form

Field Summary
static int DEFAULT_USER_ID
           
protected  int id
           
protected  RoleIds userAdminRoleIds
           
 
Constructor Summary
UserDomainObject()
           
UserDomainObject(int id)
           
 
Method Summary
 void addPhoneNumber(PhoneNumber number)
           
 void addRoleId(RoleId role)
           
 boolean canAccess(DocumentDomainObject document)
           
 boolean canAccessAdminPages()
           
 boolean canAddDocumentToAnyMenu(DocumentDomainObject document)
           
 boolean canCreateDocumentOfTypeIdFromParent(int documentTypeId, DocumentDomainObject parent)
           
 boolean canDefineRestrictedOneFor(DocumentDomainObject document)
           
 boolean canDefineRestrictedTwoFor(DocumentDomainObject document)
           
 boolean canEdit(DocumentDomainObject document)
           
 boolean canEdit(UserDomainObject editedUser)
           
 boolean canEditAsUserAdmin(UserDomainObject editedUser)
           
 boolean canEditDocumentInformationFor(DocumentDomainObject document)
           
 boolean canEditPermissionsFor(DocumentDomainObject document)
           
 boolean canEditRolesAccordingToUserAdminRoles(UserDomainObject editedUser)
           
 boolean canEditRolesFor(UserDomainObject editedUser)
           
 boolean canSearchFor(DocumentDomainObject document)
           
 boolean canSeeDocumentInMenus(DocumentDomainObject document)
           
 boolean canSeeDocumentWhenEditingMenus(DocumentDomainObject document)
           
 boolean canSetDocumentPermissionSetTypeForRoleIdOnDocument(DocumentPermissionSetTypeDomainObject documentPermissionSetType, RoleId roleId, DocumentDomainObject document)
           
 java.lang.Object clone()
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getAddress()
          get address
 java.lang.String getCity()
          get city
 java.lang.String getCompany()
          get company
 java.lang.String getCountry()
          get country
 java.util.Date getCreateDate()
          get create_date
 java.lang.String getCurrentContextPath()
           
 DocumentPermissionSetTypeDomainObject getDocumentPermissionSetTypeFor(DocumentDomainObject document)
           
 DocumentShowSettings getDocumentShowSettings()
           
 java.lang.String getEmailAddress()
          Return the users e-mail address
 java.lang.String getFaxPhone()
          Deprecated. Use getPhoneNumbersOfType(PhoneNumberType)
 java.lang.String getFirstName()
          get first name
 java.lang.String getFullName()
          get full name
 java.lang.String getHomePhone()
          Deprecated. Use getPhoneNumbersOfType(PhoneNumberType)
 int getId()
          get user-id
 java.lang.String getLanguageIso639_2()
          Return the users language
 java.lang.String getLastName()
          get last name
 java.lang.String getLoginName()
          get login name (username)
 java.lang.String getMobilePhone()
          Deprecated. Use getPhoneNumbersOfType(PhoneNumberType)
 java.lang.String getOtherPhone()
          Deprecated. Use getPhoneNumbersOfType(PhoneNumberType)
 java.lang.String getPassword()
          get password
 DocumentPermissionSetDomainObject getPermissionSetFor(DocumentDomainObject document)
           
 java.util.Set getPhoneNumbers()
           
 java.util.Set getPhoneNumbersOfType(PhoneNumberType phoneNumberType)
           
 java.lang.String getProvince()
           
 RoleId[] getRoleIds()
           
 java.lang.String getSessionId()
           
 TemplateGroupDomainObject getTemplateGroup()
          get template group
 java.lang.String getTitle()
          get title
 RoleId[] getUserAdminRoleIds()
           
 java.lang.String getWorkPhone()
          Deprecated.  
 java.lang.String getZip()
          get zip
 boolean hasAtLeastPermissionSetIdOn(DocumentPermissionSetTypeDomainObject leastPrivilegedPermissionSetIdWanted, DocumentDomainObject document)
           
 int hashCode()
           
 boolean hasRoleId(RoleId roleId)
           
 boolean hasRoleWithPermission(RolePermissionDomainObject rolePermission)
           
 boolean isActive()
          Check whether the user is allowed to log in
 boolean isDefaultUser()
           
 boolean isImcmsExternal()
           
 boolean isNew()
           
 boolean isSuperAdmin()
           
 boolean isSuperAdminOrHasAtLeastPermissionSetIdOn(DocumentPermissionSetTypeDomainObject documentPermissionSetType, DocumentDomainObject document)
           
 boolean isSuperAdminOrHasFullPermissionOn(DocumentDomainObject document)
           
 boolean isUserAdmin()
           
 boolean isUserAdminAndCanEditAtLeastOneRole()
           
 boolean isUserAdminAndNotSuperAdmin()
           
 void removePhoneNumber(PhoneNumber number)
           
 void removeRoleId(RoleId roleId)
           
 void removeUserAdminRoleId(RoleId role)
           
 void replacePhoneNumbersOfType(java.lang.String number, PhoneNumberType type)
           
 void setActive(boolean active)
          Set whether the user is allowed to log in
 void setAddress(java.lang.String address)
          set address
 void setCity(java.lang.String city)
          set city
 void setCompany(java.lang.String company)
          set company
 void setCountry(java.lang.String country)
          set country
 void setCreateDate(java.util.Date createDate)
          set create_date
 void setCurrentContextPath(java.lang.String currentContextPath)
           
 void setDocumentShowSettings(DocumentShowSettings documentShowSettings)
           
 void setEmailAddress(java.lang.String emailAddress)
          Set the users e-mail address
 void setFaxPhone(java.lang.String faxphone)
          Deprecated. Use addPhoneNumber(PhoneNumber)
 void setFirstName(java.lang.String firstName)
          set first name
 void setHomePhone(java.lang.String homephone)
          Deprecated. Use addPhoneNumber(PhoneNumber)
 void setId(int id)
          set user-id
 void setImcmsExternal(boolean imcmsExternal)
           
 void setLanguageIso639_2(java.lang.String languageIso639_2)
          Set the users language
 void setLastName(java.lang.String lastName)
          set last name
 void setLoginName(java.lang.String loginName)
          set login name (username)
 void setMobilePhone(java.lang.String mobilephone)
          Deprecated. Use addPhoneNumber(PhoneNumber)
 void setOtherPhone(java.lang.String otherphone)
          Deprecated. Use addPhoneNumber(PhoneNumber)
 void setPassword(java.lang.String password)
          set password
 void setProvince(java.lang.String province)
           
 void setRoleIds(RoleId[] roleIds)
           
 void setSessionId(java.lang.String sessionId)
           
 void setTemplateGroup(TemplateGroupDomainObject templateGroup)
          set template group
 void setTitle(java.lang.String title)
          set title
 void setUserAdminRolesIds(RoleId[] userAdminRoleReferences)
           
 void setWorkPhone(java.lang.String workphone)
          Deprecated. Use addPhoneNumber(PhoneNumber)
 void setZip(java.lang.String zip)
          set zip
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_USER_ID

public static final int DEFAULT_USER_ID
See Also:
Constant Field Values

id

protected int id

userAdminRoleIds

protected RoleIds userAdminRoleIds
Constructor Detail

UserDomainObject

public UserDomainObject()

UserDomainObject

public UserDomainObject(int id)
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getId

public int getId()
get user-id


setId

public void setId(int id)
set user-id


getLoginName

public java.lang.String getLoginName()
get login name (username)


setLoginName

public void setLoginName(java.lang.String loginName)
set login name (username)


getPassword

public java.lang.String getPassword()
get password


setPassword

public void setPassword(java.lang.String password)
set password


getFullName

public java.lang.String getFullName()
get full name


getFirstName

public java.lang.String getFirstName()
get first name


setFirstName

public void setFirstName(java.lang.String firstName)
set first name


getLastName

public java.lang.String getLastName()
get last name


setLastName

public void setLastName(java.lang.String lastName)
set last name


setTitle

public void setTitle(java.lang.String title)
set title


getTitle

public java.lang.String getTitle()
get title


setCompany

public void setCompany(java.lang.String company)
set company


getCompany

public java.lang.String getCompany()
get company


setAddress

public void setAddress(java.lang.String address)
set address


getAddress

public java.lang.String getAddress()
get address


setCity

public void setCity(java.lang.String city)
set city


getCity

public java.lang.String getCity()
get city


setZip

public void setZip(java.lang.String zip)
set zip


getZip

public java.lang.String getZip()
get zip


setCountry

public void setCountry(java.lang.String country)
set country


getCountry

public java.lang.String getCountry()
get country


setProvince

public void setProvince(java.lang.String province)

getProvince

public java.lang.String getProvince()

getEmailAddress

public java.lang.String getEmailAddress()
Return the users e-mail address


setEmailAddress

public void setEmailAddress(java.lang.String emailAddress)
Set the users e-mail address


getWorkPhone

public java.lang.String getWorkPhone()
Deprecated. 

Get the users workphone


getPhoneNumbersOfType

public java.util.Set getPhoneNumbersOfType(PhoneNumberType phoneNumberType)

setWorkPhone

public void setWorkPhone(java.lang.String workphone)
Deprecated. Use addPhoneNumber(PhoneNumber)

Set the users workphone


replacePhoneNumbersOfType

public void replacePhoneNumbersOfType(java.lang.String number,
                                      PhoneNumberType type)

getMobilePhone

public java.lang.String getMobilePhone()
Deprecated. Use getPhoneNumbersOfType(PhoneNumberType)

Get the users mobilephone


setMobilePhone

public void setMobilePhone(java.lang.String mobilephone)
Deprecated. Use addPhoneNumber(PhoneNumber)

Set the users mobilephone


getHomePhone

public java.lang.String getHomePhone()
Deprecated. Use getPhoneNumbersOfType(PhoneNumberType)

Get the users homephone


setHomePhone

public void setHomePhone(java.lang.String homephone)
Deprecated. Use addPhoneNumber(PhoneNumber)

Set the users homephone


getFaxPhone

public java.lang.String getFaxPhone()
Deprecated. Use getPhoneNumbersOfType(PhoneNumberType)

Get the users faxphone


setFaxPhone

public void setFaxPhone(java.lang.String faxphone)
Deprecated. Use addPhoneNumber(PhoneNumber)

Set the users faxpohne


getOtherPhone

public java.lang.String getOtherPhone()
Deprecated. Use getPhoneNumbersOfType(PhoneNumberType)

Get the users otherphone


setOtherPhone

public void setOtherPhone(java.lang.String otherphone)
Deprecated. Use addPhoneNumber(PhoneNumber)

Set the users otherpohne


setActive

public void setActive(boolean active)
Set whether the user is allowed to log in


isActive

public boolean isActive()
Check whether the user is allowed to log in


setCreateDate

public void setCreateDate(java.util.Date createDate)
set create_date

Parameters:
createDate -

getCreateDate

public java.util.Date getCreateDate()
get create_date


setTemplateGroup

public void setTemplateGroup(TemplateGroupDomainObject templateGroup)
set template group


getTemplateGroup

public TemplateGroupDomainObject getTemplateGroup()
get template group


getLanguageIso639_2

public java.lang.String getLanguageIso639_2()
Return the users language


setLanguageIso639_2

public void setLanguageIso639_2(java.lang.String languageIso639_2)
Set the users language


getSessionId

public java.lang.String getSessionId()

setSessionId

public void setSessionId(java.lang.String sessionId)

isImcmsExternal

public boolean isImcmsExternal()

setImcmsExternal

public void setImcmsExternal(boolean imcmsExternal)

addRoleId

public void addRoleId(RoleId role)

removeRoleId

public void removeRoleId(RoleId roleId)

setRoleIds

public void setRoleIds(RoleId[] roleIds)

hasRoleId

public boolean hasRoleId(RoleId roleId)

getRoleIds

public RoleId[] getRoleIds()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

isDefaultUser

public boolean isDefaultUser()

isSuperAdmin

public boolean isSuperAdmin()

isUserAdminAndCanEditAtLeastOneRole

public boolean isUserAdminAndCanEditAtLeastOneRole()

canEdit

public boolean canEdit(DocumentDomainObject document)

canAccess

public boolean canAccess(DocumentDomainObject document)

isSuperAdminOrHasFullPermissionOn

public boolean isSuperAdminOrHasFullPermissionOn(DocumentDomainObject document)

canDefineRestrictedOneFor

public boolean canDefineRestrictedOneFor(DocumentDomainObject document)

canDefineRestrictedTwoFor

public boolean canDefineRestrictedTwoFor(DocumentDomainObject document)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addPhoneNumber

public void addPhoneNumber(PhoneNumber number)

removePhoneNumber

public void removePhoneNumber(PhoneNumber number)

setCurrentContextPath

public void setCurrentContextPath(java.lang.String currentContextPath)

getCurrentContextPath

public java.lang.String getCurrentContextPath()

isSuperAdminOrHasAtLeastPermissionSetIdOn

public boolean isSuperAdminOrHasAtLeastPermissionSetIdOn(DocumentPermissionSetTypeDomainObject documentPermissionSetType,
                                                         DocumentDomainObject document)

canEditPermissionsFor

public boolean canEditPermissionsFor(DocumentDomainObject document)

canSetDocumentPermissionSetTypeForRoleIdOnDocument

public boolean canSetDocumentPermissionSetTypeForRoleIdOnDocument(DocumentPermissionSetTypeDomainObject documentPermissionSetType,
                                                                  RoleId roleId,
                                                                  DocumentDomainObject document)

canCreateDocumentOfTypeIdFromParent

public boolean canCreateDocumentOfTypeIdFromParent(int documentTypeId,
                                                   DocumentDomainObject parent)

getPermissionSetFor

public DocumentPermissionSetDomainObject getPermissionSetFor(DocumentDomainObject document)

getDocumentPermissionSetTypeFor

public DocumentPermissionSetTypeDomainObject getDocumentPermissionSetTypeFor(DocumentDomainObject document)

hasAtLeastPermissionSetIdOn

public boolean hasAtLeastPermissionSetIdOn(DocumentPermissionSetTypeDomainObject leastPrivilegedPermissionSetIdWanted,
                                           DocumentDomainObject document)

canAddDocumentToAnyMenu

public boolean canAddDocumentToAnyMenu(DocumentDomainObject document)

canSearchFor

public boolean canSearchFor(DocumentDomainObject document)

canEditDocumentInformationFor

public boolean canEditDocumentInformationFor(DocumentDomainObject document)

canAccessAdminPages

public boolean canAccessAdminPages()

hasRoleWithPermission

public boolean hasRoleWithPermission(RolePermissionDomainObject rolePermission)

canSeeDocumentInMenus

public boolean canSeeDocumentInMenus(DocumentDomainObject document)

canSeeDocumentWhenEditingMenus

public boolean canSeeDocumentWhenEditingMenus(DocumentDomainObject document)

getPhoneNumbers

public java.util.Set getPhoneNumbers()

getUserAdminRoleIds

public RoleId[] getUserAdminRoleIds()

setUserAdminRolesIds

public void setUserAdminRolesIds(RoleId[] userAdminRoleReferences)

isUserAdminAndNotSuperAdmin

public boolean isUserAdminAndNotSuperAdmin()

canEditRolesFor

public boolean canEditRolesFor(UserDomainObject editedUser)

removeUserAdminRoleId

public void removeUserAdminRoleId(RoleId role)

canEdit

public boolean canEdit(UserDomainObject editedUser)

canEditAsUserAdmin

public boolean canEditAsUserAdmin(UserDomainObject editedUser)

canEditRolesAccordingToUserAdminRoles

public boolean canEditRolesAccordingToUserAdminRoles(UserDomainObject editedUser)

isUserAdmin

public boolean isUserAdmin()

isNew

public boolean isNew()

getDocumentShowSettings

public DocumentShowSettings getDocumentShowSettings()

setDocumentShowSettings

public void setDocumentShowSettings(DocumentShowSettings documentShowSettings)