06-02-2010 02:51 AM
12-23-2010 09:11 AM
HashMap<String, Object> prop1 = new HashMap<String, Object>();
prop1.put(PropertyIds.NAME , "Test 1");
prop1.put(PropertyIds.OBJECT_TYPE_ID, "D:ws:article");
HashMap<String, Object> prop2 = new HashMap<String, Object>();
prop2.put(PropertyIds.NAME , "Test 2");
prop2.put(PropertyIds.OBJECT_TYPE_ID, "D:ws:article");
Folder folder = (Folder) session.getObjectByPath("/");
Document doc1 = folder.createDocument(prop1, null, null, null, null, null, session.getDefaultContext());
Document doc2 = folder.createDocument(prop2, null, null, null, null, null, session.getDefaultContext());
Map<String, String> relProps = new HashMap<String, String>();
relProps.put("cmis:sourceId", doc1.getId());
relProps.put("cmis:targetId", doc2.getId());
relProps.put("cmis:objectTypeId", "R:ws:relatedArticles");
session.createRelationship(relProps, null, null, null);
01-02-2011 01:20 PM
01-13-2011 07:53 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.