Package org.gitana.platform.client.repository

# Interface Repository

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

All Known Implementing Classes:
  `RepositoryImpl`

public interface Repository extends PlatformDataStore

Author:
  uzi

## Field Summary

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

## Method Summary

Modifier and Type
Method
Description
`PermissionCheckResults`
`checkBranchPermissions(List<PermissionCheck> list)`
Check branch permissions.
`PermissionCheckResults`
`checkReleasePermissions(List<PermissionCheck> list)`
Check release permissions.
`Branch`
`createBranch(String changesetId)`
Creates an empty branch on the server.
`Branch`
`createBranch(String changesetId, com.fasterxml.jackson.databind.node.ObjectNode object)`
Creates a branch on the server.
`Branch`
`createBranch(String rootBranchId, String changesetId, com.fasterxml.jackson.databind.node.ObjectNode object)`
Creates a branch on the server.
`Release`
`createRelease(com.fasterxml.jackson.databind.node.ObjectNode object)`
Creates a release on the server.
`Release`
`createRelease(com.fasterxml.jackson.databind.node.ObjectNode object, String sourceReleaseId)`
Creates a release on the server by copying a source release.
`void`
`deleteFile(String filename)`
Deletes a file from the repository file system.
`byte[]`
`downloadFile(String filename)`
Downloads a file from the repository file system.
`org.gitana.platform.support.ResultMap<Branch>`
`listBranches()`
Retrieves branches for the repository
`org.gitana.platform.support.ResultMap<Branch>`
`listBranches(org.gitana.platform.support.Pagination pagination)`
Retrieves branches for the repository
`org.gitana.platform.support.ResultMap<Changeset>`
`listChangesets()`
Retrieves changesets for the repository
`org.gitana.platform.support.ResultMap<Changeset>`
`listChangesets(org.gitana.platform.support.Pagination pagination)`
Retrieves changesets for the repository
`org.gitana.platform.support.ResultMap<Release>`
`listReleases()`
Retrieves releases for the repository
`org.gitana.platform.support.ResultMap<Release>`
`listReleases(org.gitana.platform.support.Pagination pagination)`
Retrieves releases for the repository
`org.gitana.platform.support.ResultMap<Branch>`
`queryBranches(com.fasterxml.jackson.databind.node.ObjectNode query)`
Performs a query over the branch index.
`org.gitana.platform.support.ResultMap<Branch>`
`queryBranches(com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)`
Performs a query over the branch index.
`org.gitana.platform.support.ResultMap<Changeset>`
`queryChangesets(com.fasterxml.jackson.databind.node.ObjectNode query)`
Performs a query over the changeset index.
`org.gitana.platform.support.ResultMap<Changeset>`
`queryChangesets(com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)`
Performs a query over the changeset index.
`org.gitana.platform.support.ResultMap<Release>`
`queryReleases(com.fasterxml.jackson.databind.node.ObjectNode query)`
Queries for releases.
`org.gitana.platform.support.ResultMap<Release>`
`queryReleases(com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)`
Queries for releases.
`Branch`
`readBranch(String branchId)`
Reads a single branch from the server.
`Changeset`
`readChangeset(String changesetId)`
Reads a single changeset.
`Release`
`readRelease(String releaseId)`
Reads a single release from the server.
`void`
`uploadFile(String filename, byte[] bytes, String contentType)`
Uploads a file into the repository file system.

### 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.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.platform.PlatformDataStore

`getPlatform`

### 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.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, getTypeId`

## Method Details

### listBranches

org.gitana.platform.support.ResultMap<Branch> listBranches()
Retrieves branches for the repository

Returns:
  a map of branch objects keyed by branch id

### listBranches

org.gitana.platform.support.ResultMap<Branch> listBranches(org.gitana.platform.support.Pagination pagination)
Retrieves branches for the repository

Parameters:
  `pagination` -
Returns:
  a map of branch objects keyed by branch id

### readBranch

Branch readBranch(String branchId)
Reads a single branch from the server.

Parameters:
  `branchId` -
Returns:
  branch

### createBranch

Branch createBranch(String changesetId)
Creates an empty branch on the server.

Parameters:
  `changesetId` - the root changeset
Returns:
  branch

### createBranch

Branch createBranch(String changesetId, com.fasterxml.jackson.databind.node.ObjectNode object)
Creates a branch on the server.

Parameters:
  `changesetId` - the root changeset id
  `object` -
Returns:
  branch

### createBranch

Branch createBranch(String rootBranchId, String changesetId, com.fasterxml.jackson.databind.node.ObjectNode object)
Creates a branch on the server.

Parameters:
  `rootBranchId` - the root branch id
  `changesetId` - the root changeset id
  `object` -
Returns:
  branch

### queryBranches

org.gitana.platform.support.ResultMap<Branch> queryBranches(com.fasterxml.jackson.databind.node.ObjectNode query)
Performs a query over the branch index.

Parameters:
  `query` -
Returns:

### queryBranches

org.gitana.platform.support.ResultMap<Branch> queryBranches(com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)
Performs a query over the branch index.

Parameters:
  `query` -
  `pagination` -
Returns:

### checkBranchPermissions

PermissionCheckResults checkBranchPermissions(List<PermissionCheck> list)
Check branch permissions.

Parameters:
  `list` -
Returns:

### uploadFile

void uploadFile(String filename, byte[] bytes, String contentType)
Uploads a file into the repository file system.

Parameters:
  `filename` -
  `bytes` -
  `contentType` -

### deleteFile

void deleteFile(String filename)
Deletes a file from the repository file system.

Parameters:
  `filename` -

### downloadFile

byte[] downloadFile(String filename)
Downloads a file from the repository file system.

Parameters:
  `filename` -
Returns:
  the byte array constituting the downloaded file

### listChangesets

org.gitana.platform.support.ResultMap<Changeset> listChangesets()
Retrieves changesets for the repository

Returns:
  a map of changeset objects keyed by changeset id

### listChangesets

org.gitana.platform.support.ResultMap<Changeset> listChangesets(org.gitana.platform.support.Pagination pagination)
Retrieves changesets for the repository

Parameters:
  `pagination` -
Returns:
  a map of changeset objects keyed by changeset id

### readChangeset

Changeset readChangeset(String changesetId)
Reads a single changeset.

Parameters:
  `changesetId` -
Returns:
  branch

### queryChangesets

org.gitana.platform.support.ResultMap<Changeset> queryChangesets(com.fasterxml.jackson.databind.node.ObjectNode query)
Performs a query over the changeset index.

Parameters:
  `query` -
Returns:

### queryChangesets

org.gitana.platform.support.ResultMap<Changeset> queryChangesets(com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)
Performs a query over the changeset index.

Parameters:
  `query` -
  `pagination` -
Returns:

### listReleases

org.gitana.platform.support.ResultMap<Release> listReleases()
Retrieves releases for the repository

Returns:
  a map of release objects keyed by release id

### listReleases

org.gitana.platform.support.ResultMap<Release> listReleases(org.gitana.platform.support.Pagination pagination)
Retrieves releases for the repository

Parameters:
  `pagination` -
Returns:
  a map of release objects keyed by release id

### readRelease

Release readRelease(String releaseId)
Reads a single release from the server.

Parameters:
  `releaseId` -
Returns:
  release

### createRelease

Release createRelease(com.fasterxml.jackson.databind.node.ObjectNode object)
Creates a release on the server.

Parameters:
  `object` -
Returns:
  release

### createRelease

Release createRelease(com.fasterxml.jackson.databind.node.ObjectNode object, String sourceReleaseId)
Creates a release on the server by copying a source release.

Parameters:
  `object` -
  `sourceReleaseId` - source release id
Returns:
  release

### queryReleases

org.gitana.platform.support.ResultMap<Release> queryReleases(com.fasterxml.jackson.databind.node.ObjectNode query)
Queries for releases.

Parameters:
  `query` -
Returns:
  map of releases

### queryReleases

org.gitana.platform.support.ResultMap<Release> queryReleases(com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)
Queries for releases.

Parameters:
  `query` -
  `pagination` -
Returns:
  map of releases

### checkReleasePermissions

PermissionCheckResults checkReleasePermissions(List<PermissionCheck> list)
Check release permissions.

Parameters:
  `list` -
Returns:
  results