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:
Dave Ward
2010-03-03 18:03:58 +00:00
parent 5573c80e8d
commit 9cc0148e8c
16 changed files with 2798 additions and 2249 deletions

View File

@@ -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
//