Categorizing Assets at the Category level
Hi,
We have a category schema structure like below.
Schema-->Category-->subcategory (all are check boxes).
But we would like categorize at the "Category" level Only. How do we achieve this Using Java code.
In the API we saw that for Categorization we require a string. In our case we don't have any value for string because we want the categorization as schema/category
asset.categorize(categorzation,string);
Please suggest.Thanks in advance
Regards,
Abhilash
|
One answer
Gili Mendel (1.8k●5●6)
| answered Aug 20 '12, 10:07 a.m.
JAZZ DEVELOPER edited Aug 20 '12, 10:09 a.m.
Categorization in ram is structured as following:
Schema:Category->SubCategory->SubCategory ..... Assume: Software Development:Kind->Service->Interface RAMSession session = new RAMSession("https://server.ram/", "uid", "passwd"); session.setWebServiceTimeout(10000); RAMAsset asset = session.getAsset(new AssetIdentification("FC506B15-2A91-D60A-5995-B110045F26D0", "1.0")); RAMCategorySchema schema = session.getCategorySchema("Software Development"); RAMCategory cat = (RAMCategory)schema.getCategory("Kind"); RAMSubCategory sub = (RAMSubCategory)cat.getSubCategory("Service/Interface"); asset.categorize(sub); session.put(asset, new NullProgressMonitor()); session.release(); |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.