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 9a966ac2b3
commit 673add1796
2 changed files with 225 additions and 15 deletions

View File

@@ -23,6 +23,7 @@ import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.alfresco.service.cmr.repository.AssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -151,7 +152,7 @@ public interface CMISServices
public AssociationRef[] getRelationships(NodeRef node, CMISTypeDefinition relDef, boolean includeSubTypes, CMISRelationshipDirectionEnum direction) throws CMISInvalidArgumentException;
/**
* Get a single property for a node.
* Get a single property belonging to the node's type.
*
* @param nodeRef
* the node
@@ -163,6 +164,22 @@ public interface CMISServices
*/
public Serializable getProperty(NodeRef nodeRef, String propertyName) throws CMISInvalidArgumentException;
/**
* Get a single property, optionally constrained to a given node type or aspect
*
* @param nodeRef
* the node
* @param typeDef
* the node type or aspect or <code>null</code> if any property can be returned
* @param propertyName
* the property name
* @return value
* @throws CMISInvalidArgumentException
* if an argument is invalid
*/
public Serializable getProperty(NodeRef nodeRef, CMISTypeDefinition typeDef, String propertyName)
throws CMISInvalidArgumentException;
/**
* Get a single property for an association.
*
@@ -175,7 +192,7 @@ public interface CMISServices
public Serializable getProperty(AssociationRef assocRef, String propertyName);
/**
* Get all properties.
* Get all properties of a node's type.
*
* @param nodeRef
* the node ref
@@ -186,7 +203,32 @@ public interface CMISServices
public Map<String, Serializable> getProperties(NodeRef nodeRef) throws CMISInvalidArgumentException;
/**
* Set a single property.
* Get all of a node's values for the properties in the given type or aspect.
*
* @param nodeRef
* the node ref
* @param typeDef
* the type or aspect definition
* @return the properties
* @throws CMISInvalidArgumentException
* if an argument is invalid
*/
public Map<String, Serializable> getProperties(NodeRef nodeRef, CMISTypeDefinition typeDef)
throws CMISInvalidArgumentException;
/**
* Gets the aspects applied to a node.
*
* @param nodeRef
* the node ref
* @return the aspect definitions
* @throws CMISInvalidArgumentException
* if an argument is invalid
*/
public Set<CMISTypeDefinition> getAspects(NodeRef nodeRef);
/**
* Set a single property belonging to the node's type.
*
* @param nodeRef
* the node ref
@@ -196,9 +238,47 @@ public interface CMISServices
* the value
* @throws CMISInvalidArgumentException
* if an argument is invalid
* @throws CMISConstraintException
* if the property cannot be set
*/
public void setProperty(NodeRef nodeRef, String propertyName, Serializable value) throws CMISInvalidArgumentException;
public void setProperty(NodeRef nodeRef, String propertyName, Serializable value)
throws CMISInvalidArgumentException, CMISConstraintException;
/**
* Set a single property, optionally constrained to a given node type or aspect
*
* @param nodeRef
* the node ref
* @param typeDef
* the node type or aspect or <code>null</code> if any valid property should be set (corresponding aspect
* added automatically).
* @param propertyName
* the property name
* @param value
* the value
* @throws CMISInvalidArgumentException
* if an argument is invalid
* @throws CMISConstraintException
* if the property cannot be set
*/
public void setProperty(NodeRef nodeRef, CMISTypeDefinition typeDef, String propertyName, Serializable value)
throws CMISInvalidArgumentException, CMISConstraintException;
/**
* 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 CMISInvalidArgumentException
* if an argument is invalid
*/
public void setAspects(NodeRef node, Iterable<String> aspectsToRemove, Iterable<String> aspectsToAdd)
throws CMISInvalidArgumentException;
/**
* Applies a versioning state to a new node, potentially resulting in a new node.
*