Hi,
I'm working on an application to update metadata of documents stored at CS through the EWS CS API. I'm now trying to find out how to correctly set the value of attribute A of a category C to V. Node that I would like to address the category by it's display name, not it's id. The category has already been defined at CS through the administration menu.
The following code snippet correctly locates the category, but has the above mentioned drawback that it requires the user to know it's id.
AttributeGroup group = docManagement.getCategoryTemplate(categoryId);
AttributeGroupDefinition groupDef = docManagement.getCategoryDefinition(categoryId);
The following code snippet works as expected, but I am afraid that this is true by accident (i.e. only because the category is defined as a node located directly in the CategoriesWS root node, which might not always be true).
Node rootNode = docManagement.getRootNode("CategoriesWS");
Node categoryNode = docManagement.getNodeByName(rootNode.getID(), categoryName);
AttributeGroup group = docManagement.getCategoryTemplate(categoryNode.getID());
AttributeGroupDefinition groupDef = docManagement.getCategoryDefinition(categoryNode.getID());
So, what is the correct way to find a category by it's display name through the EWS CS API?
Thank you in advance for your help.