Package org.gitana.platform.client.application

# Class ApplicationImpl

java.lang.Object
org.gitana.platform.support.GitanaObjectImpl
org.gitana.platform.client.document.DocumentImpl
org.gitana.platform.client.datastore.AbstractDataStoreImpl
org.gitana.platform.client.cluster.AbstractClusterDataStoreImpl
org.gitana.platform.client.platform.AbstractPlatformDataStoreImpl
org.gitana.platform.client.application.ApplicationImpl

All Implemented Interfaces:
  `Serializable`, `Application`, `ClusterDataStore`, `DataStore`, `Document`, `PlatformDataStore`, `AccessControllable`, `Copyable`, `Referenceable`, `Selfable`, `TitleDescription`, `Transferable`, `TypedID`, `Teamable`, `org.gitana.platform.GitanaObject`, `org.gitana.platform.JSONable`

public class ApplicationImpl extends AbstractPlatformDataStoreImpl implements Application

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.application.Application

`FIELD_DEPLOYMENT_AUTH_GRANT_ID, FIELD_DEPLOYMENT_CLIENT_ID, FIELD_DEPLOYMENT_DOMAIN, FIELD_DEPLOYMENT_SUBDOMAIN, FIELD_DEPLOYMENT_WEBHOST, FIELD_DEPLOYMENTS, FIELD_KEY, FIELD_SOURCE, FIELD_SOURCE_PUBLIC, FIELD_SOURCE_TYPE, FIELD_SOURCE_URI`

### 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.support.TitleDescription

`FIELD_DESCRIPTION, FIELD_TITLE`

## Constructor Summary

Constructors
Constructor
Description
`ApplicationImpl(Platform platform, com.fasterxml.jackson.databind.node.ObjectNode obj, boolean isSaved)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addDeployment(String key, String webhost, String subdomain, String domain, com.fasterxml.jackson.databind.node.ObjectNode config)`
`Email`
`createEmail()`
`Email`
`createEmail(com.fasterxml.jackson.databind.node.ObjectNode object)`
`Email`
`createEmail(DomainUser to, String subject, String body, String fromEmailAddress)`
`Email`
`createEmail(DomainUser to, String subject, String body, String fromEmailAddress, String ccEmailAddresses, String bccEmailAddresses)`
`Email`
`createEmail(DomainUser to, String subject, Node node, String attachmentId, String fromEmailAddress)`
`Email`
`createEmail(DomainUser to, String subject, Node node, String attachmentId, String fromEmailAddress, String ccEmailAddresses, String bccEmailAddresses)`
`EmailProvider`
`createEmailProvider()`
`EmailProvider`
`createEmailProvider(com.fasterxml.jackson.databind.node.ObjectNode object)`
`Registration`
`createRegistration(com.fasterxml.jackson.databind.node.ObjectNode object)`
`Registration`
`createRegistration(String email)`
`Settings`
`createSettings(com.fasterxml.jackson.databind.node.ObjectNode object)`
`void`
`deleteEmail(String emailId)`
`void`
`deleteEmail(Email email)`
`void`
`deleteEmailProvider(String emailProviderId)`
`void`
`deleteEmailProvider(EmailProvider emailProvider)`
`void`
`deleteRegistration(String registrationId)`
`void`
`deleteRegistration(Registration registration)`
`void`
`deleteSettings(String settingsId)`
`void`
`deleteSettings(Settings settings)`
`DeployedApplication`
`deploy(String deploymentKey)`
`DeployedApplication`
`findDeployed(String deploymentKey)`
`com.fasterxml.jackson.databind.node.ObjectNode`
`getDeployment(String key)`
`List<String>`
`getDeploymentKeys()`
`String`
`getKey()`
`String`
`getResourceUri()`
`boolean`
`getSourcePublic()`
`String`
`getSourceType()`
`String`
`getSourceUri()`
`String`
`getTypeId()`
`org.gitana.platform.support.ResultMap<EmailProvider>`
`listEmailProviders()`
`org.gitana.platform.support.ResultMap<EmailProvider>`
`listEmailProviders(org.gitana.platform.support.Pagination pagination)`
`org.gitana.platform.support.ResultMap<Email>`
`listEmails()`
`org.gitana.platform.support.ResultMap<Email>`
`listEmails(org.gitana.platform.support.Pagination pagination)`
`org.gitana.platform.support.ResultMap<Registration>`
`listRegistrations()`
`org.gitana.platform.support.ResultMap<Registration>`
`listRegistrations(org.gitana.platform.support.Pagination pagination)`
`org.gitana.platform.support.ResultMap<Settings>`
`listSettings()`
`org.gitana.platform.support.ResultMap<Settings>`
`listSettings(org.gitana.platform.support.Pagination pagination)`
`org.gitana.platform.support.ResultMap<EmailProvider>`
`queryEmailProviders(com.fasterxml.jackson.databind.node.ObjectNode query)`
`org.gitana.platform.support.ResultMap<EmailProvider>`
`queryEmailProviders(com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)`
`org.gitana.platform.support.ResultMap<Email>`
`queryEmails(com.fasterxml.jackson.databind.node.ObjectNode query)`
`org.gitana.platform.support.ResultMap<Email>`
`queryEmails(com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)`
`org.gitana.platform.support.ResultMap<Registration>`
`queryRegistrations(com.fasterxml.jackson.databind.node.ObjectNode query)`
`org.gitana.platform.support.ResultMap<Registration>`
`queryRegistrations(com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)`
`org.gitana.platform.support.ResultMap<Settings>`
`querySettings(com.fasterxml.jackson.databind.node.ObjectNode query)`
`org.gitana.platform.support.ResultMap<Settings>`
`querySettings(com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)`
`Map<String,Map<String,String>>`
`readApiKeys()`
`Map<String,String>`
`readApiKeys(String deploymentKey)`
`Settings`
`readApplicationPrincipalSettings(String domainId, String principalId)`
`Settings`
`readApplicationPrincipalSettings(DomainPrincipal principal)`
`Settings`
`readApplicationSettings()`
`Settings`
`readApplicationSettings(String scope, String key)`
`Email`
`readEmail(String emailId)`
`EmailProvider`
`readEmailProvider(String emailProviderId)`
`Registration`
`readRegistration(String registrationId)`
`Settings`
`readSettings(String settingsId)`
`void`
`reload()`
Reload
`void`
`removeDeployment(String key)`
`void`
`setKey(String key)`
`void`
`setSource(String type, boolean isPublic, String uri)`
`void`
`updateEmail(Email email)`
`void`
`updateEmailProvider(EmailProvider emailProvider)`
`void`
`updateRegistration(Registration registration)`
`void`
`updateSettings(Settings settings)`

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

`copy, copy, copyAsync, copyAsync, getPlatform, ref`

### Methods inherited from class org.gitana.platform.client.cluster.AbstractClusterDataStoreImpl

`getCluster`

### Methods inherited from class org.gitana.platform.client.datastore.AbstractDataStoreImpl

`createTeam, createTeam, delete, deleteTeam, equals, exportArchive, exportArchive, exportArchive, getACL, getACL, getAuthorityGrants, getDriver, getFactory, getId, getOwnersTeam, getRemote, getTeamableBaseUri, grant, grant, hasAuthority, hasAuthority, hasPermission, hasPermission, importArchive, importArchive, importArchive, listTeams, readTeam, revoke, revoke, revokeAll, revokeAll, update`

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

`dateCreated, dateModified, getCreatedBy, getDescription, 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, 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.application.Application

`getPlatform`

### Methods inherited from interface org.gitana.platform.client.cluster.ClusterDataStore

`getCluster`

### 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.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.support.Referenceable

`ref`

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

`delete, update`

### Methods inherited from interface org.gitana.platform.client.team.Teamable

`createTeam, createTeam, deleteTeam, getOwnersTeam, getTeamableBaseUri, listTeams, readTeam`

### 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

### ApplicationImpl

public ApplicationImpl(Platform platform, com.fasterxml.jackson.databind.node.ObjectNode obj, boolean isSaved)

## Method Details

### getTypeId

public String getTypeId()

Specified by:
  `getTypeId` in interface `TypedID`

### getResourceUri

public String getResourceUri()

Specified by:
  `getResourceUri` in class `AbstractDataStoreImpl`

### reload

public void reload()
Description copied from interface: `Selfable`
Reload

Specified by:
  `reload` in interface `Selfable`
Specified by:
  `reload` in class `AbstractDataStoreImpl`

### getKey

public String getKey()

Specified by:
  `getKey` in interface `Application`

### setKey

public void setKey(String key)

Specified by:
  `setKey` in interface `Application`

### readApplicationSettings

public Settings readApplicationSettings()

Specified by:
  `readApplicationSettings` in interface `Application`

### readApplicationSettings

public Settings readApplicationSettings(String scope, String key)

Specified by:
  `readApplicationSettings` in interface `Application`

### readApplicationPrincipalSettings

public Settings readApplicationPrincipalSettings(DomainPrincipal principal)

Specified by:
  `readApplicationPrincipalSettings` in interface `Application`

### readApplicationPrincipalSettings

public Settings readApplicationPrincipalSettings(String domainId, String principalId)

Specified by:
  `readApplicationPrincipalSettings` in interface `Application`

### listSettings

public org.gitana.platform.support.ResultMap<Settings> listSettings()

Specified by:
  `listSettings` in interface `Application`

### listSettings

public org.gitana.platform.support.ResultMap<Settings> listSettings(org.gitana.platform.support.Pagination pagination)

Specified by:
  `listSettings` in interface `Application`

### readSettings

public Settings readSettings(String settingsId)

Specified by:
  `readSettings` in interface `Application`

### createSettings

public Settings createSettings(com.fasterxml.jackson.databind.node.ObjectNode object)

Specified by:
  `createSettings` in interface `Application`

### querySettings

public org.gitana.platform.support.ResultMap<Settings> querySettings(com.fasterxml.jackson.databind.node.ObjectNode query)

Specified by:
  `querySettings` in interface `Application`

### querySettings

public org.gitana.platform.support.ResultMap<Settings> querySettings(com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)

Specified by:
  `querySettings` in interface `Application`

### updateSettings

public void updateSettings(Settings settings)

Specified by:
  `updateSettings` in interface `Application`

### deleteSettings

public void deleteSettings(Settings settings)

Specified by:
  `deleteSettings` in interface `Application`

### deleteSettings

public void deleteSettings(String settingsId)

Specified by:
  `deleteSettings` in interface `Application`

### listEmails

public org.gitana.platform.support.ResultMap<Email> listEmails()

Specified by:
  `listEmails` in interface `Application`

### listEmails

public org.gitana.platform.support.ResultMap<Email> listEmails(org.gitana.platform.support.Pagination pagination)

Specified by:
  `listEmails` in interface `Application`

### readEmail

public Email readEmail(String emailId)

Specified by:
  `readEmail` in interface `Application`

### createEmail

public Email createEmail()

Specified by:
  `createEmail` in interface `Application`

### createEmail

public Email createEmail(com.fasterxml.jackson.databind.node.ObjectNode object)

Specified by:
  `createEmail` in interface `Application`

### createEmail

public Email createEmail(DomainUser to, String subject, String body, String fromEmailAddress)

Specified by:
  `createEmail` in interface `Application`

### createEmail

public Email createEmail(DomainUser to, String subject, String body, String fromEmailAddress, String ccEmailAddresses, String bccEmailAddresses)

Specified by:
  `createEmail` in interface `Application`

### createEmail

public Email createEmail(DomainUser to, String subject, Node node, String attachmentId, String fromEmailAddress)

Specified by:
  `createEmail` in interface `Application`

### createEmail

public Email createEmail(DomainUser to, String subject, Node node, String attachmentId, String fromEmailAddress, String ccEmailAddresses, String bccEmailAddresses)

Specified by:
  `createEmail` in interface `Application`

### queryEmails

public org.gitana.platform.support.ResultMap<Email> queryEmails(com.fasterxml.jackson.databind.node.ObjectNode query)

Specified by:
  `queryEmails` in interface `Application`

### queryEmails

public org.gitana.platform.support.ResultMap<Email> queryEmails(com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)

Specified by:
  `queryEmails` in interface `Application`

### updateEmail

public void updateEmail(Email email)

Specified by:
  `updateEmail` in interface `Application`

### deleteEmail

public void deleteEmail(Email email)

Specified by:
  `deleteEmail` in interface `Application`

### deleteEmail

public void deleteEmail(String emailId)

Specified by:
  `deleteEmail` in interface `Application`

### listEmailProviders

public org.gitana.platform.support.ResultMap<EmailProvider> listEmailProviders()

Specified by:
  `listEmailProviders` in interface `Application`

### listEmailProviders

public org.gitana.platform.support.ResultMap<EmailProvider> listEmailProviders(org.gitana.platform.support.Pagination pagination)

Specified by:
  `listEmailProviders` in interface `Application`

### readEmailProvider

public EmailProvider readEmailProvider(String emailProviderId)

Specified by:
  `readEmailProvider` in interface `Application`

### createEmailProvider

public EmailProvider createEmailProvider()

Specified by:
  `createEmailProvider` in interface `Application`

### createEmailProvider

public EmailProvider createEmailProvider(com.fasterxml.jackson.databind.node.ObjectNode object)

Specified by:
  `createEmailProvider` in interface `Application`

### queryEmailProviders

public org.gitana.platform.support.ResultMap<EmailProvider> queryEmailProviders(com.fasterxml.jackson.databind.node.ObjectNode query)

Specified by:
  `queryEmailProviders` in interface `Application`

### queryEmailProviders

public org.gitana.platform.support.ResultMap<EmailProvider> queryEmailProviders(com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)

Specified by:
  `queryEmailProviders` in interface `Application`

### updateEmailProvider

public void updateEmailProvider(EmailProvider emailProvider)

Specified by:
  `updateEmailProvider` in interface `Application`

### deleteEmailProvider

public void deleteEmailProvider(EmailProvider emailProvider)

Specified by:
  `deleteEmailProvider` in interface `Application`

### deleteEmailProvider

public void deleteEmailProvider(String emailProviderId)

Specified by:
  `deleteEmailProvider` in interface `Application`

### listRegistrations

public org.gitana.platform.support.ResultMap<Registration> listRegistrations()

Specified by:
  `listRegistrations` in interface `Application`

### listRegistrations

public org.gitana.platform.support.ResultMap<Registration> listRegistrations(org.gitana.platform.support.Pagination pagination)

Specified by:
  `listRegistrations` in interface `Application`

### readRegistration

public Registration readRegistration(String registrationId)

Specified by:
  `readRegistration` in interface `Application`

### createRegistration

public Registration createRegistration(com.fasterxml.jackson.databind.node.ObjectNode object)

Specified by:
  `createRegistration` in interface `Application`

### createRegistration

public Registration createRegistration(String email)

Specified by:
  `createRegistration` in interface `Application`

### queryRegistrations

public org.gitana.platform.support.ResultMap<Registration> queryRegistrations(com.fasterxml.jackson.databind.node.ObjectNode query)

Specified by:
  `queryRegistrations` in interface `Application`

### queryRegistrations

public org.gitana.platform.support.ResultMap<Registration> queryRegistrations(com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)

Specified by:
  `queryRegistrations` in interface `Application`

### updateRegistration

public void updateRegistration(Registration registration)

Specified by:
  `updateRegistration` in interface `Application`

### deleteRegistration

public void deleteRegistration(Registration registration)

Specified by:
  `deleteRegistration` in interface `Application`

### deleteRegistration

public void deleteRegistration(String registrationId)

Specified by:
  `deleteRegistration` in interface `Application`

### addDeployment

public void addDeployment(String key, String webhost, String subdomain, String domain, com.fasterxml.jackson.databind.node.ObjectNode config)

Specified by:
  `addDeployment` in interface `Application`

### getDeploymentKeys

public List<String> getDeploymentKeys()

Specified by:
  `getDeploymentKeys` in interface `Application`

### getDeployment

public com.fasterxml.jackson.databind.node.ObjectNode getDeployment(String key)

Specified by:
  `getDeployment` in interface `Application`

### removeDeployment

public void removeDeployment(String key)

Specified by:
  `removeDeployment` in interface `Application`

### setSource

public void setSource(String type, boolean isPublic, String uri)

Specified by:
  `setSource` in interface `Application`

### getSourceType

public String getSourceType()

Specified by:
  `getSourceType` in interface `Application`

### getSourcePublic

public boolean getSourcePublic()

Specified by:
  `getSourcePublic` in interface `Application`

### getSourceUri

public String getSourceUri()

Specified by:
  `getSourceUri` in interface `Application`

### deploy

public DeployedApplication deploy(String deploymentKey)

Specified by:
  `deploy` in interface `Application`

### findDeployed

public DeployedApplication findDeployed(String deploymentKey)

Specified by:
  `findDeployed` in interface `Application`

### readApiKeys

public Map<String,Map<String,String>> readApiKeys()

Specified by:
  `readApiKeys` in interface `Application`

### readApiKeys

public Map<String,String> readApiKeys(String deploymentKey)

Specified by:
  `readApiKeys` in interface `Application`