Merged CMIS063 to HEAD

17100: Chemistry: AtomPub TCK updates, Alfresco CMIS URL bindings, Delete Content Stream

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17258 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2009-10-30 14:23:42 +00:00
parent 6ab5dce512
commit ba3e8ad9c0
19 changed files with 1129 additions and 9 deletions

View File

@@ -116,6 +116,7 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
private String cmisVersion = "[undefined]";
// default CMIS store and path
private StoreRef defaultStoreRef;
private String defaultRootPath;
private Map<String, NodeRef> defaultRootNodeRefs;
@@ -134,12 +135,20 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
this.cmisVersion = cmisVersion;
}
/**
* Sets the default root store
*
* @param store store_type://store_id
*/
public void setDefaultStore(String store)
{
this.defaultStoreRef = new StoreRef(store);
}
/**
* Sets the default root path
*
* store_type/store_id/path...
*
* @param path store_type/store_id/path...
* @param path path within default store
*/
public void setDefaultRootPath(String path)
{
@@ -312,8 +321,9 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<NodeRef>()
{
public NodeRef execute() throws Exception
{
return repository.findNodeRef("path", defaultRootPath.split("/"));
{
String path = defaultStoreRef.getProtocol() + "/" + defaultStoreRef.getIdentifier() + defaultRootPath;
return repository.findNodeRef("path", path.split("/"));
};
});
}
@@ -337,6 +347,16 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
return getDefaultRootNodeRef().getStoreRef();
}
/*
* (non-Javadoc)
* @see org.alfresco.cmis.CMISServices#getNode(java.lang.String, java.lang.String[])
*/
public NodeRef getNode(String referenceType, String[] reference)
{
NodeRef nodeRef = repository.findNodeRef(referenceType, reference);
return nodeRef;
}
/*
* (non-Javadoc)
* @see org.alfresco.cmis.CMISServices#getChildren(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.cmis.CMISTypesFilterEnum)