mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Allow management of Alfresco Aspects through CMIS REST and SOAP APIs
- In CMIS methods that allow setting of node properties, the <cmis:properties> element may carry an <alf:setAspects> extension that lists - aspectsToRemove - aspectsToAdd - properties (properties to set belonging to aspects rather than the node type) - In CMIS methods that allow retrieval of node properties, the <cmis:properties> carries an <alf:getAspects> extension that lists - appliedAspects - properties (properties belonging to aspects rather than the node type) - Added extension types to Alfresco-Core.xsd and referenced in extended WSDL - Plumbed in to Web Service and REST APIs git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19037 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -563,6 +563,30 @@ public class CMISScript extends BaseScopableProcessorExtension
|
||||
return cmisDictionaryService.findProperty(propertyName, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the aspects on a node (Alfresco extension).
|
||||
*
|
||||
* @param node
|
||||
* the node
|
||||
* @param aspectsToRemove
|
||||
* the aspects to remove
|
||||
* @param aspectsToAdd
|
||||
* the aspects to add
|
||||
* @throws WebScriptException
|
||||
* if an argument is invalid
|
||||
*/
|
||||
public void setAspects(ScriptNode node, Iterable<String> aspectsToRemove, Iterable<String> aspectsToAdd)
|
||||
{
|
||||
try
|
||||
{
|
||||
cmisService.setAspects(node.getNodeRef(), aspectsToRemove, aspectsToAdd);
|
||||
}
|
||||
catch (CMISInvalidArgumentException e)
|
||||
{
|
||||
throw new WebScriptException(e.getStatusCode(), e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// SQL Query
|
||||
//
|
||||
|
Reference in New Issue
Block a user