com.ibm.ram.client
Class RAMCategory

java.lang.Object
  extended by com.ibm.ram.common.data.Category
      extended by com.ibm.ram.client.RAMCategory

public class RAMCategory
extends Category

Returns a category for an asset. Categories are contained in category schemas. Categories return subcategories, which you can set on an asset to categorize the asset. This object can be the definition of the category or the instance of the category that is applied to an asset.

Since:
7.1
Author:
kbauer
See Also:
RAMCategorySchema, RAMSubCategory

Method Summary
 RAMSubCategory createSubCategory(java.lang.String name)
          Create a new category to populate for upload Creates a new sub category for this category.
 void delete()
          Marks this category for deletion.
protected  java.lang.String getChildPath(Descriptor descriptor)
           
 java.lang.String getName()
           
 CategorySchema getSchema()
          Return the category schema this type belongs to
 SubCategory[] getSubCategories()
           
 SubCategory getSubCategory(java.lang.String name)
          Returns a category by name
 boolean isDirty()
          Returns true if this category has been modified.
 boolean isExclusive()
          If a Category's children are exclusive they cannot be selected along with child siblings.
 void setExclusive(boolean exclusive)
          Set the Category's children as exclusive
 void setName(java.lang.String name)
           
 void setSubCategories(SubCategory[] categories)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isExclusive

public boolean isExclusive()
If a Category's children are exclusive they cannot be selected along with child siblings.

Returns:
true if this is an exclusive sub-category
Since:
7.1.1

setExclusive

public void setExclusive(boolean exclusive)
Set the Category's children as exclusive

Parameters:
exclusive - children are exclusive
Since:
7.2.0.1

delete

public void delete()
Marks this category for deletion. The category won't be physically deleted from the repository until RAMSession.commitChanges(IProgressMonitor) or RAMSession.upload(IProgressMonitor) is called.

Since:
7.1

createSubCategory

public RAMSubCategory createSubCategory(java.lang.String name)
Create a new category to populate for upload Creates a new sub category for this category. This method should only be called on categories fetched from the session. Categories obtained from a asset are not modifiable.

Since:
7.1

getSubCategories

public SubCategory[] getSubCategories()
Overrides:
getSubCategories in class Category
Returns:
The list of sub categories.

getSubCategory

public SubCategory getSubCategory(java.lang.String name)
Description copied from class: Category
Returns a category by name

Overrides:
getSubCategory in class Category

getChildPath

protected java.lang.String getChildPath(Descriptor descriptor)
Parameters:
descriptor -
Returns:
Since:
7.1

getSchema

public CategorySchema getSchema()
Return the category schema this type belongs to

Returns:
Since:
7.1

getName

public java.lang.String getName()
Overrides:
getName in class Category
Returns:
The name of the category.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isDirty

public boolean isDirty()
Returns true if this category has been modified.

Since:
7.1

setName

public void setName(java.lang.String name)
Overrides:
setName in class Category
Parameters:
name - The name of the category.

setSubCategories

public void setSubCategories(SubCategory[] categories)
Overrides:
setSubCategories in class Category
Parameters:
categories - The list of sub categories.