|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.remedy.cmdb.api.CMDBClass
The CMDBClass
class describes an CMDBClass object.
Field Summary | |
static int |
CMDB_CLASS_ABSTRACT_TYPE_DATA_REPLC
Data replication abstract class. |
static int |
CMDB_CLASS_ABSTRACT_TYPE_NONE
Not an abstract class. |
static int |
CMDB_CLASS_ABSTRACT_TYPE_REGULAR
Regular abstract class. |
static int |
CMDB_CLASS_CHARAC_ABSTRACT
The characteristic is Abstract for the CMDBClass. |
static int |
CMDB_CLASS_CHARAC_AUTHOR
The characteristic is Author for the CMDBClass. |
static int |
CMDB_CLASS_CHARAC_CATEGORIZATION_SUBCLASS
The characteristic is Subclass for the CMDBClass. |
static int |
CMDB_CLASS_CHARAC_CLASS_HIDDEN_PERMS
The characteristic is Hidden Permissions for the CMDBClass object. |
static int |
CMDB_CLASS_CHARAC_CLASS_VISIBLE_PERMS
The characteristic is Visible Permissions for the CMDBClass object. |
static int |
CMDB_CLASS_CHARAC_DESCRIPTION
The characteristic is Description for the CMDBClass. |
static int |
CMDB_CLASS_CHARAC_FINAL
The characteristic is Final for the CMDBClass. |
static int |
CMDB_CLASS_CHARAC_FORM_NAME
The characteristic is form name of the CMDBClass. |
static int |
CMDB_CLASS_CHARAC_NONE
No characteristic for the CMDBClass. |
static int |
CMDB_CLASS_CHARAC_SINGLETON
The characteristic is Singleton for the CMDBClass. |
static int |
CMDB_DELETE_CLASS_OPTION_ALL_DEPENDENCIES
Delete class, all its derived classes and all its dependent relationship classes. |
static int |
CMDB_DELETE_CLASS_OPTION_NONE
Delete the class only if the class contains no instances and has no derived classes or dependent relationships. |
static int |
CMDB_DELETE_CLASS_OPTION_WITH_DATA
Delete the class only if the class has no derived classes or dependent relationships |
Constructor Summary | |
CMDBClass(CMDBClassNameKey classKey,
CMDBClassNameKey aSuperClassKey)
Creates an CMDBClass object with minimum information. |
|
CMDBClass(CMDBClassNameKey aNameKey,
CMDBClassNameKey aSuperClassKey,
java.util.Map anAttributeMap,
CMDBIndex[] indexArray)
Constructor that sets CMDBClass with the information provided and generates a unique GUID as the class ID of the CMDBClass object. |
|
CMDBClass(CMDBClassNameKey classKey,
java.lang.String classId,
CMDBClassNameKey aSuperClassKey)
Create an CMDBClass object with minimum information. |
Method Summary | |
void |
addCustomCharacteristic(int charactId,
Value charactVal)
Adds the specified custom characteristic to the class. |
void |
create(ARServerUser context)
Creates the current CMDBClass object in AR System. |
static void |
delete(ARServerUser context,
CMDBClassNameKey classKey,
int deleteOption)
Deletes the current CMDBClass object from AR System. |
static CMDBClassNameKey[] |
find(ARServerUser context,
java.lang.String aNamespace,
CMDBClassNameKey relatedClassKey,
CMDBClassNameKey superClass,
PropInfo[] characQuery,
boolean getHiddenClasses)
Find names of all CMDBClass objects that satisfy the specified query criteria. |
static CMDBClass |
findByKey(ARServerUser context,
CMDBClassNameKey searchKey,
boolean getHiddenAttribute,
boolean getDerivedAttrs)
Finds the specified CMDBClass object in AR System. |
static CMDBClass |
findByKey(ARServerUser context,
CMDBClassNameKey searchKey,
boolean getHiddenAttribute,
boolean getDerivedAttrs,
PropInfo[] attrCharacQuery)
Finds the specified CMDBClass object in AR System. |
int |
getAbstract()
Returns the Abstract characteristic. |
CMDBAttribute |
getAttributeByName(java.lang.String attributeName)
Finds the attribute in the class using the provided attribute name as a search key. |
java.util.Map |
getAttributes()
Gets all the attributes of the CMDBClass object. |
CMDBAuditInfo |
getAuditInfo()
Gets the audit info of the CMDBClass object. |
java.lang.String |
getAuthor()
Returns the Author characteristic. |
boolean |
getCategorizationSubclass()
Returns the Categorization Subclass characteristic. |
java.lang.String |
getClassFormName()
Returns the Class form name characteristic. |
java.lang.String |
getClassHiddenPerms()
Returns the Class Hidden Permission characteristic. |
java.lang.String |
getClassVisiblePerms()
Returns the Class Visible Permission characteristic. |
Value |
getCustomCharacteristic(int charactId)
Gets the specified custom characteristic. |
java.util.Map |
getCustomCharacteristicMap()
Retrieves all custom characteristics as a map. |
java.lang.String |
getDescription()
Returns the Description characteristic. |
boolean |
getFinal()
Returns the Final characteristic. |
java.lang.String |
getId()
Gets the ID of the CMDBClass object. |
CMDBIndex[] |
getIndexes()
Gets the index of the CMDBClass object. |
java.lang.String[] |
getKeyAttributeNames()
Gets the names of key attributes that identify each CMDBClass object. |
java.util.Map |
getKeyAttributes()
Gets all the key attributes that identify each CMDBClass object. |
CMDBClassNameKey |
getNameKey()
Gets the name key of the CMDBClass object. |
boolean |
getSingleton()
Returns the Singleton characteristic. |
CMDBClassNameKey |
getSuperclassKey()
Gets the key of the super class. |
void |
removeAllCustomCharacteristic()
Removes all custom characteristics from the class. |
void |
removeCustomCharacteristic(int charactId)
Removes the specified custom characteristic from the class. |
void |
setAbstract(int abstractType)
Sets the Abstract characteristic. |
void |
setAttributes(java.util.Map newAttributeMap)
Sets/replaces all the attributes of the CMDBclass. |
void |
setAuditInfo(CMDBAuditInfo aAuditInfo)
Sets the audit info of an CMDBClass object. |
void |
setAuthor(java.lang.String authorName)
Sets the Author characteristic. |
void |
setCategorizationSubclass(boolean isCateSubclass)
Sets the Categorization Subclass characteristic. |
void |
setClassHiddenPerms(java.lang.String classHiddenPerm)
Sets the Class Hidden Permission characteristic. |
void |
setClassVisiblePerms(java.lang.String classVisiblePerm)
Sets the Class Visible Permission characteristic. |
void |
setDescription(java.lang.String description)
Sets the Description characteristic. |
void |
setFinal(boolean isFinal)
Sets the Final characteristic. |
void |
setIndexes(CMDBIndex[] indexArray)
Sets the index of the CMDBClass object. |
void |
setNameKey(CMDBClassNameKey aNameKey)
Sets the name key of an CMDBClass object. |
void |
setNewNameKey(CMDBClassNameKey aNewNameKey)
Changes the name key of an CMDBClass object. |
void |
setSingleton(boolean isSingleton)
Sets the Singleton characteristic. |
void |
update(ARServerUser context)
Saves the change made to the current CMDBClass object in AR System. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int CMDB_DELETE_CLASS_OPTION_NONE
public static final int CMDB_DELETE_CLASS_OPTION_WITH_DATA
public static final int CMDB_DELETE_CLASS_OPTION_ALL_DEPENDENCIES
public static final int CMDB_CLASS_ABSTRACT_TYPE_NONE
public static final int CMDB_CLASS_ABSTRACT_TYPE_REGULAR
public static final int CMDB_CLASS_ABSTRACT_TYPE_DATA_REPLC
public static final int CMDB_CLASS_CHARAC_NONE
public static final int CMDB_CLASS_CHARAC_SINGLETON
public static final int CMDB_CLASS_CHARAC_ABSTRACT
public static final int CMDB_CLASS_CHARAC_FINAL
public static final int CMDB_CLASS_CHARAC_AUTHOR
public static final int CMDB_CLASS_CHARAC_DESCRIPTION
public static final int CMDB_CLASS_CHARAC_CLASS_HIDDEN_PERMS
public static final int CMDB_CLASS_CHARAC_CLASS_VISIBLE_PERMS
public static final int CMDB_CLASS_CHARAC_CATEGORIZATION_SUBCLASS
public static final int CMDB_CLASS_CHARAC_FORM_NAME
Constructor Detail |
public CMDBClass(CMDBClassNameKey classKey, CMDBClassNameKey aSuperClassKey)
classKey
- a class keyaSuperClassKey
- the class key of the super classpublic CMDBClass(CMDBClassNameKey classKey, java.lang.String classId, CMDBClassNameKey aSuperClassKey)
classKey
- a class keyclassId
- the ID of the classaSuperClassKey
- the class key of the super classpublic CMDBClass(CMDBClassNameKey aNameKey, CMDBClassNameKey aSuperClassKey, java.util.Map anAttributeMap, CMDBIndex[] indexArray)
aNameKey
- the name key of the CMDBClass objectaSuperClassKey
- the key of the supper CMDBClassanAttributeMap
- Attributes of the class. The attributes
are organized as a map that uses the attribute name as
its map key and CMDBAttribute as its mapped value.indexArray
- an array of indexes
java.lang.IllegalArgumentException
- if the map value is not an expected oneMethod Detail |
public void addCustomCharacteristic(int charactId, Value charactVal)
charactId
- the ID of the characteristiccharactVal
- the value of the characteristic
java.lang.IllegalArgumentException
- if the characteristic is
not in the expected range.public java.lang.String getId()
public CMDBClassNameKey getNameKey()
public CMDBAuditInfo getAuditInfo()
public CMDBAttribute getAttributeByName(java.lang.String attributeName)
attributeName
- the name of the attribute to be retrieved
public java.util.Map getAttributes()
public java.util.Map getKeyAttributes()
public java.lang.String[] getKeyAttributeNames()
public CMDBIndex[] getIndexes()
public CMDBClassNameKey getSuperclassKey()
public boolean getSingleton()
public int getAbstract()
CMDB_CLASS_ABSTRACT_TYPE_NONE
,
CMDB_CLASS_ABSTRACT_TYPE_REGULAR
, or
CMDB_CLASS_ABSTRACT_TYPE_DATA_REPLC
.public boolean getFinal()
public java.lang.String getAuthor()
public java.lang.String getDescription()
public java.lang.String getClassHiddenPerms()
public java.lang.String getClassVisiblePerms()
public boolean getCategorizationSubclass()
public java.lang.String getClassFormName()
public Value getCustomCharacteristic(int charactId)
charactId
- the ID of the characteristic requested
java.lang.IllegalArgumentException
- if the characteristic is
not in the expected rangepublic java.util.Map getCustomCharacteristicMap()
java.lang.IllegalArgumentException
- if the characteristic is
not in the expected rangepublic void removeCustomCharacteristic(int charactId)
charactId
- the ID of the characteristic to be removed
java.lang.IllegalArgumentException
- if the characteristic is
not in the expected rangepublic void removeAllCustomCharacteristic()
public void setNameKey(CMDBClassNameKey aNameKey)
aNameKey
- the name key of CMDBclass objectpublic void setAuditInfo(CMDBAuditInfo aAuditInfo)
aAuditInfo
- the audit info of CMDBclass objectpublic void setNewNameKey(CMDBClassNameKey aNewNameKey)
update(com.remedy.arsys.api.ARServerUser)
method to modify the class name in AR System.
aNewNameKey
- the new name key of the CMDBClass objectpublic void setIndexes(CMDBIndex[] indexArray)
indexArray
- an array of class indexespublic void setAttributes(java.util.Map newAttributeMap)
newAttributeMap
- the new attribute map to be set.
java.lang.IllegalArgumentException
- if map value is not CMDBAttributepublic void setSingleton(boolean isSingleton)
isSingleton
- a boolean value for Singleton.public void setAbstract(int abstractType)
abstractType
- the type of Abstract, which can be
CMDB_CLASS_ABSTRACT_TYPE_NONE
CMDB_CLASS_ABSTRACT_TYPE_REGULAR
CMDB_CLASS_ABSTRACT_TYPE_DATA_REPLC
public void setFinal(boolean isFinal)
isFinal
- a boolean value for Final.public void setAuthor(java.lang.String authorName)
authorName
- a String object for Author.public void setDescription(java.lang.String description)
description
- a String object for Description.public void setClassHiddenPerms(java.lang.String classHiddenPerm)
classHiddenPerm
- a String object for ClassHiddenPermissionpublic void setClassVisiblePerms(java.lang.String classVisiblePerm)
classVisiblePerm
- a String object for ClassVisiblePermissionpublic void setCategorizationSubclass(boolean isCateSubclass)
isCateSubclass
- a boolean value for the Categorization Subclasspublic void create(ARServerUser context) throws ARException
context
- AR System user and host information
ARException
- if the class cannot be created in AR Systempublic void update(ARServerUser context) throws ARException
context
- AR System user and host information
ARException
- if the class cannot be modified in AR Systempublic static void delete(ARServerUser context, CMDBClassNameKey classKey, int deleteOption) throws ARException
context
- AR System user and host informationclassKey
- the name key of the class to be deleteddeleteOption
- delete option
ARException
- if the class cannot be deleted from AR Systempublic static CMDBClass findByKey(ARServerUser context, CMDBClassNameKey searchKey, boolean getHiddenAttribute, boolean getDerivedAttrs) throws ARException
context
- AR System user and host informationsearchKey
- the class name key of the CMDBClassgetHiddenAttribute
- specifies if a hidden attribute needs to be retrievedgetDerivedAttrs
- indicates if derived attributes will be retrieved
ARException
- if the requested class cannot be retrievedpublic static CMDBClass findByKey(ARServerUser context, CMDBClassNameKey searchKey, boolean getHiddenAttribute, boolean getDerivedAttrs, PropInfo[] attrCharacQuery) throws ARException
context
- AR System user and host informationsearchKey
- the class name key of the CMDBClassgetHiddenAttribute
- specifies if a hidden attribute needs to be retrievedgetDerivedAttrs
- indicates if derived attributes will be retrievedattrCharacQuery
- Returns attributes that have these characteristics.
If this argument is null, then the method will behave the same as
the above findByKey, which returns all attributes that have
the specified hidden and derive properties.
ARException
- if the requested class cannot be retrievedpublic static CMDBClassNameKey[] find(ARServerUser context, java.lang.String aNamespace, CMDBClassNameKey relatedClassKey, CMDBClassNameKey superClass, PropInfo[] characQuery, boolean getHiddenClasses) throws ARException
context
- AR System user and host informationaNamespace
- classes belongs to this namespacerelatedClassKey
- name keys of classes that relate to this classsuperClass
- classes that are inherited from this super classcharacQuery
- classes that have these characteristicsgetHiddenClasses
- flag indicates if hidden classes will be returned
ARException
- if failed to return all matched class objects
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |