Package org.gitana.platform.client.release

# Class ReleaseImpl

java.lang.Object
org.gitana.platform.support.GitanaObjectImpl
org.gitana.platform.client.document.DocumentImpl
org.gitana.platform.client.platform.AbstractPlatformDocumentImpl
org.gitana.platform.client.repository.AbstractRepositoryDocumentImpl
org.gitana.platform.client.release.ReleaseImpl

All Implemented Interfaces:
  `Serializable`, `Document`, `PlatformDocument`, `Release`, `RepositoryDocument`, `AccessControllable`, `Copyable`, `Referenceable`, `Selfable`, `TitleDescription`, `Transferable`, `TypedID`, `org.gitana.platform.GitanaObject`, `org.gitana.platform.JSONable`

public class ReleaseImpl extends AbstractRepositoryDocumentImpl implements Release

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.release.Release

`FIELD_ARCHIVED, FIELD_BRANCH_ID, FIELD_FINALIZE_HAS_CONFLICTS, FIELD_FINALIZED, FIELD_FINALIZED_BY, FIELD_FINALIZED_DATE, FIELD_RELEASE_DATE, FIELD_RELEASED, FIELD_REV, FIELD_SCHEDULED, FIELD_SCHEDULED_BY, FIELD_SCHEDULED_DATE, FIELD_SCHEDULED_WORK_ID, FIELD_SNAPSHOT_ID`

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

`FIELD_DESCRIPTION, FIELD_TITLE`

## Constructor Summary

Constructors
Constructor
Description
`ReleaseImpl(Repository repository, com.fasterxml.jackson.databind.node.ObjectNode obj, boolean isSaved)`

## Method Summary

Modifier and Type
Method
Description
`void`
`archive()`
`void`
`delete()`
Delete
`com.fasterxml.jackson.databind.node.ObjectNode`
`finalize(boolean schedule)`
`ACL`
`getACL()`
`List<String>`
`getACL(String principalId)`
Retrieve the authorities that a principal has.
`boolean`
`getArchived()`
`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.
`Branch`
`getBranch()`
`String`
`getBranchId()`
`boolean`
`getFinalized()`
`String`
`getFinalizedBy()`
`Calendar`
`getFinalizedDate()`
`boolean`
`getFinalizeHasConflicts()`
`boolean`
`getReleased()`
`Calendar`
`getReleaseDate()`
`protected String`
`getResourceUri()`
`int`
`getRev()`
`boolean`
`getScheduled()`
`String`
`getScheduledBy()`
`Calendar`
`getScheduledDate()`
`String`
`getScheduledWorkId()`
`String`
`getSnapshotId()`
`String`
`getTypeId()`
`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 authorityId)`
`com.fasterxml.jackson.databind.node.ObjectNode`
`loadInfo()`
`void`
`releaseImmediately()`
`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`
`unarchive()`
`void`
`unfinalize()`
`void`
`update()`
Update

### Methods inherited from class org.gitana.platform.client.repository.AbstractRepositoryDocumentImpl

`getRepository, getRepositoryId, 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.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.platform.PlatformDocument

`getPlatform, getPlatformId`

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

`ref`

### Methods inherited from interface org.gitana.platform.client.repository.RepositoryDocument

`getRepository, getRepositoryId`

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

### ReleaseImpl

public ReleaseImpl(Repository repository, com.fasterxml.jackson.databind.node.ObjectNode obj, boolean isSaved)

## Method Details

### getTypeId

public String getTypeId()

Specified by:
  `getTypeId` in interface `TypedID`

### getResourceUri

protected String getResourceUri()

Specified by:
  `getResourceUri` in class `AbstractPlatformDocumentImpl`

### getBranchId

public String getBranchId()

Specified by:
  `getBranchId` in interface `Release`

### getRev

public int getRev()

Specified by:
  `getRev` in interface `Release`

### getFinalized

public boolean getFinalized()

Specified by:
  `getFinalized` in interface `Release`

### getFinalizedDate

public Calendar getFinalizedDate()

Specified by:
  `getFinalizedDate` in interface `Release`

### getFinalizedBy

public String getFinalizedBy()

Specified by:
  `getFinalizedBy` in interface `Release`

### getScheduled

public boolean getScheduled()

Specified by:
  `getScheduled` in interface `Release`

### getScheduledDate

public Calendar getScheduledDate()

Specified by:
  `getScheduledDate` in interface `Release`

### getScheduledBy

public String getScheduledBy()

Specified by:
  `getScheduledBy` in interface `Release`

### getScheduledWorkId

public String getScheduledWorkId()

Specified by:
  `getScheduledWorkId` in interface `Release`

### getReleased

public boolean getReleased()

Specified by:
  `getReleased` in interface `Release`

### getReleaseDate

public Calendar getReleaseDate()

Specified by:
  `getReleaseDate` in interface `Release`

### getFinalizeHasConflicts

public boolean getFinalizeHasConflicts()

Specified by:
  `getFinalizeHasConflicts` in interface `Release`

### getArchived

public boolean getArchived()

Specified by:
  `getArchived` in interface `Release`

### getSnapshotId

public String getSnapshotId()

Specified by:
  `getSnapshotId` in interface `Release`

### getBranch

public Branch getBranch()

Specified by:
  `getBranch` in interface `Release`

### loadInfo

public com.fasterxml.jackson.databind.node.ObjectNode loadInfo()

Specified by:
  `loadInfo` in interface `Release`

### finalize

public com.fasterxml.jackson.databind.node.ObjectNode finalize(boolean schedule)

Specified by:
  `finalize` in interface `Release`

### unfinalize

public void unfinalize()

Specified by:
  `unfinalize` in interface `Release`

### archive

public void archive()

Specified by:
  `archive` in interface `Release`

### unarchive

public void unarchive()

Specified by:
  `unarchive` in interface `Release`

### releaseImmediately

public void releaseImmediately()

Specified by:
  `releaseImmediately` in interface `Release`

### reload

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

Specified by:
  `reload` in interface `Selfable`

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

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

Specified by:
  `hasPermission` in interface `AccessControllable`