03-15-2011 07:09 AM
03-21-2011 05:28 AM
String categoryName = "yourCategoryName";
ParentReference categoryParentRef = new ParentReference();
categoryParentRef.setStore(WORKSPACE_STORE);
categoryParentRef.setPath("/cm:categoryRoot/cm:generalclassifiable");
categoryParentRef.setChildName(Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, categoryName));
categoryParentRef.setAssociationType(Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, "subcategories"));
NamedValue[] categoryProperties = new NamedValue[] { Utils.createNamedValue(Constants.PROP_NAME, categoryName) };
CMLCreate createCategory = new CMLCreate("addCategory", categoryParentRef, null, Constants.ASSOC_CONTAINS, null, Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, "category"), categoryProperties);
CML cml = new CML();
cml.setCreate(new CMLCreate[]{ createCategory });
UpdateResult[] updateResult = getRepositoryService().update(cml);
Reference categoryReference = updateResult[0].getDestination();
04-05-2011 01:46 AM
05-17-2011 02:18 PM
05-23-2011 05:42 AM
And how can I create a new Classification?
05-23-2011 05:56 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.