public interface Nodes
Modifier and Type | Method and Description |
---|---|
List<AssocChild> |
addChildren(String parentNodeId,
List<AssocChild> entities) |
void |
addCustomAspects(org.alfresco.service.cmr.repository.NodeRef nodeRef,
List<String> aspectNames,
List<org.alfresco.service.namespace.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.
|
org.alfresco.service.namespace.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.
|
org.alfresco.service.namespace.QName |
getAssocType(String assocTypeQNameStr) |
org.alfresco.service.namespace.QName |
getAssocType(String assocTypeQNameStr,
boolean mandatory) |
BinaryResource |
getContent(org.alfresco.service.cmr.repository.NodeRef nodeRef,
Parameters parameters,
boolean recordActivity)
Download file content.
|
BinaryResource |
getContent(String fileNodeId,
Parameters parameters,
boolean recordActivity)
Download file content.
|
Document |
getDocument(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Get the document representation for the given node.
|
Folder |
getFolder(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Get the folder representation for the given node.
|
Node |
getFolderOrDocument(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.cmr.repository.NodeRef parentNodeRef,
org.alfresco.service.namespace.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(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.cmr.repository.NodeRef parentNodeRef,
org.alfresco.service.namespace.QName nodeTypeQName,
Parameters parameters,
Map<String,UserInfo> mapUserInfo) |
Node |
getNode(String nodeId)
Get the node representation for the given node.
|
boolean |
isSubClass(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.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(org.alfresco.service.cmr.repository.NodeRef nodeRefIn,
org.alfresco.service.cmr.repository.ChildAssociationRef archivedParentAssoc)
Returns the path to the given nodeRef
nodeRefIn or the archived nodeRef archivedParentAssoc . |
List<String> |
mapFromNodeAspects(Set<org.alfresco.service.namespace.QName> nodeAspects,
List<String> excludedNS,
List<org.alfresco.service.namespace.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<org.alfresco.service.namespace.QName,Serializable> nodeProps,
List<String> selectParam,
Map<String,UserInfo> mapUserInfo,
List<String> excludedNS,
List<org.alfresco.service.namespace.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<org.alfresco.service.namespace.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<org.alfresco.service.namespace.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(org.alfresco.service.cmr.repository.NodeRef nodeRef,
Set<org.alfresco.service.namespace.QName> expectedTypes,
Set<org.alfresco.service.namespace.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(org.alfresco.service.cmr.repository.NodeRef nodeRef,
List<String> aspectNames,
List<org.alfresco.service.namespace.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.
|
org.alfresco.service.cmr.repository.NodeRef |
validateNode(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
org.alfresco.service.cmr.repository.NodeRef |
validateNode(org.alfresco.service.cmr.repository.StoreRef storeRef,
String nodeId) |
org.alfresco.service.cmr.repository.NodeRef |
validateNode(String nodeId) |
org.alfresco.service.cmr.repository.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_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(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- NodeRefFolder getFolder(org.alfresco.service.cmr.repository.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(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.repository.NodeRef parentNodeRef, org.alfresco.service.namespace.QName nodeTypeQName, Parameters parameters, Map<String,UserInfo> mapUserInfo)
Node getFolderOrDocument(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.repository.NodeRef parentNodeRef, org.alfresco.service.namespace.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(org.alfresco.service.cmr.repository.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 FormData
parameters
- the Parameters
object to get the parameters passed into the requestNode
if successfulorg.alfresco.service.cmr.repository.NodeRef validateNode(org.alfresco.service.cmr.repository.StoreRef storeRef, String nodeId)
org.alfresco.service.cmr.repository.NodeRef validateNode(String nodeId)
org.alfresco.service.cmr.repository.NodeRef validateNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
org.alfresco.service.cmr.repository.NodeRef validateOrLookupNode(String nodeId, String path)
boolean nodeMatches(org.alfresco.service.cmr.repository.NodeRef nodeRef, Set<org.alfresco.service.namespace.QName> expectedTypes, Set<org.alfresco.service.namespace.QName> excludedTypes)
boolean isSubClass(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName ofClassQName, boolean validateNodeRef)
nodeRef
- source nodeRefofClassQName
- the class to test againstvalidateNodeRef
- whether to validate the given source node or notorg.alfresco.service.namespace.QName createQName(String qnameStr)
qnameStr
- Fully qualified or short-name QName stringorg.alfresco.service.namespace.QName getAssocType(String assocTypeQNameStr)
org.alfresco.service.namespace.QName getAssocType(String assocTypeQNameStr, boolean mandatory)
List<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<org.alfresco.service.namespace.QName,Serializable> nodeProps, List<String> selectParam, Map<String,UserInfo> mapUserInfo, List<String> excludedNS, List<org.alfresco.service.namespace.QName> excludedProps)
Returns null if there are no properties to return, rather than an empty map.
nodeProps
- selectParam
- mapUserInfo
- excludedNS
- excludedProps
- Map<org.alfresco.service.namespace.QName,Serializable> mapToNodeProperties(Map<String,Object> props)
props
- PathInfo lookupPathInfo(org.alfresco.service.cmr.repository.NodeRef nodeRefIn, org.alfresco.service.cmr.repository.ChildAssociationRef archivedParentAssoc)
nodeRefIn
or the archived nodeRef archivedParentAssoc
.nodeRefIn
- the NodeRefarchivedParentAssoc
- the ChildAssociationRef of the archived NodeRefSet<org.alfresco.service.namespace.QName> mapToNodeAspects(List<String> aspectNames)
aspectNames
- List<String> mapFromNodeAspects(Set<org.alfresco.service.namespace.QName> nodeAspects, List<String> excludedNS, List<org.alfresco.service.namespace.QName> excludedAspects)
Returns null if there are no aspect names to return, rather than an empty list.
nodeAspects
- excludedNS
- excludedAspects
- void addCustomAspects(org.alfresco.service.cmr.repository.NodeRef nodeRef, List<String> aspectNames, List<org.alfresco.service.namespace.QName> exclusions)
nodeRef
- aspectNames
- exclusions
- void updateCustomAspects(org.alfresco.service.cmr.repository.NodeRef nodeRef, List<String> aspectNames, List<org.alfresco.service.namespace.QName> exclusions)
nodeRef
- aspectNames
- exclusions
- Copyright © 2005–2017 Alfresco Software. All rights reserved.