|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bmc.cmdb.api.CMDBAttribute
public class CMDBAttribute
The CMDBAttribute
class allows you to work with
attributes for a BMC Atrium CMDB class. You can create the attribute
with a specified name, entry mode, and ID. CMDBAttributeLimit, which
is passed as a parameter for this class, holds the value limits for the
attribute and other properties specific to the attribute's type.
Value, which is also passed as a parameter for this class, holds the
value to apply if no value is provided.
After you create an attribute, you can add or remove custom
characteristics, perform queries against it, modify its
characteristics, and update its limit, name, and namespace.
Field Summary | |
---|---|
static int |
CMDB_ATTR_AUDITTYPE_AUDIT
Specifies that the audit type for this attribute is Audit, which means that changes to the instance are tracked either by creating a copy of the instance that was created, modified, or deleted, or by writing the changes to a log. |
static int |
CMDB_ATTR_AUDITTYPE_AUDIT_AND_COPY
Specifies that the audit type for this attribute is Audit and Copy, which means that changes to the instance are tracked by creating a copy of the instance that was created, modified, or deleted, and by writing the changes to a log. |
static int |
CMDB_ATTR_AUDITTYPE_COPY
Specifies that the audit type for this attribute is Copy, which means that changes to the instance are tracked by creating a copy of the instance that is created, modified, or deleted. |
static int |
CMDB_ATTR_AUDITTYPE_NONE
Specifies that the audit type for this attribute is none, which means that changes are not tracked. |
static int |
CMDB_ATTR_CHARAC_AUDIT_OPTION
Specifies that the audit information for this attribute will be stored. |
static int |
CMDB_ATTR_CHARAC_CHANGE_PERMS
Specifies the groups or roles that can view and modify the characteristics of the attribute. |
static int |
CMDB_ATTR_CHARAC_CREATE_MODE
Specifies the create mode for the attribute. |
static int |
CMDB_ATTR_CHARAC_DESCRIPTION
Specifies the description for the attribute. |
static int |
CMDB_ATTR_CHARAC_HIDDEN
Specifies whether the attribute is hidden. |
static int |
CMDB_ATTR_CHARAC_NAMESPACE
Specifies the namespace for the attribute. |
static int |
CMDB_ATTR_CHARAC_PRIMARY_KEY
Specifies whethre the attribute is a primary key. |
static int |
CMDB_ATTR_CHARAC_PROPAGATED_OWNER
Specifies the class and attribute from which the attribute is propagated through a weak relationship. |
static int |
CMDB_ATTR_CHARAC_VIEW_PERMS
Specifies the groups or roles that can view the attribute. |
static int |
CMDB_ATTR_CREATE_MODE_OPEN
Specifies that any user can work with this attribute. |
static int |
CMDB_ATTR_CREATE_MODE_PROTECTED
Specifies that only the user who has change permission can work with this attribute. |
static int |
CMDB_ATTR_ENTRYMODE_DISPLAY_ONLY
Specifies that the attribute is a display-only attribute that does not allow users to enter data. |
static int |
CMDB_ATTR_ENTRYMODE_NONE
Specifies that there is no entry mode. |
static int |
CMDB_ATTR_ENTRYMODE_OPTIONAL
Specifies that the attribute is an optional attribute that does not require users to enter data. |
static int |
CMDB_ATTR_ENTRYMODE_REQUIRED
Specifies that the attribute is a required attribute. |
static int |
CMDB_ATTR_TYPE_CORE
Specifies a core attribute, which is used for BMC Atrium CMDB processing. |
static int |
CMDB_ATTR_TYPE_CORE_INTERNAL
Specifies a core internal attribute, which is used for BMC Remedy AR System and BMC Atrium CMDB processing. |
static int |
CMDB_ATTR_TYPE_NONE
Specifies that the attribute has an attribute type of none. |
static int |
CMDB_ATTR_TYPE_REGULAR
Specifies that the attribute is a regular attribute. |
Constructor Summary | |
---|---|
CMDBAttribute(java.lang.String aName)
Creates an attribute with the given name. |
|
CMDBAttribute(java.lang.String aName,
int aEntryMode,
CMDBAttributeLimit aLimit,
Value aDefaultValue)
Creates an attribute with the provided name, entry mode, size limit, and default value. |
|
CMDBAttribute(java.lang.String aName,
long arFieldId)
Creates an attribute with the given name and field ID. |
|
CMDBAttribute(java.lang.String aName,
long arFieldId,
int aEntryMode,
CMDBAttributeLimit aLimit,
Value aDefaultValue)
Creates an attribute with the provided name, field ID, entry mode, limit, and default value. |
|
CMDBAttribute(java.lang.String aName,
java.lang.String attributeId)
Creates an attribute with the given name and attribute GUID. |
|
CMDBAttribute(java.lang.String aName,
java.lang.String attributeId,
int aEntryMode,
CMDBAttributeLimit aLimit,
Value aDefaultValue)
Creates an attribute with the provided name, attribute ID, entry mode, limit, and default value. |
|
CMDBAttribute(java.lang.String aName,
java.lang.String attributeId,
long arFieldId)
Creates an attribute with the given name, field ID and attribute GUID. |
|
CMDBAttribute(java.lang.String aName,
java.lang.String attributeId,
long arFieldId,
int aEntryMode,
CMDBAttributeLimit aLimit,
Value aDefaultValue)
Creates an attribute with the provided name, attribute ID, field ID, entry mode, limit, and default value. |
Method Summary | |
---|---|
void |
addCustomCharacteristic(int charactId,
Value charactVal)
Adds a custom characteristic to the attribute that uses the specified ID and value. |
int |
getAttributeType()
Gets the type of the attribute. |
int |
getAuditType()
Gets the audit type characteristic. |
CMDBClassNameKey |
getBaseClassName()
Gets the name of the base class to which the attribute is associated. |
java.lang.String |
getChangePermission()
Gets the change permission of the attribute. |
int |
getCreateMode()
Gets the create mode characteristic. |
Value |
getCustomCharacteristic(int charactId)
Gets the specified custom characteristic. |
java.util.Map |
getCustomCharacteristicMap()
Gets all custom characteristics as a map. |
int |
getDataType()
Gets the data type of the attribute. |
Value |
getDefaultValue()
Gets the default value of the attribute. |
java.lang.String |
getDescription()
Gets the attribute description. |
int |
getEntryMode()
Gets the entry mode of the attribute. |
long |
getFieldId()
Gets the ID of the BMC Atrium CMDB field that stores the attribute. |
boolean |
getHidden()
Gets the Boolean value that determines if the characteristic is Hidden. |
java.lang.String |
getId()
Gets the ID of the attribute. |
CMDBAttributeLimit |
getLimitInfo()
Gets the limit of the attribute. |
java.lang.String |
getName()
Gets the name of the attribute. |
java.lang.String |
getNamespace()
Returns the attribute namespace. |
java.lang.String |
getNewName()
Gets the new attribute name to be set in the BMC Atrium CMDB. |
boolean |
getPrimaryKey()
Gets the Boolean value that determines if the characteristic is a PrimaryKey. |
java.lang.String |
getPropagatedOwner()
Gets the propagated owner characteristic. |
java.lang.String |
getViewPermission()
Gets the view permission of the attribute. |
void |
removeAllCustomCharacteristic()
Removes all custom characteristics from the attribute. |
void |
removeCustomCharacteristic(int charactId)
Removes the specified custom characteristic from the attribute. |
void |
setAuditType(int auditType)
Sets the audit type characteristic for the attribute. |
void |
setChangePermission(java.lang.String changePerm)
Sets the change permission characteristic for the attribute. |
void |
setCreateMode(int createMode)
Sets the create mode characteristic for the attribute. |
void |
setDefaultValue(Value aDefaultVal)
Sets the default value of the attribute. |
void |
setDescription(java.lang.String description)
Sets the description for the attribute. |
void |
setEntryMode(int anEntryMode)
Sets the entry mode of the attribute. |
void |
setHidden(boolean isHidden)
Sets the hidden characteristic for the attribute. |
void |
setLimit(CMDBAttributeLimit aLimit)
Sets the limit of the attribute. |
void |
setName(java.lang.String aName)
Sets the name of the attribute. |
void |
setNamespace(java.lang.String namespace)
Sets the namespace for the attribute. |
void |
setNewName(java.lang.String aNewName)
Updates the name of attribute with a new name. |
void |
setViewPermission(java.lang.String viewPerm)
Sets the view permission characteristic for the attribute. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CMDB_ATTR_ENTRYMODE_NONE
public static final int CMDB_ATTR_ENTRYMODE_REQUIRED
public static final int CMDB_ATTR_ENTRYMODE_OPTIONAL
public static final int CMDB_ATTR_ENTRYMODE_DISPLAY_ONLY
public static final int CMDB_ATTR_TYPE_NONE
public static final int CMDB_ATTR_TYPE_CORE_INTERNAL
public static final int CMDB_ATTR_TYPE_CORE
public static final int CMDB_ATTR_TYPE_REGULAR
public static final int CMDB_ATTR_CHARAC_VIEW_PERMS
public static final int CMDB_ATTR_CHARAC_CHANGE_PERMS
public static final int CMDB_ATTR_CHARAC_HIDDEN
public static final int CMDB_ATTR_CHARAC_PRIMARY_KEY
public static final int CMDB_ATTR_CHARAC_PROPAGATED_OWNER
public static final int CMDB_ATTR_CHARAC_CREATE_MODE
public static final int CMDB_ATTR_CHARAC_AUDIT_OPTION
public static final int CMDB_ATTR_CHARAC_NAMESPACE
public static final int CMDB_ATTR_CHARAC_DESCRIPTION
public static final int CMDB_ATTR_CREATE_MODE_OPEN
public static final int CMDB_ATTR_CREATE_MODE_PROTECTED
public static final int CMDB_ATTR_AUDITTYPE_NONE
public static final int CMDB_ATTR_AUDITTYPE_AUDIT
public static final int CMDB_ATTR_AUDITTYPE_COPY
public static final int CMDB_ATTR_AUDITTYPE_AUDIT_AND_COPY
Constructor Detail |
---|
public CMDBAttribute(java.lang.String aName)
setLimit(CMDBAttributeLimit aLimit)
to set the data type. Without it, the attribute is not valid.
aName
- the name of the attribute
java.lang.IllegalArgumentException
- if the name length is longer than
Constants.AR_MAX_NAME_SIZE
public CMDBAttribute(java.lang.String aName, long arFieldId)
setLimit(CMDBAttributeLimit aLimit)
to set the data type. Without it, the attribute is not valid.
aName
- the name of the attributearFieldId
- the ID of the BMC Atrium CMDB field that stores the attribute
java.lang.IllegalArgumentException
- if the name length is longer than
Constants.AR_MAX_NAME_SIZE
public CMDBAttribute(java.lang.String aName, java.lang.String attributeId, long arFieldId)
setLimit(CMDBAttributeLimit aLimit)
to set the data type. Without it, the attribute is not valid.
aName
- the name of the attributeattributeId
- the GUID of the attributearFieldId
- the ID of the BMC Atrium CMDB field that stores the attribute
java.lang.IllegalArgumentException
- if the name length is longer than
Constants.AR_MAX_NAME_SIZE
public CMDBAttribute(java.lang.String aName, java.lang.String attributeId)
setLimit(CMDBAttributeLimit aLimit)
to set the data type. Without it, the attribute is not valid.
aName
- the name of the attributeattributeId
- the GUID of the attribute
java.lang.IllegalArgumentException
- if the name length is longer than
Constants.AR_MAX_NAME_SIZE
public CMDBAttribute(java.lang.String aName, int aEntryMode, CMDBAttributeLimit aLimit, Value aDefaultValue)
aName
- the name of the attributeaEntryMode
- the entry mode of the attributeaLimit
- the size limit of the attributeaDefaultValue
- the default value of the attribute
java.lang.IllegalArgumentException
- if the map value is not PropInfo
java.lang.IllegalArgumentException
- if the name length is longer than
Constants.AR_MAX_NAME_SIZE
public CMDBAttribute(java.lang.String aName, long arFieldId, int aEntryMode, CMDBAttributeLimit aLimit, Value aDefaultValue)
aName
- the name of the attributearFieldId
- the ID of BMC Atrium CMDB field that stores the attributeaEntryMode
- the entry mode of the attributeaLimit
- the size limit of the attributeaDefaultValue
- the default value of the attribute
java.lang.IllegalArgumentException
- if the map value is not PropInfo
java.lang.IllegalArgumentException
- if the name length is longer than
Constants.AR_MAX_NAME_SIZE
public CMDBAttribute(java.lang.String aName, java.lang.String attributeId, long arFieldId, int aEntryMode, CMDBAttributeLimit aLimit, Value aDefaultValue)
aName
- the name of the attributeattributeId
- the GUID of the attributearFieldId
- the ID of the BMC Atrium CMDB field that stores the attributeaEntryMode
- the entry mode of the attributeaLimit
- the size limit of the attributeaDefaultValue
- the default value of the attribute
java.lang.IllegalArgumentException
- if the map value is not PropInfo
java.lang.IllegalArgumentException
- if the name length is longer than
Constants.AR_MAX_NAME_SIZE
public CMDBAttribute(java.lang.String aName, java.lang.String attributeId, int aEntryMode, CMDBAttributeLimit aLimit, Value aDefaultValue)
aName
- the name of the attributeattributeId
- the GUID of the attributeaEntryMode
- the entry mode of the attributeaLimit
- the size limit of the attributeaDefaultValue
- the default value of the attribute
java.lang.IllegalArgumentException
- if the map value is not PropInfo
java.lang.IllegalArgumentException
- if the name length is longer than
Constants.AR_MAX_NAME_SIZE
Method 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 rangepublic java.lang.String getId()
public java.lang.String getName()
public java.lang.String getNewName()
public long getFieldId()
public int getEntryMode()
CMDB_ATTR_ENTRYMODE_OPTIONAL
,
CMDB_ATTR_ENTRYMODE_REQUIRED
, or
CMDB_ATTR_ENTRYMODE_DISPLAY_ONLY
public int getDataType()
CMDBAttributeLimit.CMDB_ATTR_DATA_TYPE_INTEGER
,
CMDBAttributeLimit.CMDB_ATTR_DATA_TYPE_REAL
,
CMDBAttributeLimit.CMDB_ATTR_DATA_TYPE_CHAR
,
CMDBAttributeLimit.CMDB_ATTR_DATA_TYPE_DIARY
,
CMDBAttributeLimit.CMDB_ATTR_DATA_TYPE_ENUM
,
CMDBAttributeLimit.CMDB_ATTR_DATA_TYPE_TIME
,
CMDBAttributeLimit.CMDB_ATTR_DATA_TYPE_DECIMAL
,
CMDBAttributeLimit.CMDB_ATTR_DATA_TYPE_DATE
.
public int getAttributeType()
CMDB_ATTR_TYPE_CORE_INTERNAL
,
CMDB_ATTR_TYPE_CORE
, or
CMDB_ATTR_TYPE_REGULAR
public CMDBClassNameKey getBaseClassName()
public Value getDefaultValue()
public CMDBAttributeLimit getLimitInfo()
public java.lang.String getViewPermission()
public java.lang.String getChangePermission()
public boolean getHidden()
public boolean getPrimaryKey()
public int getCreateMode()
CMDB_ATTR_CREATE_MODE_OPEN
,
CMDB_ATTR_CREATE_MODE_PROTECTED
.public java.lang.String getPropagatedOwner()
public int getAuditType()
CMDB_ATTR_AUDITTYPE_NONE
,
CMDB_ATTR_AUDITTYPE_AUDIT
,
CMDB_ATTR_AUDITTYPE_COPY
,
CMDB_ATTR_AUDITTYPE_AUDIT_AND_COPY
.public java.lang.String getNamespace()
public java.lang.String getDescription()
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 setName(java.lang.String aName)
aName
- the name of the attribute
java.lang.IllegalArgumentException
- if aName is empty or
its length is longer than
Constants.AR_MAX_NAME_SIZE
public void setNewName(java.lang.String aNewName)
CMDBClass.update(com.bmc.arsys.api.ARServerUser)
method to modify the name of the attribute.
aNewName
- the new name of the attribute
java.lang.IllegalArgumentException
- if aNewName is empty or
its length is longer than
Constants.AR_MAX_NAME_SIZE
public void setEntryMode(int anEntryMode)
CMDB_ATTR_ENTRYMODE_OPTIONAL
or
CMDB_ATTR_ENTRYMODE_REQUIRED
anEntryMode
- the new entry mode of the attributepublic void setDefaultValue(Value aDefaultVal)
aDefaultVal
- the default value of the attributepublic void setLimit(CMDBAttributeLimit aLimit)
aLimit
- the new limit of the attributepublic void setViewPermission(java.lang.String viewPerm)
viewPerm
- the view permission characteristic of the attribute.public void setChangePermission(java.lang.String changePerm)
changePerm
- the change permission characteristic of the attribute.public void setHidden(boolean isHidden)
isHidden
- a boolean value for Hidden characteristic.public void setCreateMode(int createMode)
createMode
- the create mode of the attribute
CMDB_ATTR_CREATE_MODE_OPEN
,
CMDB_ATTR_CREATE_MODE_PROTECTED
.public void setAuditType(int auditType)
auditType
- characteristic, which can be:
CMDB_ATTR_AUDITTYPE_NONE
,
CMDB_ATTR_AUDITTYPE_AUDIT
,
CMDB_ATTR_AUDITTYPE_COPY
,
CMDB_ATTR_AUDITTYPE_AUDIT_AND_COPY
.public void setNamespace(java.lang.String namespace)
namespace
- the namespace of the attributepublic void setDescription(java.lang.String description)
description
- the description of the attribute
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |