Package org.gitana.platform.client.node

# Class BaseNodeImpl

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.node.BaseNodeImpl

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

Direct Known Subclasses:
  `AssociationImpl`, `NodeImpl`

public abstract class BaseNodeImpl extends AbstractRepositoryDocumentImpl implements BaseNode
Base class for nodes

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.node.BaseNode

`FIELD_FEATURES, FIELD_QNAME, FIELD_TYPE_QNAME, SYSTEM_CHANGESET, SYSTEM_DELETED`

### 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
`BaseNodeImpl(Branch branch, com.fasterxml.jackson.databind.node.ObjectNode obj, boolean isSaved)`
Existing node constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`addFeature(String featureId, com.fasterxml.jackson.databind.node.ObjectNode featureConfigObject)`
`CopyJob`
`copy(TypedID targetContainer, org.gitana.platform.services.transfer.TransferImportStrategy strategy, Map<String,Object> additionalConfiguration)`
Copies this object into the target container.
`CopyJob`
`copyAsync(TypedID targetContainer, org.gitana.platform.services.transfer.TransferImportStrategy strategy, Map<String,Object> additionalConfiguration)`
Copies this object into the target container.
`void`
`delete()`
Delete
`void`
`deleteAttachment()`
Deletes the default attachment.
`void`
`deleteAttachment(String attachmentId)`
Deletes an attachment.
`byte[]`
`downloadAttachment()`
Downloads the default attachment.
`byte[]`
`downloadAttachment(String attachmentId)`
Downloads an attachment.
`boolean`
`equals(Object obj)`
`Branch`
`getBranch()`
`String`
`getBranchId()`
`Changeset`
`getChangeset()`
`String`
`getChangesetId()`
`String`
`getDownloadUri(String attachmentId)`
Acquires the download URI for the attachment
`protected Driver`
`getDriver()`
`protected ObjectFactory`
`getFactory()`
`com.fasterxml.jackson.databind.node.ObjectNode`
`getFeature(String featureId)`
`List<String>`
`getFeatureIds()`
`org.gitana.platform.support.QName`
`getQName()`
`protected Remote`
`getRemote()`
`Repository`
`getRepository()`
`String`
`getRepositoryId()`
`protected String`
`getResourceUri()`
`org.gitana.platform.support.QName`
`getTypeQName()`
`boolean`
`hasFeature(String featureId)`
`boolean`
`isDeleted()`
`org.gitana.platform.support.ResultMap<Attachment>`
`listAttachments()`
`org.gitana.platform.services.reference.Reference`
`ref()`
`void`
`reload()`
Reload
`void`
`removeFeature(String featureId)`
`void`
`touch()`
Touches the node.
`void`
`update()`
Update
`void`
`uploadAttachment(byte[] bytes, String contentType)`
Uploads the default attachment.
`void`
`uploadAttachment(String attachmentId, byte[] bytes, String contentType)`
Uploads an attachment.
`void`
`uploadAttachment(String attachmentId, byte[] bytes, String contentType, String fileName)`
Uploads an attachment.
`void`
`uploadAttachments(Map<String,String> params, org.gitana.http.HttpPayload... payloads)`
Uploads a group of attachments.
`void`
`uploadAttachments(org.gitana.http.HttpPayload... payloads)`
Uploads a group of attachments.

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

`copy, copyAsync, exportArchive, exportArchive, exportArchive, getCluster, getPlatform, getPlatformId, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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

`copy, 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.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`

## Constructor Details

### BaseNodeImpl

public BaseNodeImpl(Branch branch, com.fasterxml.jackson.databind.node.ObjectNode obj, boolean isSaved)
Existing node constructor.

Parameters:
  `branch` -
  `obj` -
  `isSaved` -

## Method Details

### getResourceUri

protected String getResourceUri()

Specified by:
  `getResourceUri` in class `AbstractPlatformDocumentImpl`

### getFactory

protected ObjectFactory getFactory()

Overrides:
  `getFactory` in class `AbstractPlatformDocumentImpl`

### getDriver

protected Driver getDriver()

Overrides:
  `getDriver` in class `AbstractPlatformDocumentImpl`

### getRemote

protected Remote getRemote()

Overrides:
  `getRemote` in class `AbstractPlatformDocumentImpl`

### ref

public org.gitana.platform.services.reference.Reference ref()

Specified by:
  `ref` in interface `Referenceable`
Overrides:
  `ref` in class `AbstractRepositoryDocumentImpl`

### getRepository

public Repository getRepository()

Specified by:
  `getRepository` in interface `BaseNode`
Specified by:
  `getRepository` in interface `RepositoryDocument`
Overrides:
  `getRepository` in class `AbstractRepositoryDocumentImpl`

### getRepositoryId

public String getRepositoryId()

Specified by:
  `getRepositoryId` in interface `BaseNode`
Specified by:
  `getRepositoryId` in interface `RepositoryDocument`
Overrides:
  `getRepositoryId` in class `AbstractRepositoryDocumentImpl`

### getBranch

public Branch getBranch()

Specified by:
  `getBranch` in interface `BaseNode`

### getBranchId

public String getBranchId()

Specified by:
  `getBranchId` in interface `BaseNode`

### getQName

public org.gitana.platform.support.QName getQName()

Specified by:
  `getQName` in interface `BaseNode`

### getTypeQName

public org.gitana.platform.support.QName getTypeQName()

Specified by:
  `getTypeQName` in interface `BaseNode`

### getChangeset

public Changeset getChangeset()

Specified by:
  `getChangeset` in interface `BaseNode`

### getChangesetId

public String getChangesetId()

Specified by:
  `getChangesetId` in interface `BaseNode`

### isDeleted

public boolean isDeleted()

Specified by:
  `isDeleted` in interface `BaseNode`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

### 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 void reload()
Description copied from interface: `Selfable`
Reload

Specified by:
  `reload` in interface `Selfable`

### touch

public void touch()
Description copied from interface: `BaseNode`
Touches the node.

Specified by:
  `touch` in interface `BaseNode`

### getFeatureIds

public List<String> getFeatureIds()

Specified by:
  `getFeatureIds` in interface `BaseNode`

### getFeature

public com.fasterxml.jackson.databind.node.ObjectNode getFeature(String featureId)

Specified by:
  `getFeature` in interface `BaseNode`

### removeFeature

public void removeFeature(String featureId)

Specified by:
  `removeFeature` in interface `BaseNode`

### addFeature

public void addFeature(String featureId, com.fasterxml.jackson.databind.node.ObjectNode featureConfigObject)

Specified by:
  `addFeature` in interface `BaseNode`

### hasFeature

public boolean hasFeature(String featureId)

Specified by:
  `hasFeature` in interface `BaseNode`

### copy

public CopyJob copy(TypedID targetContainer, org.gitana.platform.services.transfer.TransferImportStrategy strategy, Map<String,Object> additionalConfiguration)
Description copied from interface: `Copyable`
Copies this object into the target container.

Specified by:
  `copy` in interface `Copyable`
Overrides:
  `copy` in class `AbstractPlatformDocumentImpl`
Parameters:
  `targetContainer` -
  `strategy` -
  `additionalConfiguration` -
Returns:
  id of the resulting object

### copyAsync

public CopyJob copyAsync(TypedID targetContainer, org.gitana.platform.services.transfer.TransferImportStrategy strategy, Map<String,Object> additionalConfiguration)
Description copied from interface: `Copyable`
Copies this object into the target container.

Specified by:
  `copyAsync` in interface `Copyable`
Overrides:
  `copyAsync` in class `AbstractPlatformDocumentImpl`
Parameters:
  `targetContainer` -
  `strategy` -
  `additionalConfiguration` -
Returns:
  copy job

### uploadAttachment

public void uploadAttachment(byte[] bytes, String contentType)
Description copied from interface: `Attachable`
Uploads the default attachment.

Specified by:
  `uploadAttachment` in interface `Attachable`
Parameters:
  `bytes` -
  `contentType` -

### uploadAttachment

public void uploadAttachment(String attachmentId, byte[] bytes, String contentType)
Description copied from interface: `Attachable`
Uploads an attachment.

Specified by:
  `uploadAttachment` in interface `Attachable`
Parameters:
  `attachmentId` -
  `bytes` -
  `contentType` -

### uploadAttachment

public void uploadAttachment(String attachmentId, byte[] bytes, String contentType, String fileName)
Description copied from interface: `Attachable`
Uploads an attachment.

Specified by:
  `uploadAttachment` in interface `Attachable`
Parameters:
  `attachmentId` -
  `bytes` -
  `contentType` -
  `fileName` -

### uploadAttachments

public void uploadAttachments(org.gitana.http.HttpPayload... payloads)
Description copied from interface: `Attachable`
Uploads a group of attachments.

Specified by:
  `uploadAttachments` in interface `Attachable`
Parameters:
  `payloads` -

### uploadAttachments

public void uploadAttachments(Map<String,String> params, org.gitana.http.HttpPayload... payloads)
Description copied from interface: `Attachable`
Uploads a group of attachments.

Specified by:
  `uploadAttachments` in interface `Attachable`
Parameters:
  `payloads` -

### downloadAttachment

public byte[] downloadAttachment()
Description copied from interface: `Attachable`
Downloads the default attachment.

Specified by:
  `downloadAttachment` in interface `Attachable`
Returns:
  attachment

### downloadAttachment

public byte[] downloadAttachment(String attachmentId)
Description copied from interface: `Attachable`
Downloads an attachment.

Specified by:
  `downloadAttachment` in interface `Attachable`
Parameters:
  `attachmentId` -
Returns:
  attachment

### listAttachments

public org.gitana.platform.support.ResultMap<Attachment> listAttachments()

Specified by:
  `listAttachments` in interface `Attachable`
Returns:
  map of attachments

### getDownloadUri

public String getDownloadUri(String attachmentId)
Description copied from interface: `Attachable`
Acquires the download URI for the attachment

Specified by:
  `getDownloadUri` in interface `Attachable`
Parameters:
  `attachmentId` -
Returns:
  uri

### deleteAttachment

public void deleteAttachment()
Description copied from interface: `Attachable`
Deletes the default attachment.

Specified by:
  `deleteAttachment` in interface `Attachable`

### deleteAttachment

public void deleteAttachment(String attachmentId)
Description copied from interface: `Attachable`
Deletes an attachment.

Specified by:
  `deleteAttachment` in interface `Attachable`
Parameters:
  `attachmentId` -