06-04-2014 06:16 AM
06-04-2014 06:29 AM
06-04-2014 07:09 AM
06-04-2014 11:19 AM
String urlStringPut = "http://192.168.0.33:8070/alfresco/service/api/node/workspace/SpacesStore/689ab69e-39ab-4e50-ac02-866..."
+ authTicket;
PutMethod put = new PutMethod(urlStringPut );
String test = FileUtils.readFileToString(new File("E:\\updateNode.xml")); //you can construct xml thro proggram,this is just a test.
put.setDoAuthentication(true);
put.setRequestHeader("Content-Type", "application/atom+xml");
put.setRequestEntity(new StringRequestEntity(test,
"application/atom+xml", "UTF-8"));
int status = client.executeMethod(put);
if (status != HttpStatus.SC_OK) {
System.err.println("Method failed: " + put.getStatusLine());
}
String resultString = put.getResponseBodyAsString();
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/" xmlns:alf="http://www.alfresco.org">
<summary>test modify cm:description property ahhahahah</summary> <!– summary is cm:description property–>
<title>test modify cm_name property</title> <!– title is cm:name property–>
<cmisra:object>
<cmis:properties>
<cmis:propertyInteger propertyDefinitionId="cmis:contentStreamLength" displayName="Content Stream Length" queryName="cmis:contentStreamLength">
<cmis:value>98495335</cmis:value>
</cmis:propertyInteger>
<alf:setAspects>
<alf:aspectsToAdd>P:cm:titled</alf:aspectsToAdd>
<alf:properties>
<cmis:propertyString propertyDefinitionId="cm:title" queryName="cm:title">
<cmis:value>New Title hahahahh</cmis:value>
</cmis:propertyString>
</alf:properties>
</alf:setAspects>
</cmis:properties>
</cmisra:object>
</entry>
06-05-2014 10:33 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.