public interface Nodes
| Modifier and Type | Method and Description |
|---|---|
List<AssocChild> |
addChildren(String parentNodeId,
List<AssocChild> entities) |
void |
addCustomAspects(NodeRef nodeRef,
List<String> aspectNames,
List<QName> exclusions)
Add aspects to the specified NodeRef.
|
List<AssocTarget> |
addTargets(String sourceNodeId,
List<AssocTarget> entities) |
Node |
createNode(String parentFolderNodeId,
Node nodeInfo,
Parameters parameters)
Create node - folder or (empty) file.
|
QName |
createQName(String qnameStr)
Helper to create a QName from either a fully qualified or short-name QName string
|
void |
deleteNode(String nodeId,
Parameters parameters)
Delete the given node.
|
QName |
getAssocType(String assocTypeQNameStr) |
QName |
getAssocType(String assocTypeQNameStr,
boolean mandatory) |
BinaryResource |
getContent(NodeRef nodeRef,
Parameters parameters,
boolean recordActivity)
Download file content.
|
BinaryResource |
getContent(String fileNodeId,
Parameters parameters,
boolean recordActivity)
Download file content.
|
Document |
getDocument(NodeRef nodeRef)
Get the document representation for the given node.
|
Folder |
getFolder(NodeRef nodeRef)
Get the folder representation for the given node.
|
Node |
getFolderOrDocument(NodeRef nodeRef,
NodeRef parentNodeRef,
QName nodeTypeQName,
List<String> includeParam,
Map<String,UserInfo> mapUserInfo)
Get the folder or document representation (as appropriate) for the given node.
|
Node |
getFolderOrDocument(String nodeId,
Parameters parameters)
Get the folder or document representation (as appropriate) for the given node.
|
Node |
getFolderOrDocumentFullInfo(NodeRef nodeRef,
NodeRef parentNodeRef,
QName nodeTypeQName,
Parameters parameters,
Map<String,UserInfo> mapUserInfo) |
Node |
getNode(String nodeId)
Get the node representation for the given node.
|
boolean |
isSubClass(NodeRef nodeRef,
QName ofClassQName,
boolean validateNodeRef)
Determines whether the type of the given nodeRef is a sub-class of another class or not.
|
CollectionWithPagingInfo<Node> |
listChildren(String parentFolderNodeId,
Parameters parameters)
Get list of children of a parent folder.
|
Node |
lock(String nodeId,
LockInfo lockInfo,
Parameters parameters)
Lock a node
|
PathInfo |
lookupPathInfo(NodeRef nodeRefIn,
ChildAssociationRef archivedParentAssoc)
Returns the path to the given nodeRef
nodeRefIn or the archived nodeRef archivedParentAssoc. |
List<String> |
mapFromNodeAspects(Set<QName> nodeAspects,
List<String> excludedNS,
List<QName> excludedAspects)
Map from aspects (Set of QName) retrieved from the repository to a
map List of String required that can be formatted/expressed as required
by the API JSON response for get nodes, get person etc.
|
Map<String,Object> |
mapFromNodeProperties(Map<QName,Serializable> nodeProps,
List<String> selectParam,
Map<String,UserInfo> mapUserInfo,
List<String> excludedNS,
List<QName> excludedProps)
Convert from node properties (map of QName to Serializable) retrieved from
the respository to a map of String to Object that can be formatted/expressed
as required by the API JSON response for get nodes, get person etc.
|
Set<QName> |
mapToNodeAspects(List<String> aspectNames)
Map from a String representation of aspect names to a set
of QName objects, as used by the repository.
|
Map<QName,Serializable> |
mapToNodeProperties(Map<String,Object> props)
Map from the JSON API format of properties (String to Object) to
the typical node properties map used by the repository (QName to Serializable).
|
Node |
moveOrCopyNode(String sourceNodeId,
String parentFolderNodeId,
String name,
Parameters parameters,
boolean isCopy)
Move or Copy node
|
boolean |
nodeMatches(NodeRef nodeRef,
Set<QName> expectedTypes,
Set<QName> excludedTypes) |
Node |
unlock(String nodeId,
Parameters parameters)
Unlock a node
|
Node |
updateContent(String fileNodeId,
BasicContentInfo contentInfo,
InputStream stream,
Parameters parameters)
Uploads file content (updates existing node with new content).
|
void |
updateCustomAspects(NodeRef nodeRef,
List<String> aspectNames,
List<QName> exclusions)
Update aspects for the specified NodeRef.
|
Node |
updateNode(String nodeId,
Node entity,
Parameters parameters)
Update node meta-data.
|
Node |
upload(String parentFolderNodeId,
org.springframework.extensions.webscripts.servlet.FormData formData,
Parameters parameters)
Uploads file content and meta-data into the repository.
|
NodeRef |
validateNode(NodeRef nodeRef) |
NodeRef |
validateNode(StoreRef storeRef,
String nodeId) |
NodeRef |
validateNode(String nodeId) |
NodeRef |
validateOrLookupNode(String nodeId,
String path) |
static final String PATH_ROOT
static final String PATH_MY
static final String PATH_SHARED
static final String OP_CREATE
static final String OP_DELETE
static final String OP_UPDATE
static final String OP_UPDATE_PERMISSIONS
static final String PARAM_RELATIVE_PATH
static final String PARAM_PERMANENT
static final String PARAM_INCLUDE_PROPERTIES
static final String PARAM_INCLUDE_PATH
static final String PARAM_INCLUDE_ASPECTNAMES
static final String PARAM_INCLUDE_ISLINK
static final String PARAM_INCLUDE_ISLOCKED
static final String PARAM_INCLUDE_ALLOWABLEOPERATIONS
static final String PARAM_INCLUDE_PERMISSIONS
static final String PARAM_INCLUDE_ISFAVORITE
static final String PARAM_INCLUDE_ASSOCIATION
static final String PARAM_ISFOLDER
static final String PARAM_ISFILE
static final String PARAM_INCLUDE_SUBTYPES
static final String PARAM_NAME
static final String PARAM_CREATEDAT
static final String PARAM_MODIFIEDAT
static final String PARAM_CREATEBYUSER
static final String PARAM_MODIFIEDBYUSER
static final String PARAM_MIMETYPE
static final String PARAM_SIZEINBYTES
static final String PARAM_NODETYPE
static final String PARAM_VERSION_MAJOR
static final String PARAM_VERSION_COMMENT
static final String PARAM_OVERWRITE
static final String PARAM_AUTO_RENAME
static final String PARAM_ISPRIMARY
static final String PARAM_ASSOC_TYPE
Node getNode(String nodeId)
nodeId - StringDocument getDocument(NodeRef nodeRef)
nodeRef - NodeRefFolder getFolder(NodeRef nodeRef)
nodeRef - NodeRefNode getFolderOrDocument(String nodeId, Parameters parameters)
nodeId - String nodeId or well-known alias, eg. "-root-" or "-my-"parameters - the Parameters object to get the parameters passed into the request
including:
- incPrimaryParentNode getFolderOrDocumentFullInfo(NodeRef nodeRef, NodeRef parentNodeRef, QName nodeTypeQName, Parameters parameters, Map<String,UserInfo> mapUserInfo)
Node getFolderOrDocument(NodeRef nodeRef, NodeRef parentNodeRef, QName nodeTypeQName, List<String> includeParam, Map<String,UserInfo> mapUserInfo)
nodeRef - A real NodeparentNodeRef - nodeTypeQName - includeParam - mapUserInfo - CollectionWithPagingInfo<Node> listChildren(String parentFolderNodeId, Parameters parameters)
parentFolderNodeId - String id of parent folder node or well-known alias, eg. "-root-" or "-my-"parameters - the Parameters object to get the parameters passed into the request
including:
- filter, sort & paging params (where, orderBy, skipCount, maxItems)
- incFiles, incFolders (both true by default)org.alfresco.rest.api.model.Node objectsvoid deleteNode(String nodeId, Parameters parameters)
nodeId - String id of node (folder or document)parameters - the Parameters object to get the parameters passed into the request
- permanent (default false)Node createNode(String parentFolderNodeId, Node nodeInfo, Parameters parameters)
parentFolderNodeId - nodeInfo - parameters - Node moveOrCopyNode(String sourceNodeId, String parentFolderNodeId, String name, Parameters parameters, boolean isCopy)
sourceNodeId - parentFolderNodeId - name - parameters - Node updateNode(String nodeId, Node entity, Parameters parameters)
nodeId - entity - parameters - BinaryResource getContent(String fileNodeId, Parameters parameters, boolean recordActivity)
fileNodeId - parameters - recordActivity - true, if an activity post is required.BinaryResource getContent(NodeRef nodeRef, Parameters parameters, boolean recordActivity)
nodeRef - the content nodeRefparameters - recordActivity - true, if an activity post is required.Node updateContent(String fileNodeId, BasicContentInfo contentInfo, InputStream stream, Parameters parameters)
fileNodeId - contentInfo - stream - parameters - Node upload(String parentFolderNodeId, org.springframework.extensions.webscripts.servlet.FormData formData, Parameters parameters)
parentFolderNodeId - String id of parent folder node or well-known alias, eg. "-root-" or "-my-"formData - the FormDataparameters - the Parameters object to get the parameters passed into the requestNode if successfulboolean nodeMatches(NodeRef nodeRef, Set<QName> expectedTypes, Set<QName> excludedTypes)
boolean isSubClass(NodeRef nodeRef, QName ofClassQName, boolean validateNodeRef)
nodeRef - source nodeRefofClassQName - the class to test againstvalidateNodeRef - whether to validate the given source node or notQName createQName(String qnameStr)
qnameStr - Fully qualified or short-name QName stringList<AssocChild> addChildren(String parentNodeId, List<AssocChild> entities)
parentNodeId - entities - List<AssocTarget> addTargets(String sourceNodeId, List<AssocTarget> entities)
sourceNodeId - entities - Node lock(String nodeId, LockInfo lockInfo, Parameters parameters)
nodeId - lockInfo - parameters - Node unlock(String nodeId, Parameters parameters)
nodeId - parameters - Map<String,Object> mapFromNodeProperties(Map<QName,Serializable> nodeProps, List<String> selectParam, Map<String,UserInfo> mapUserInfo, List<String> excludedNS, List<QName> excludedProps)
Returns null if there are no properties to return, rather than an empty map.
nodeProps - selectParam - mapUserInfo - excludedNS - excludedProps - Map<QName,Serializable> mapToNodeProperties(Map<String,Object> props)
props - PathInfo lookupPathInfo(NodeRef nodeRefIn, ChildAssociationRef archivedParentAssoc)
nodeRefIn or the archived nodeRef archivedParentAssoc.nodeRefIn - the NodeRefarchivedParentAssoc - the ChildAssociationRef of the archived NodeRefSet<QName> mapToNodeAspects(List<String> aspectNames)
aspectNames - List<String> mapFromNodeAspects(Set<QName> nodeAspects, List<String> excludedNS, List<QName> excludedAspects)
Returns null if there are no aspect names to return, rather than an empty list.
nodeAspects - excludedNS - excludedAspects - void addCustomAspects(NodeRef nodeRef, List<String> aspectNames, List<QName> exclusions)
nodeRef - aspectNames - exclusions - Copyright © 2005–2021 Alfresco Software. All rights reserved.