Package org.gitana.platform.client.node

# Interface Node

All Superinterfaces:
  `AccessControllable`, `Attachable`, `BaseNode`, `Copyable`, `Document`, `org.gitana.platform.GitanaObject`, `org.gitana.platform.JSONable`, `Referenceable`, `Selfable`, `Serializable`, `TitleDescription`, `Transferable`, `TypedID`

All Known Subinterfaces:
  `AssociationDefinition`, `Definition`, `FeatureDefinition`, `Form`, `Group`, `NodeList`, `Person`, `Rule`, `TypeDefinition`

All Known Implementing Classes:
  `AbstractDefinitionImpl`, `AssociationDefinitionImpl`, `FeatureDefinitionImpl`, `FormImpl`, `GroupImpl`, `NodeImpl`, `NodeListImpl`, `PersonImpl`, `RuleImpl`, `TypeDefinitionImpl`

public interface Node extends BaseNode, AccessControllable, Transferable, Copyable

Author:
  uzi

## Field Summary

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

## Method Summary

Modifier and Type
Method
Description
`Association`
`associate(Node targetNode, org.gitana.platform.support.QName associationTypeQName)`
Associates a target node to this source node.
`Association`
`associate(Node targetNode, org.gitana.platform.support.QName associationTypeQName, com.fasterxml.jackson.databind.node.ObjectNode object)`
Associates a target node to this source node.
`Association`
`associate(Node otherNode, org.gitana.platform.support.QName associationTypeQName, org.gitana.platform.services.association.Directionality directionality)`
Associates this node with another.
`Association`
`associate(Node otherNode, org.gitana.platform.support.QName associationTypeQName, org.gitana.platform.services.association.Directionality directionality, com.fasterxml.jackson.databind.node.ObjectNode object)`
Associates this node with another.
`org.gitana.platform.support.ResultMap<Association>`
`associations()`
Lists all associations in ANY direction involving this node.
`org.gitana.platform.support.ResultMap<Association>`
`associations(org.gitana.platform.services.association.Direction direction)`
Lists all association in the given direction involving this node.
`org.gitana.platform.support.ResultMap<Association>`
`associations(org.gitana.platform.services.association.Direction direction, org.gitana.platform.support.Pagination pagination)`
Lists all association in the given direction involving this node.
`org.gitana.platform.support.ResultMap<Association>`
`associations(org.gitana.platform.support.Pagination pagination)`
Lists all associations in ANY direction involving this node.
`org.gitana.platform.support.ResultMap<Association>`
`associations(org.gitana.platform.support.QName associationTypeQName)`
Lists all associations of the given type in ANY direction involving this node.
`org.gitana.platform.support.ResultMap<Association>`
`associations(org.gitana.platform.support.QName associationTypeQName, org.gitana.platform.services.association.Direction direction)`
Lists all associations of the given type in the specified direction.
`org.gitana.platform.support.ResultMap<Association>`
`associations(org.gitana.platform.support.QName associationTypeQName, org.gitana.platform.services.association.Direction direction, org.gitana.platform.support.Pagination pagination)`
Lists all associations of the given type in the specified direction.
`org.gitana.platform.support.ResultMap<Association>`
`associations(org.gitana.platform.support.QName associationTypeQName, org.gitana.platform.support.Pagination pagination)`
Lists all associations of the given type in ANY direction involving this node.
`Node`
`createTranslation(String edition, Locale locale, com.fasterxml.jackson.databind.node.ObjectNode object)`
Creates a new translation.
`com.fasterxml.jackson.databind.node.ObjectNode`
`fileFolderTree()`
`com.fasterxml.jackson.databind.node.ObjectNode`
`fileFolderTree(String basePath)`
`com.fasterxml.jackson.databind.node.ObjectNode`
`fileFolderTree(String basePath, int depth, List<String> leafPaths, boolean includeProperties, boolean containersOnly, com.fasterxml.jackson.databind.node.ObjectNode query)`
`com.fasterxml.jackson.databind.node.ObjectNode`
`fileFolderTree(String basePath, String leafPath)`
`com.fasterxml.jackson.databind.node.ObjectNode`
`fileFolderTree(TreeLookupOptions options)`
`org.gitana.platform.support.ResultMap<BaseNode>`
`findNodes(com.fasterxml.jackson.databind.node.ObjectNode query, String searchTerm, com.fasterxml.jackson.databind.node.ObjectNode traverse)`
Queries and searches for nodes in the defined traversal space around this node.
`org.gitana.platform.support.ResultMap<BaseNode>`
`findNodes(com.fasterxml.jackson.databind.node.ObjectNode query, String searchTerm, com.fasterxml.jackson.databind.node.ObjectNode traverse, LookupOptions options)`
Queries and searches for nodes in the defined traversal space around this node.
`org.gitana.platform.support.ResultMap<BaseNode>`
`findNodes(com.fasterxml.jackson.databind.node.ObjectNode query, String searchTerm, com.fasterxml.jackson.databind.node.ObjectNode traverse, org.gitana.platform.support.Pagination pagination)`
Queries and searches for nodes in the defined traversal space around this node.
`List<String>`
`getTranslationEditions()`
`List<Locale>`
`getTranslationLocales(String edition)`
Hands back the locales available for a given edition of translations for this master node.
`org.gitana.platform.support.ResultMap<BaseNode>`
`listChildren()`
Retrieves the children of the current node.
`org.gitana.platform.support.ResultMap<BaseNode>`
`listChildren(org.gitana.platform.support.Pagination pagination)`
Retrieves the children of the current node.
`org.gitana.platform.support.ResultMap<BaseNode>`
`listRelatives(org.gitana.platform.support.QName type, org.gitana.platform.services.association.Direction direction)`
Retrieves the relatives of the current node.
`org.gitana.platform.support.ResultMap<BaseNode>`
`listRelatives(org.gitana.platform.support.QName type, org.gitana.platform.services.association.Direction direction, org.gitana.platform.support.Pagination pagination)`
Retrieves the relatives of the current node.
`void`
`mount(String mountKey)`
Mounts this node.
`void`
`move(String targetNodeId)`
`void`
`move(String targetNodeId, String targetPath)`
Moves the node to a configured target node
`org.gitana.platform.support.ResultMap<BaseNode>`
`queryRelatives(org.gitana.platform.support.QName type, org.gitana.platform.services.association.Direction direction, com.fasterxml.jackson.databind.node.ObjectNode query)`
Queries the relatives of the current node.
`org.gitana.platform.support.ResultMap<BaseNode>`
`queryRelatives(org.gitana.platform.support.QName type, org.gitana.platform.services.association.Direction direction, com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)`
Queries the relatives of the current node.
`Node`
`readTranslation(String edition, Locale locale)`
Reads a translation for the specified edition of the master node in the given locale.
`Node`
`readTranslation(Locale locale)`
Reads a translation for the tip edition of the master node in the given locale.
`String`
`resolvePath()`
Resolves the path for the node relative to the root directory.
`com.fasterxml.jackson.databind.node.ObjectNode`
`resolvePaths()`
Resolves all of the paths for the node.
`TraversalResults`
`traverse(com.fasterxml.jackson.databind.node.ObjectNode traverse)`
Runs a traversal around this node using the given configuration.
`void`
`unassociate(Node targetNode, org.gitana.platform.support.QName associationTypeQName)`
Unassociates a target node from this node.
`void`
`unassociate(Node otherNode, org.gitana.platform.support.QName associationTypeQName, org.gitana.platform.services.association.Directionality directionality)`
Unassociates this node from another node.
`void`
`unmount()`
Unmounts this node.

### 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.attachment.Attachable

`deleteAttachment, deleteAttachment, downloadAttachment, downloadAttachment, getDownloadUri, listAttachments, uploadAttachment, uploadAttachment, uploadAttachment, uploadAttachments, uploadAttachments`

### Methods inherited from interface org.gitana.platform.client.node.BaseNode

`addFeature, getBranch, getBranchId, getChangeset, getChangesetId, getFeature, getFeatureIds, getQName, getRepository, getRepositoryId, getTypeQName, hasFeature, isDeleted, removeFeature, touch`

### 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, reload, update`

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

### associations

org.gitana.platform.support.ResultMap<Association> associations()
Lists all associations in ANY direction involving this node.

Returns:
  map

### associations

org.gitana.platform.support.ResultMap<Association> associations(org.gitana.platform.support.Pagination pagination)
Lists all associations in ANY direction involving this node.

Parameters:
  `pagination` -
Returns:
  map

### associations

org.gitana.platform.support.ResultMap<Association> associations(org.gitana.platform.services.association.Direction direction)
Lists all association in the given direction involving this node.

Parameters:
  `direction` -
Returns:
  map

### associations

org.gitana.platform.support.ResultMap<Association> associations(org.gitana.platform.services.association.Direction direction, org.gitana.platform.support.Pagination pagination)
Lists all association in the given direction involving this node.

Parameters:
  `direction` -
  `pagination` -
Returns:
  map

### associations

org.gitana.platform.support.ResultMap<Association> associations(org.gitana.platform.support.QName associationTypeQName)
Lists all associations of the given type in ANY direction involving this node.

Parameters:
  `associationTypeQName` -
Returns:
  map

### associations

org.gitana.platform.support.ResultMap<Association> associations(org.gitana.platform.support.QName associationTypeQName, org.gitana.platform.support.Pagination pagination)
Lists all associations of the given type in ANY direction involving this node.

Parameters:
  `associationTypeQName` -
  `pagination` -
Returns:
  map

### associations

org.gitana.platform.support.ResultMap<Association> associations(org.gitana.platform.support.QName associationTypeQName, org.gitana.platform.services.association.Direction direction)
Lists all associations of the given type in the specified direction.

Parameters:
  `associationTypeQName` -
  `direction` -
Returns:
  map

### associations

org.gitana.platform.support.ResultMap<Association> associations(org.gitana.platform.support.QName associationTypeQName, org.gitana.platform.services.association.Direction direction, org.gitana.platform.support.Pagination pagination)
Lists all associations of the given type in the specified direction.

Parameters:
  `associationTypeQName` -
  `direction` -
  `pagination` -
Returns:
  map

### associate

Association associate(Node targetNode, org.gitana.platform.support.QName associationTypeQName)
Associates a target node to this source node. The direction is OUTGOING from this node to the specified node.

Parameters:
  `targetNode` -
  `associationTypeQName` -
Returns:
  association

### associate

Association associate(Node targetNode, org.gitana.platform.support.QName associationTypeQName, com.fasterxml.jackson.databind.node.ObjectNode object)
Associates a target node to this source node. The direction is OUTGOING from this node to the specified node.

Parameters:
  `targetNode` -
  `associationTypeQName` -
  `object` -
Returns:
  association

### associate

Association associate(Node otherNode, org.gitana.platform.support.QName associationTypeQName, org.gitana.platform.services.association.Directionality directionality)
Associates this node with another.

Parameters:
  `otherNode` -
  `associationTypeQName` -
  `directionality` -
Returns:
  association

### associate

Association associate(Node otherNode, org.gitana.platform.support.QName associationTypeQName, org.gitana.platform.services.association.Directionality directionality, com.fasterxml.jackson.databind.node.ObjectNode object)
Associates this node with another.

Parameters:
  `otherNode` -
  `associationTypeQName` -
  `directionality` -
  `object` -
Returns:
  association

### unassociate

void unassociate(Node targetNode, org.gitana.platform.support.QName associationTypeQName)
Unassociates a target node from this node.

Parameters:
  `targetNode` -
  `associationTypeQName` -

### unassociate

void unassociate(Node otherNode, org.gitana.platform.support.QName associationTypeQName, org.gitana.platform.services.association.Directionality directionality)
Unassociates this node from another node.

Parameters:
  `otherNode` -
  `associationTypeQName` -
  `directionality` -

### traverse

TraversalResults traverse(com.fasterxml.jackson.databind.node.ObjectNode traverse)
Runs a traversal around this node using the given configuration.

Parameters:
  `traverse` -
Returns:

### move

void move(String targetNodeId, String targetPath)
Moves the node to a configured target node

Parameters:
  `targetNodeId` - id of target folder, default is "root" for top folder
  `targetPath` - optional relative path to apply to targetNodeId for determining move target

### move

void move(String targetNodeId)

### resolvePath

String resolvePath()
Resolves the path for the node relative to the root directory.

Returns:
  the path

### resolvePaths

com.fasterxml.jackson.databind.node.ObjectNode resolvePaths()
Resolves all of the paths for the node.

Returns:
  paths keyed by root identifier

### mount

void mount(String mountKey)
Mounts this node.

Parameters:
  `mountKey` -

### unmount

void unmount()
Unmounts this node.

### createTranslation

Node createTranslation(String edition, Locale locale, com.fasterxml.jackson.databind.node.ObjectNode object)
Creates a new translation.

Parameters:
  `edition` - the edition
  `locale` - the locale
  `object` - the json object
Returns:
  node

### getTranslationEditions

List<String> getTranslationEditions()

Returns:
  the editions available for this master node

### getTranslationLocales

List<Locale> getTranslationLocales(String edition)
Hands back the locales available for a given edition of translations for this master node.

Parameters:
  `edition` -
Returns:

### readTranslation

Node readTranslation(Locale locale)
Reads a translation for the tip edition of the master node in the given locale.

Parameters:
  `locale` -
Returns:

### readTranslation

Node readTranslation(String edition, Locale locale)
Reads a translation for the specified edition of the master node in the given locale.

Parameters:
  `edition` -
  `locale` -
Returns:

### findNodes

org.gitana.platform.support.ResultMap<BaseNode> findNodes(com.fasterxml.jackson.databind.node.ObjectNode query, String searchTerm, com.fasterxml.jackson.databind.node.ObjectNode traverse)
Queries and searches for nodes in the defined traversal space around this node.

Parameters:
  `query` -
  `searchTerm` -
  `traverse` -
Returns:

### findNodes

org.gitana.platform.support.ResultMap<BaseNode> findNodes(com.fasterxml.jackson.databind.node.ObjectNode query, String searchTerm, com.fasterxml.jackson.databind.node.ObjectNode traverse, org.gitana.platform.support.Pagination pagination)
Queries and searches for nodes in the defined traversal space around this node.

Parameters:
  `query` -
  `searchTerm` -
  `traverse` -
  `pagination` -
Returns:

### findNodes

org.gitana.platform.support.ResultMap<BaseNode> findNodes(com.fasterxml.jackson.databind.node.ObjectNode query, String searchTerm, com.fasterxml.jackson.databind.node.ObjectNode traverse, LookupOptions options)
Queries and searches for nodes in the defined traversal space around this node.

Parameters:
  `query` -
  `searchTerm` -
  `traverse` -
  `options` -
Returns:

### fileFolderTree

com.fasterxml.jackson.databind.node.ObjectNode fileFolderTree()

### fileFolderTree

com.fasterxml.jackson.databind.node.ObjectNode fileFolderTree(String basePath)

### fileFolderTree

com.fasterxml.jackson.databind.node.ObjectNode fileFolderTree(String basePath, String leafPath)

### fileFolderTree

com.fasterxml.jackson.databind.node.ObjectNode fileFolderTree(String basePath, int depth, List<String> leafPaths, boolean includeProperties, boolean containersOnly, com.fasterxml.jackson.databind.node.ObjectNode query)

### fileFolderTree

com.fasterxml.jackson.databind.node.ObjectNode fileFolderTree(TreeLookupOptions options)

### listChildren

org.gitana.platform.support.ResultMap<BaseNode> listChildren()
Retrieves the children of the current node.

Returns:
  a map of node objects keyed by node id

### listChildren

org.gitana.platform.support.ResultMap<BaseNode> listChildren(org.gitana.platform.support.Pagination pagination)
Retrieves the children of the current node.

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

### listRelatives

org.gitana.platform.support.ResultMap<BaseNode> listRelatives(org.gitana.platform.support.QName type, org.gitana.platform.services.association.Direction direction)
Retrieves the relatives of the current node.

Parameters:
  `type` -
  `direction` -
Returns:
  a map of node objects keyed by node id

### listRelatives

org.gitana.platform.support.ResultMap<BaseNode> listRelatives(org.gitana.platform.support.QName type, org.gitana.platform.services.association.Direction direction, org.gitana.platform.support.Pagination pagination)
Retrieves the relatives of the current node.

Parameters:
  `type` -
  `direction` -
  `pagination` -
Returns:
  a map of node objects keyed by node id

### queryRelatives

org.gitana.platform.support.ResultMap<BaseNode> queryRelatives(org.gitana.platform.support.QName type, org.gitana.platform.services.association.Direction direction, com.fasterxml.jackson.databind.node.ObjectNode query)
Queries the relatives of the current node.

Parameters:
  `type` -
  `direction` -
  `query` -
Returns:
  map of nodes

### queryRelatives

org.gitana.platform.support.ResultMap<BaseNode> queryRelatives(org.gitana.platform.support.QName type, org.gitana.platform.services.association.Direction direction, com.fasterxml.jackson.databind.node.ObjectNode query, org.gitana.platform.support.Pagination pagination)
Queries the relatives of the current node.

Parameters:
  `type` -
  `direction` -
  `query` -
  `pagination` -
Returns:
  map of nodes