Package org.gitana.platform.client.datastore

# Class AbstractDataStoreImpl

java.lang.Object
org.gitana.platform.support.GitanaObjectImpl
org.gitana.platform.client.document.DocumentImpl
org.gitana.platform.client.datastore.AbstractDataStoreImpl

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

Direct Known Subclasses:
  `AbstractClusterDataStoreImpl`, `ClusterImpl`

public abstract class AbstractDataStoreImpl extends DocumentImpl implements DataStore

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

`FIELD_DESCRIPTION, FIELD_TITLE`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AbstractDataStoreImpl(com.fasterxml.jackson.databind.node.ObjectNode obj, boolean isSaved)`

## Method Summary

Modifier and Type
Method
Description
`Team`
`createTeam(String teamKey)`
`Team`
`createTeam(String teamKey, com.fasterxml.jackson.databind.node.ObjectNode object)`
`void`
`delete()`
Delete
`void`
`deleteTeam(String teamKey)`
`boolean`
`equals(Object object)`
`Archive`
`exportArchive(Vault vault, String groupId, String artifactId, String versionId)`
Exports synchronously and hands back the binary directly.
`Archive`
`exportArchive(Vault vault, String groupId, String artifactId, String versionId, org.gitana.platform.services.transfer.TransferExportConfiguration configuration)`
Exports synchronously and hands back the binary directly.
`TransferExportJob`
`exportArchive(Vault vault, String groupId, String artifactId, String versionId, org.gitana.platform.services.transfer.TransferExportConfiguration configuration, org.gitana.platform.services.transfer.TransferSchedule schedule)`
Exports either synchronously or asynchronously, returning the job.
`ACL`
`getACL()`
`List<String>`
`getACL(String principalId)`
Retrieve the authorities that a principal has.
`Map<String,Map<String,org.gitana.platform.services.authority.AuthorityGrant>>`
`getAuthorityGrants(List<String> principalIds)`
Acquires a map of authority grants for a set of principals.
`abstract Cluster`
`getCluster()`
`protected Driver`
`getDriver()`
`protected ObjectFactory`
`getFactory()`
`String`
`getId()`
Gets the id of the document.
`Team`
`getOwnersTeam()`
`protected Remote`
`getRemote()`
`abstract String`
`getResourceUri()`
`String`
`getTeamableBaseUri()`
`void`
`grant(String principalId, String authorityId)`
Grants an authority to a principal.
`void`
`grant(DomainPrincipal principal, String authorityId)`
`boolean`
`hasAuthority(String principalId, String authorityId)`
Checks whether the principal has the given authority over this object.
`boolean`
`hasAuthority(DomainPrincipal principal, String authorityId)`
`boolean`
`hasPermission(String principalId, String permissionId)`
Checks whether the principal has the given permission over this object.
`boolean`
`hasPermission(DomainPrincipal principal, String permissionId)`
`TransferImportJob`
`importArchive(Archive archive)`
Imports an archive synchronously, returning the job.
`TransferImportJob`
`importArchive(Archive archive, org.gitana.platform.services.transfer.TransferImportConfiguration configuration)`
Imports an archive synchronously, returning the job.
`TransferImportJob`
`importArchive(Archive archive, org.gitana.platform.services.transfer.TransferImportConfiguration configuration, org.gitana.platform.services.transfer.TransferSchedule schedule)`
Imports either synchronously or asynchronously, returning the job.
`org.gitana.platform.support.ResultMap<Team>`
`listTeams()`
`Team`
`readTeam(String teamKey)`
`abstract void`
`reload()`
Reload
`void`
`revoke(String principalId, String authorityId)`
Revokes an authority for a principal.
`void`
`revoke(DomainPrincipal principal, String authorityId)`
`void`
`revokeAll(String principalId)`
Revoke all authorities for a principal.
`void`
`revokeAll(DomainPrincipal principal)`
`void`
`update()`
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.document.Document

`dateCreated, dateModified, getCreatedBy, 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.TitleDescription

`getDescription, getTitle, setDescription, setTitle`

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

`getTypeId`

## Constructor Details

### AbstractDataStoreImpl

protected AbstractDataStoreImpl(com.fasterxml.jackson.databind.node.ObjectNode obj, boolean isSaved)

## Method Details

### getFactory

protected ObjectFactory getFactory()

### getDriver

protected Driver getDriver()

### getRemote

protected Remote getRemote()

### getCluster

public abstract Cluster getCluster()

### getId

public String getId()
Description copied from interface: `Document`
Gets the id of the document.

Specified by:
  `getId` in interface `Document`
Specified by:
  `getId` in interface `TypedID`
Overrides:
  `getId` in class `DocumentImpl`
Returns:

### equals

public boolean equals(Object object)

Overrides:
  `equals` in class `Object`

### getResourceUri

public abstract String getResourceUri()

### update

public void update()
Description copied from interface: `Selfable`
Update

Specified by:
  `update` in interface `Selfable`

### delete

public void delete()
Description copied from interface: `Selfable`
Delete

Specified by:
  `delete` in interface `Selfable`

### reload

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

Specified by:
  `reload` in interface `Selfable`

### getACL

public ACL getACL()

Specified by:
  `getACL` in interface `AccessControllable`
Returns:
  access control list

### getACL

public List<String> getACL(String principalId)
Description copied from interface: `AccessControllable`
Retrieve the authorities that a principal has.

Specified by:
  `getACL` in interface `AccessControllable`
Parameters:
  `principalId` -
Returns:
  list

### grant

public void grant(String principalId, String authorityId)
Description copied from interface: `AccessControllable`
Grants an authority to a principal.

Specified by:
  `grant` in interface `AccessControllable`
Parameters:
  `principalId` -
  `authorityId` -

### grant

public void grant(DomainPrincipal principal, String authorityId)

Specified by:
  `grant` in interface `AccessControllable`

### revoke

public void revoke(String principalId, String authorityId)
Description copied from interface: `AccessControllable`
Revokes an authority for a principal.

Specified by:
  `revoke` in interface `AccessControllable`
Parameters:
  `principalId` -
  `authorityId` -

### revoke

public void revoke(DomainPrincipal principal, String authorityId)

Specified by:
  `revoke` in interface `AccessControllable`

### revokeAll

public void revokeAll(String principalId)
Description copied from interface: `AccessControllable`
Revoke all authorities for a principal.

Specified by:
  `revokeAll` in interface `AccessControllable`
Parameters:
  `principalId` -

### revokeAll

public void revokeAll(DomainPrincipal principal)

Specified by:
  `revokeAll` in interface `AccessControllable`

### hasAuthority

public boolean hasAuthority(String principalId, String authorityId)
Description copied from interface: `AccessControllable`
Checks whether the principal has the given authority over this object.

Specified by:
  `hasAuthority` in interface `AccessControllable`
Parameters:
  `principalId` -
  `authorityId` -
Returns:

### hasAuthority

public boolean hasAuthority(DomainPrincipal principal, String authorityId)

Specified by:
  `hasAuthority` in interface `AccessControllable`

### getAuthorityGrants

public Map<String,Map<String,org.gitana.platform.services.authority.AuthorityGrant>> getAuthorityGrants(List<String> principalIds)
Description copied from interface: `AccessControllable`
Acquires a map of authority grants for a set of principals.

Specified by:
  `getAuthorityGrants` in interface `AccessControllable`
Parameters:
  `principalIds` -
Returns:

### hasPermission

public boolean hasPermission(String principalId, String permissionId)
Description copied from interface: `AccessControllable`
Checks whether the principal has the given permission over this object.

Specified by:
  `hasPermission` in interface `AccessControllable`
Parameters:
  `principalId` -
  `permissionId` -
Returns:

### hasPermission

public boolean hasPermission(DomainPrincipal principal, String permissionId)

Specified by:
  `hasPermission` in interface `AccessControllable`

### readTeam

public Team readTeam(String teamKey)

Specified by:
  `readTeam` in interface `Teamable`

### listTeams

public org.gitana.platform.support.ResultMap<Team> listTeams()

Specified by:
  `listTeams` in interface `Teamable`

### createTeam

public Team createTeam(String teamKey)

Specified by:
  `createTeam` in interface `Teamable`

### createTeam

public Team createTeam(String teamKey, com.fasterxml.jackson.databind.node.ObjectNode object)

Specified by:
  `createTeam` in interface `Teamable`

### deleteTeam

public void deleteTeam(String teamKey)

Specified by:
  `deleteTeam` in interface `Teamable`

### getTeamableBaseUri

public String getTeamableBaseUri()

Specified by:
  `getTeamableBaseUri` in interface `Teamable`

### getOwnersTeam

public Team getOwnersTeam()

Specified by:
  `getOwnersTeam` in interface `Teamable`

### exportArchive

public Archive exportArchive(Vault vault, String groupId, String artifactId, String versionId)
Description copied from interface: `Transferable`
Exports synchronously and hands back the binary directly.

Specified by:
  `exportArchive` in interface `Transferable`
Parameters:
  `vault` -
  `groupId` -
  `artifactId` -
  `versionId` -
Returns:

### exportArchive

public Archive exportArchive(Vault vault, String groupId, String artifactId, String versionId, org.gitana.platform.services.transfer.TransferExportConfiguration configuration)
Description copied from interface: `Transferable`
Exports synchronously and hands back the binary directly.

Specified by:
  `exportArchive` in interface `Transferable`
Parameters:
  `vault` -
  `groupId` -
  `artifactId` -
  `versionId` -
  `configuration` -
Returns:

### exportArchive

public TransferExportJob exportArchive(Vault vault, String groupId, String artifactId, String versionId, org.gitana.platform.services.transfer.TransferExportConfiguration configuration, org.gitana.platform.services.transfer.TransferSchedule schedule)
Description copied from interface: `Transferable`
Exports either synchronously or asynchronously, returning the job.

Specified by:
  `exportArchive` in interface `Transferable`
Parameters:
  `vault` -
  `groupId` -
  `artifactId` -
  `versionId` -
  `configuration` -
  `schedule` -
Returns:

### importArchive

public TransferImportJob importArchive(Archive archive)
Description copied from interface: `Transferable`
Imports an archive synchronously, returning the job.

Specified by:
  `importArchive` in interface `Transferable`
Parameters:
  `archive` -
Returns:

### importArchive

public TransferImportJob importArchive(Archive archive, org.gitana.platform.services.transfer.TransferImportConfiguration configuration)
Description copied from interface: `Transferable`
Imports an archive synchronously, returning the job.

Specified by:
  `importArchive` in interface `Transferable`
Parameters:
  `archive` -
  `configuration` -
Returns:

### importArchive

public TransferImportJob importArchive(Archive archive, org.gitana.platform.services.transfer.TransferImportConfiguration configuration, org.gitana.platform.services.transfer.TransferSchedule schedule)
Description copied from interface: `Transferable`
Imports either synchronously or asynchronously, returning the job.

Specified by:
  `importArchive` in interface `Transferable`
Parameters:
  `archive` -
  `configuration` -
  `schedule` -
Returns: