05-17-2010 03:55 AM
…….
if (objectId == null)
{
// create node
node = createNode(model.parent, entry, slug, versioningState);
if (node == null)
{
break script;
}
node.save();
}
else if (sourceFolderId == null || sourceFolderId.length == 0)
{
// Add node
var object = getObjectFromObjectId(objectId);
if (object.node == null)
{
break script;
}
node = object.node;
//code to add?
cmis.addObjectToFolder(node, model.parent);
}
//———————————-
// success
model.node = node;
// TODO: set Content-Location
status.code = 201;
status.location = url.server + url.serviceContext + "/cmis/s/" + node.nodeRef.storeRef.protocol + ":" + node.nodeRef.storeRef.identifier + "/i/" + node.nodeRef.id;
status.redirect = true;
05-17-2010 09:17 AM
05-17-2010 10:51 AM
……………..Create Folder…
Abdera abdera = new Abdera();
Entry entry = abdera.newEntry();
entry.setTitle(newFoldersName);
entry.setSummary(newFoldersDescription);
ExtensibleElement objElement = (ExtensibleElement) entry.addExtension(NS_CMIS_RESTATOM, "object", CMISRA);
ExtensibleElement propsElement = objElement.addExtension(NS_CMIS_CORE, "properties", CMIS);
ExtensibleElement stringElement = propsElement.addExtension(NS_CMIS_CORE, "propertyId", CMIS);
…………..
String uri = server + "/alfresco/s/test/cmis/p/" + parentPath + "/test";
if (LOGGER.isLoggable(Level.INFO)) {
LOGGER.info("POST " + uri);
}
ClientResponse clientResponse = client.post(uri, entry, options);
AlfrescoResponse alfResponse = parseResponseWithDocument(clientResponse);
clientResponse.release();
return alfResponse;
…………..
05-17-2010 11:15 AM
05-18-2010 04:42 AM
05-19-2010 10:35 AM
05-19-2010 11:26 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.