02-03-2011 11:36 AM
String path1 = "/Sites/IQ/documentLibrary/test";
CmisObject object = s.getObjectByPath(path1);
AlfrescoDocument alfDoc = (AlfrescoDocument) object;
…..
if(alfDoc.hasAspect("P:cm:titled")) {
Map<String, Object> properties = new HashMap<String, Object>();
properties.put("cm:taggable", "MyTag");
alfDoc.updateProperties(properties);
}
02-03-2011 12:07 PM
02-03-2011 12:17 PM
02-03-2011 01:02 PM
Exception in thread "main" java.lang.NullPointerException
at org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl.convertProperties(Unknown Source)
at org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject.updateProperties(AbstractCmisObject.java:314)
at org.alfresco.cmis.client.impl.AlfrescoDocumentImpl.updateProperties(Unknown Source)
at org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject.updateProperties(AbstractCmisObject.java:277)
at Migration.dds.com.App.main(App.java:134)
02-03-2011 01:14 PM
properties.put("cm:taggable", list );
02-04-2011 05:55 AM
List<String> tags = new ArrayList<String>();
tags.add("workspace://SpacesStore/a807b10e-6dea-403f-88f1-33e2383890dd");
tags.add("workspace://SpacesStore/a728d30f-0bbe-48cf-9557-2d6b7cb63b45");
Map<String, Object> properties = new HashMap<String, Object>();
properties.put("cm:taggable", tags);
doc.updateProperties(properties);
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.