Package org.gitana.platform.client.principal

# Class DomainUserImpl

java.lang.Object
org.gitana.platform.support.GitanaObjectImpl
org.gitana.platform.client.document.DocumentImpl
org.gitana.platform.client.platform.AbstractPlatformDocumentImpl
org.gitana.platform.client.domain.AbstractDomainDocumentImpl
org.gitana.platform.client.principal.AbstractDomainPrincipalImpl
org.gitana.platform.client.principal.DomainUserImpl

All Implemented Interfaces:
  `Serializable`, `Principal`, `Attachable`, `Document`, `DomainDocument`, `PlatformDocument`, `DomainPrincipal`, `DomainUser`, `AccessControllable`, `Copyable`, `Referenceable`, `Selfable`, `TitleDescription`, `Transferable`, `TypedID`, `org.gitana.platform.GitanaObject`, `org.gitana.platform.JSONable`

public class DomainUserImpl extends AbstractDomainPrincipalImpl implements DomainUser

Author:
  uzi
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class org.gitana.platform.support.GitanaObjectImpl

`serialVersionUID`

### Fields inherited from interface org.gitana.platform.client.document.Document

`FIELD_ID, SYSTEM, SYSTEM_CREATED_BY, SYSTEM_CREATED_ON, SYSTEM_MODIFIED_BY, SYSTEM_MODIFIED_ON`

### Fields inherited from interface org.gitana.platform.client.principal.DomainPrincipal

`FIELD_AUTHORITIES, FIELD_NAME, FIELD_TYPE`

### Fields inherited from interface org.gitana.platform.client.principal.DomainUser

`FIELD_COMPANY_NAME, FIELD_DIRECTORY_ID, FIELD_EMAIL, FIELD_FIRST_NAME, FIELD_IDENTITY_ID, FIELD_LAST_NAME`

### Fields inherited from interface org.gitana.platform.client.support.TitleDescription

`FIELD_DESCRIPTION, FIELD_TITLE`

## Constructor Summary

Constructors
Constructor
Description
`DomainUserImpl(Domain domain, com.fasterxml.jackson.databind.node.ObjectNode obj, boolean isSaved)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getCompanyName()`
`String`
`getDirectoryId()`
`String`
`getEmail()`
`String`
`getFirstName()`
`String`
`getIdentityId()`
`String`
`getLastName()`
`String`
`getTypeId()`
`boolean`
`hasIdentity()`
`protected void`
`init()`
Sets the principal type to USER
`Directory`
`readDirectory()`
`Identity`
`readIdentity()`
`Person`
`readPerson(Branch branch)`
`Person`
`readPerson(Branch branch, boolean createIfNotFound)`
`void`
`setCompanyName(String companyName)`
Sets the company name.
`void`
`setEmail(String email)`
Sets the email.
`void`
`setFirstName(String firstName)`
Sets the first name.
`void`
`setLastName(String lastName)`
Sets the last name.

### Methods inherited from class org.gitana.platform.client.principal.AbstractDomainPrincipalImpl

`delete, deleteAttachment, deleteAttachment, downloadAttachment, downloadAttachment, getACL, getACL, getAuthorities, getAuthorityGrants, getDomainQualifiedId, getDomainQualifiedName, getDownloadUri, getName, getResourceUri, getType, grant, grant, hasAuthority, hasAuthority, hasPermission, hasPermission, listAttachments, listParentGroups, listParentGroups, reload, revoke, revoke, revokeAll, revokeAll, setName, setType, update, uploadAttachment, uploadAttachment, uploadAttachment, uploadAttachments, uploadAttachments`

### Methods inherited from class org.gitana.platform.client.domain.AbstractDomainDocumentImpl

`getDomain, getDomainId, ref`

### Methods inherited from class org.gitana.platform.client.platform.AbstractPlatformDocumentImpl

`copy, copy, copyAsync, copyAsync, exportArchive, exportArchive, exportArchive, getCluster, getDriver, getFactory, getPlatform, getPlatformId, getRemote, importArchive, importArchive, importArchive`

### Methods inherited from class org.gitana.platform.client.document.DocumentImpl

`dateCreated, dateModified, getCreatedBy, getDescription, getId, getModifiedBy, getSystemObject, getTitle, isSaved, mergeProperties, mergePropertyIfExists, reload, reload, setDescription, setId, setSaved, setTitle`

### Methods inherited from class org.gitana.platform.support.GitanaObjectImpl

`_objectGetFloat, _objectGetInt, _objectGetLong, _objectGetObject, _objectGetString, _objectSet, get, getArray, getAsJsonNode, getBigDecimal, getBoolean, getDouble, getInt, getLong, getObject, getObject, getString, has, putAll, putAll, putObject, remove, set, toJSON, toJSONString, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.gitana.platform.client.support.AccessControllable

`getACL, getACL, getAuthorityGrants, grant, grant, hasAuthority, hasAuthority, hasPermission, hasPermission, revoke, revoke, revokeAll, revokeAll`

### Methods inherited from interface org.gitana.platform.client.attachment.Attachable

`deleteAttachment, deleteAttachment, downloadAttachment, downloadAttachment, getDownloadUri, listAttachments, uploadAttachment, uploadAttachment, uploadAttachment, uploadAttachments, uploadAttachments`

### Methods inherited from interface org.gitana.platform.client.support.Copyable

`copy, copy, copyAsync, copyAsync`

### Methods inherited from interface org.gitana.platform.client.document.Document

`dateCreated, dateModified, getCreatedBy, getId, getModifiedBy, getSystemObject, isSaved, reload, reload, setId, setSaved`

### Methods inherited from interface org.gitana.platform.client.domain.DomainDocument

`getDomain`

### Methods inherited from interface org.gitana.platform.client.principal.DomainPrincipal

`getAuthorities, getDomainId, getDomainQualifiedId, getDomainQualifiedName, getName, getType, listParentGroups, listParentGroups, setName, setType`

### Methods inherited from interface org.gitana.platform.GitanaObject

`get, getArray, getAsJsonNode, getBigDecimal, getBoolean, getDouble, getInt, getLong, getObject, getObject, getString, has, putAll, putAll, remove, set`

### Methods inherited from interface org.gitana.platform.JSONable

`toJSON, toJSONString`

### Methods inherited from interface org.gitana.platform.client.platform.PlatformDocument

`getPlatform, getPlatformId`

### Methods inherited from interface java.security.Principal

`equals, hashCode, implies, toString`

### Methods inherited from interface org.gitana.platform.client.support.Referenceable

`ref`

### Methods inherited from interface org.gitana.platform.client.support.Selfable

`delete, reload, update`

### Methods inherited from interface org.gitana.platform.client.support.TitleDescription

`getDescription, getTitle, setDescription, setTitle`

### Methods inherited from interface org.gitana.platform.client.support.Transferable

`exportArchive, exportArchive, exportArchive, importArchive, importArchive, importArchive`

### Methods inherited from interface org.gitana.platform.client.support.TypedID

`getId`

## Constructor Details

### DomainUserImpl

public DomainUserImpl(Domain domain, com.fasterxml.jackson.databind.node.ObjectNode obj, boolean isSaved)

## Method Details

### init

protected void init()
Sets the principal type to USER

### getTypeId

public String getTypeId()

Specified by:
  `getTypeId` in interface `TypedID`

### getFirstName

public String getFirstName()

Specified by:
  `getFirstName` in interface `DomainUser`
Returns:
  first name

### setFirstName

public void setFirstName(String firstName)
Description copied from interface: `DomainUser`
Sets the first name.

Specified by:
  `setFirstName` in interface `DomainUser`
Parameters:
  `firstName` -

### getLastName

public String getLastName()

Specified by:
  `getLastName` in interface `DomainUser`
Returns:
  last name

### setLastName

public void setLastName(String lastName)
Description copied from interface: `DomainUser`
Sets the last name.

Specified by:
  `setLastName` in interface `DomainUser`
Parameters:
  `lastName` -

### getCompanyName

public String getCompanyName()

Specified by:
  `getCompanyName` in interface `DomainUser`
Returns:
  company name

### setCompanyName

public void setCompanyName(String companyName)
Description copied from interface: `DomainUser`
Sets the company name.

Specified by:
  `setCompanyName` in interface `DomainUser`
Parameters:
  `companyName` -

### getEmail

public String getEmail()

Specified by:
  `getEmail` in interface `DomainUser`
Returns:
  email

### setEmail

public void setEmail(String email)
Description copied from interface: `DomainUser`
Sets the email.

Specified by:
  `setEmail` in interface `DomainUser`
Parameters:
  `email` -

### readPerson

public Person readPerson(Branch branch)

Specified by:
  `readPerson` in interface `DomainUser`

### readPerson

public Person readPerson(Branch branch, boolean createIfNotFound)

Specified by:
  `readPerson` in interface `DomainUser`

### hasIdentity

public boolean hasIdentity()

Specified by:
  `hasIdentity` in interface `DomainUser`

### getDirectoryId

public String getDirectoryId()

Specified by:
  `getDirectoryId` in interface `DomainUser`

### getIdentityId

public String getIdentityId()

Specified by:
  `getIdentityId` in interface `DomainUser`

### readDirectory

public Directory readDirectory()

Specified by:
  `readDirectory` in interface `DomainUser`

### readIdentity

public Identity readIdentity()

Specified by:
  `readIdentity` in interface `DomainUser`