|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bmc.cmdb.api.CMDBUtil
public class CMDBUtil
The CMDBUtil
class defines all the utility methods for the
Class Manager API.
Field Summary | |
---|---|
static int |
AR_BULK_ENTRY_ACTION_CANCEL
Specifies that the bulk entry of data into BMC Atrium CMDB is cancelled. |
static int |
AR_BULK_ENTRY_ACTION_SEND
Specifies that data is entered in bulk into BMC Atrium CMDB. |
static java.lang.String |
CMDB_ALL_OBJECT
Specifies that in a graph query, all objects are displayed. |
static java.lang.String |
CMDB_ALL_RELATIONSHIP
Specifies that in a graph query, all relationships are displayed. |
static int |
CMDB_FEDERATION_ACTIVATION_EXPAND
Specifies that the Federated Interface is expanded. |
static int |
CMDB_FEDERATION_ACTIVATION_LAUNCH
Specifies that the Federated Interface is expanded and launched. |
static int |
CMDB_FEDERATION_ACTIVATION_NONE
Specifies that no action is taken. |
static int |
CMDB_RELATIONSHIP_DIRECTION_BOTH
Specifies that in a graph query, the object is either on the right or left of the node, with an arrow pointing at or away from the node. |
static int |
CMDB_RELATIONSHIP_DIRECTION_IN
Specifies that in a graph query, the object is to the right of the node, and the arrow representing the relationship is pointing to the node. |
static int |
CMDB_RELATIONSHIP_DIRECTION_OUT
Specifies that in a graph query, the object is to the left of the node, and the arrow representing the relationship is pointing to the node. |
static java.lang.String |
CMDB_VER_APP_ID_CMDB
Specifies the application ID for BMC Atrium CMDB. |
static java.lang.String |
CMDB_VER_APP_ID_RECON_ENG
Specifies the application ID for Reconciliation Engine. |
static java.lang.String |
CMDB_WEAK_OBJECT
Specifies that in a graph query, the object is the weak member in a weak relationship. |
static java.lang.String |
CMDB_WEAK_RELATIONSHIP
Specifies that in a graph query, the relationship is a weak relationship. |
Constructor Summary | |
---|---|
CMDBUtil()
|
Method Summary | |
---|---|
static CMDBFederatedActivateInfo |
CMDBActivateFederatedInContext(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String instanceId,
java.lang.String federatedInstanceId,
int activateOption)
Launches the Federated Interface instance related to the specified instance and uses the activation option specified. |
static CMDBFederatedActivateInfo |
CMDBActivateFederatedInContext(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String aDataSetId,
java.lang.String instanceId,
java.lang.String federatedInstanceId,
int activateOption)
Launches the Federated Interface instance that is related to an instance from the specified dataset. |
static void |
CMDBBeginBulkEntryTransaction(ARServerUser context)
Starts a bulk entry transaction for the specified context object. |
static java.lang.String |
CMDBCreateGuid(ARServerUser context)
Creates a GUID and returns it. |
static BulkEntryReturn[] |
CMDBEndBulkEntryTransaction(ARServerUser context,
int actionType)
Ends a bulk entry transaction by either sending a list of transactions to BMC Atrium CMDB or canceling the transaction. |
static java.lang.String |
CMDBExpandParametersForCI(ARServerUser context,
java.lang.String paramString,
CMDBInstanceBase instance)
Gets the expand parameters for a CI. |
static void |
CMDBExport(ARServerUser context,
CMDBItemBase[] exportItemArray,
java.lang.String exportFormat,
java.lang.String directoryPath)
Deprecated. as of CMDB 2.0 |
static java.lang.String |
CMDBExportData(ARServerUser ctx,
CMDBClassNameKey aClassKey,
java.lang.String datasetId,
java.lang.String query,
java.lang.String[] attributeGetList,
CMDBSort[] sortArray,
int firstRetrieve,
int maxRetrieve)
Exports instance data that matches the specified qualifications. |
static java.lang.String |
CMDBExportDef(ARServerUser context,
CMDBXMLExportItem[] exportItemList)
Exports a list of attribute definitions. |
static CMDBUIComponentResult[] |
CMDBGetCMDBUIComponents(ARServerUser context,
CMDBUIComponentInfo inputInfo,
java.lang.String datasetId,
java.lang.String instanceId)
Gets a list of user interface components for the specified instance. |
static CMDBAuditValueList[] |
CMDBGetCopyAuditData(ARServerUser context,
CMDBClassNameKey classNameId,
java.lang.String instanceId,
java.lang.String datasetId,
QualifierInfo query,
java.lang.String[] attributeList)
Gets a list of audit details for the specified qualified instance. |
static CMDBInstanceBase |
CMDBGetInstanceBase(ARServerUser context,
CMDBClassNameKey classKey,
java.lang.String datasetId,
int getMask,
java.lang.String instanceId,
java.lang.String[] attributeNames)
Gets the instances from the specified dataset that contain the specified attributes. |
static CMDBInstanceBase[] |
CMDBGetListInstanceWithAttributes1(ARServerUser ctx,
CMDBClassNameKey aClassKey,
java.lang.String datasetId,
int getMask,
java.lang.String query,
java.lang.String[] attributeGetList,
CMDBSort[] sortArray,
int firstRetrieve,
int maxRetrieve,
java.lang.Integer numMatches)
Gets a list of all the instances from the specified dataset that match the specified qualifications. |
static CMDBInstanceBase[] |
CMDBGetRelatedFederatedInContext(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String instanceId,
java.lang.String[] attributeNames)
Gets a list of Federated Interface instances for the specified instance and attributes. |
static CMDBInstanceBase[] |
CMDBGetRelatedFederatedInContext(ARServerUser context,
CMDBClassNameKey aClassKey,
java.lang.String aDataSetId,
java.lang.String instanceId,
java.lang.String[] attributeNames)
Gets a list of related Federated Interface instances for the instances in the specified dataset. |
static void |
CMDBGetServerPort(ARServerUser context,
java.lang.Integer tcpPort,
java.lang.Integer rpcPort)
Gets the AR System server TCP and RPC ports. |
static CMDBVersionInfo[] |
CMDBGetVersions(ARServerUser context,
java.lang.String[] AppIdList)
Gets a list of versions for the following parameters: applicationId (application ID), majorVer (major version), minorVer (minor version), maintenanceVer (maintenance version), patchNum (patch number), and isExist (Boolean value indicated whether Application ID exists) |
static CMDBGraphResult |
CMDBGraphQuery(ARServerUser context,
CMDBClassNameKey startClassNameId,
java.lang.String aDatasetId,
int aGetMask,
java.lang.String startExtensionId,
java.lang.String startInstanceId,
int numLevels,
int direction,
boolean noMatchProceed,
boolean onMatchProceed,
CMDBGraph[] graphArray)
Generates a graph query starting with the node from the specified dataset, number of levels, and relationship direction. |
static CMDBGraphResult |
CMDBGraphQuery(ARServerUser context,
CMDBClassNameKey startClassNameId,
java.lang.String startExtensionId,
java.lang.String startInstanceId,
int numLevels,
int direction,
boolean noMatchProceed,
boolean onMatchProceed,
CMDBGraph[] graphArray)
Generates a graph query starting with the specified node, using the specified number of levels and relationship direction. |
static void |
CMDBImport(ARServerUser context,
CMDBItemBase[] importItemArray,
java.lang.String directoryPath)
Deprecated. as of CMDB 2.0 |
static void |
CMDBImportData(ARServerUser ctx,
int importOption,
java.lang.String importBuf)
Imports the Instance Data using the import option specified. |
static void |
CMDBImportDef(ARServerUser ctx,
CMDBXMLImportItem[] importItem,
int importOption,
java.lang.String importBuf)
Imports the class or attribute definitions using the import option specified. |
static void |
CMDBRECancelJobRun(ARServerUser context,
java.lang.String jobRunId)
Cancels the specified Reconciliation Engine job. |
static java.lang.String |
CMDBREStartJobRun(ARServerUser context,
java.lang.String jobName,
CMDBClassQual[] qualList,
CMDBREDatasetPair[] datasetList)
Starts an existing Reconciliation Engine job using the specified qualification information and dataset list. |
static boolean |
CMDBRunQualificationForCI(ARServerUser context,
java.lang.String qualifier,
CMDBAttributeValue[] attributeValue)
Verifies if an instance is qualified. |
static void |
CMDBSetServerPort(ARServerUser context,
java.lang.Integer tcpPort,
java.lang.Integer rpcPort)
Sets the AR System server TCP and RPC ports. |
static void |
CMDBSystemInit(ARServerUser context,
PropInfo[] sysProps)
Initializes the system properties. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int AR_BULK_ENTRY_ACTION_SEND
public static final int AR_BULK_ENTRY_ACTION_CANCEL
public static final int CMDB_RELATIONSHIP_DIRECTION_OUT
public static final int CMDB_RELATIONSHIP_DIRECTION_IN
public static final int CMDB_RELATIONSHIP_DIRECTION_BOTH
public static final java.lang.String CMDB_WEAK_RELATIONSHIP
public static final java.lang.String CMDB_WEAK_OBJECT
public static final java.lang.String CMDB_ALL_RELATIONSHIP
public static final java.lang.String CMDB_ALL_OBJECT
public static final int CMDB_FEDERATION_ACTIVATION_NONE
public static final int CMDB_FEDERATION_ACTIVATION_EXPAND
public static final int CMDB_FEDERATION_ACTIVATION_LAUNCH
public static final java.lang.String CMDB_VER_APP_ID_CMDB
public static final java.lang.String CMDB_VER_APP_ID_RECON_ENG
Constructor Detail |
---|
public CMDBUtil()
Method Detail |
---|
public static void CMDBImport(ARServerUser context, CMDBItemBase[] importItemArray, java.lang.String directoryPath) throws ARException, java.io.IOException
context
- AR System user and host informationimportItemArray
- array of items to be imported. If the value is NULL,
all classes and instances are imported.directoryPath
- source directory for the specified classes or instances
ARException
- if the definition cannot be imported
java.io.IOException
public static void CMDBExport(ARServerUser context, CMDBItemBase[] exportItemArray, java.lang.String exportFormat, java.lang.String directoryPath) throws ARException, java.io.IOException
context
- AR System user and host informationexportItemArray
- array of items to be exportedexportFormat
- export format. Currently only XML is supported, so specify "xml" or NULL.directoryPath
- source directory for the specified classes or instances
ARException
- if the definition cannot be exported
java.io.IOException
public static void CMDBBeginBulkEntryTransaction(ARServerUser context) throws ARException
context
- AR System user and host information
ARException
- if the bulk transaction cannot be startedpublic static BulkEntryReturn[] CMDBEndBulkEntryTransaction(ARServerUser context, int actionType) throws ARException
context
- AR System user and host informationactionType
- action type. It can be
AR_BULK_ENTRY_ACTION_SEND
or
AR_BULK_ENTRY_ACTION_CANCEL
ARException
- if the bulk transaction cannot be finished with the requested typepublic static CMDBGraphResult CMDBGraphQuery(ARServerUser context, CMDBClassNameKey startClassNameId, java.lang.String startExtensionId, java.lang.String startInstanceId, int numLevels, int direction, boolean noMatchProceed, boolean onMatchProceed, CMDBGraph[] graphArray) throws ARException
context
- AR System user and host informationstartClassNameId
- class name ID of the starting nodestartExtensionId
- extension ID of the starting nodestartInstanceId
- instance ID of the starting nodenumLevels
- number of levels to go, -1 means alldirection
- 0 for out (node on the left), 1 for in (node on the right), and 2 for both directionsnoMatchProceed
- Boolean value indicating whether to proceed if instance does not
match the specified qualificationonMatchProceed
- Boolean value indicating whether to proceed on matching of the specified instancegraphArray
- input graph on which to query
ARException
- if the query cannot be finished successfullypublic static CMDBGraphResult CMDBGraphQuery(ARServerUser context, CMDBClassNameKey startClassNameId, java.lang.String aDatasetId, int aGetMask, java.lang.String startExtensionId, java.lang.String startInstanceId, int numLevels, int direction, boolean noMatchProceed, boolean onMatchProceed, CMDBGraph[] graphArray) throws ARException
context
- AR System user and host informationstartClassNameId
- class name ID of the starting nodeaDatasetId
- dataset IDaGetMask
- dataset type, 0 for none, 1 for current, and 2 for overlaystartExtensionId
- extension ID of the starting nodestartInstanceId
- instance ID of the starting nodenumLevels
- number of levels to go, -1 means alldirection
- 0 for out (node on the left), 1 for in (node on the right), and 2 for both directionsnoMatchProceed
- Boolean value indicating whether to proceed if the instance does
not match the specified qualificationonMatchProceed
- Boolean value indicating whether to proceed on the matching of
specified instancegraphArray
- input graph to query on
ARException
- if the query cannot be finished successfullypublic static void CMDBSetServerPort(ARServerUser context, java.lang.Integer tcpPort, java.lang.Integer rpcPort) throws ARException
context
- AR System user and host informationtcpPort
- AR System server TCP port to be set. If NULL is provided,
then TCP port will not be set.rpcPort
- AR System server RPC port to be set. If NULL is provided,
then RPC port will not be set.
ARException
- if the port cannot be retrievedpublic static void CMDBGetServerPort(ARServerUser context, java.lang.Integer tcpPort, java.lang.Integer rpcPort) throws ARException
context
- AR System user and host informationtcpPort
- AR System server TCP port to retrieve. If NULL is provided,
then TCP port will not be retrieved.rpcPort
- AR System server RPC port to retrieve. If NULL is provided,
then RPC port will not be retrieved.
ARException
- if the port cannot be retrievedpublic static java.lang.String CMDBCreateGuid(ARServerUser context) throws ARException
context
- AR System user and host information
ARException
- if the GUID cannot be createdpublic static void CMDBSystemInit(ARServerUser context, PropInfo[] sysProps) throws ARException
context
- AR System user and host informationsysProps
- system properties to be initialized
ARException
- if the system properties cannot be initializedpublic static CMDBVersionInfo[] CMDBGetVersions(ARServerUser context, java.lang.String[] AppIdList) throws ARException
context
- AR System user and host informationAppIdList
- AR System ID of application for which details are asked
ARException
- if version information cannot be retrievedpublic static java.lang.String CMDBREStartJobRun(ARServerUser context, java.lang.String jobName, CMDBClassQual[] qualList, CMDBREDatasetPair[] datasetList) throws ARException
context
- AR System user and host informationjobName
- Reconciliation Engine job NamequalList
- class qualification listdatasetList
- dataset list
ARException
- if job cannot be startedpublic static void CMDBRECancelJobRun(ARServerUser context, java.lang.String jobRunId) throws ARException
context
- AR System user and host informationjobRunId
- Reconciliation Engine Job Name
ARException
- Job Cannot Be Startedpublic static CMDBInstanceBase[] CMDBGetRelatedFederatedInContext(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String instanceId, java.lang.String[] attributeNames) throws ARException
context
- AR System user and host informationaClassKey
- class keyinstanceId
- the instance IDattributeNames
- attribute name list
ARException
public static CMDBInstanceBase[] CMDBGetRelatedFederatedInContext(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String aDataSetId, java.lang.String instanceId, java.lang.String[] attributeNames) throws ARException
context
- AR System user and host informationaClassKey
- class keyaDataSetId
- dataset from which you want to retrieve instancesinstanceId
- is the instance IDattributeNames
- is the attribute name list
ARException
public static CMDBFederatedActivateInfo CMDBActivateFederatedInContext(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String instanceId, java.lang.String federatedInstanceId, int activateOption) throws ARException
context
- AR System user and host informationaClassKey
- class keyinstanceId
- instance IDfederatedInstanceId
- instance ID for the Federated InterfaceactivateOption
- activate option for the Federated Interface
ARException
public static CMDBFederatedActivateInfo CMDBActivateFederatedInContext(ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String aDataSetId, java.lang.String instanceId, java.lang.String federatedInstanceId, int activateOption) throws ARException
context
- AR System user and host informationaClassKey
- class keyaDataSetId
- dataset ID of the instances you want to retrieveinstanceId
- instance IDfederatedInstanceId
- Federated Instance IDactivateOption
- activate Option
ARException
public static CMDBUIComponentResult[] CMDBGetCMDBUIComponents(ARServerUser context, CMDBUIComponentInfo inputInfo, java.lang.String datasetId, java.lang.String instanceId) throws ARException
context
- AR System user and host informationinputInfo
- CMDBUIComponentInfo objectdatasetId
- dataset IDinstanceId
- instance ID
ARException
public static CMDBAuditValueList[] CMDBGetCopyAuditData(ARServerUser context, CMDBClassNameKey classNameId, java.lang.String instanceId, java.lang.String datasetId, QualifierInfo query, java.lang.String[] attributeList) throws ARException
context
- AR System user and host informationclassNameId
- class keyinstanceId
- instance IDdatasetId
- dataset IDquery
- qualification informationattributeList
- attribute list
ARException
public static CMDBInstanceBase CMDBGetInstanceBase(ARServerUser context, CMDBClassNameKey classKey, java.lang.String datasetId, int getMask, java.lang.String instanceId, java.lang.String[] attributeNames) throws ARException
context
- ARSystemUser structure that contains user
and host informationclassKey
- class key of the class to which the instance belongsdatasetId
- dataset ID of the instances you want to retrievegetMask
- the dataset type (current or overlay)instanceId
- instance IDattributeNames
- attribute name list
ARException
public static CMDBInstanceBase[] CMDBGetListInstanceWithAttributes1(ARServerUser ctx, CMDBClassNameKey aClassKey, java.lang.String datasetId, int getMask, java.lang.String query, java.lang.String[] attributeGetList, CMDBSort[] sortArray, int firstRetrieve, int maxRetrieve, java.lang.Integer numMatches) throws ARException
ctx
- ARSystemUser structure that contains user
and host informationaClassKey
- the key of the class to which the instance belongsdatasetId
- of which you want to retrieve instancesgetMask
- the get mask (current or overlay)query
- a query object where you specify a qualification for retrieving instancesattributeGetList
- list of the attribute to be retrieved. If attributeGetList
is NULL, then all attribute values of the instance will be
returned.sortArray
- sort arrayfirstRetrieve
- first instance retrieved for the query chunkmaxRetrieve
- instances to retrieve for the querynumMatches
- number of matches
ARException
public static java.lang.String CMDBExpandParametersForCI(ARServerUser context, java.lang.String paramString, CMDBInstanceBase instance) throws ARException
context
- AR System user and host informationparamString
- param stringinstance
- instance base
ARException
public static boolean CMDBRunQualificationForCI(ARServerUser context, java.lang.String qualifier, CMDBAttributeValue[] attributeValue) throws ARException
context
- AR System user and host informationqualifier
- queryattributeValue
- attribute value list
ARException
public static java.lang.String CMDBExportDef(ARServerUser context, CMDBXMLExportItem[] exportItemList) throws ARException
context
- AR System user and host informationexportItemList
- list of items to be exported
ARException
public static java.lang.String CMDBExportData(ARServerUser ctx, CMDBClassNameKey aClassKey, java.lang.String datasetId, java.lang.String query, java.lang.String[] attributeGetList, CMDBSort[] sortArray, int firstRetrieve, int maxRetrieve) throws ARException
ctx
- ARSystemUser structure that contains user
and host informationaClassKey
- key of the class to which the instance belongsquery
- a query object where you specify a qualification for retrieving instancesattributeGetList
- list of the attribute to be retrievedsortArray
- sort arrayfirstRetrieve
- first instance retrieved for the query chunkmaxRetrieve
- instances to retrieve for the query
ARException
public static void CMDBImportData(ARServerUser ctx, int importOption, java.lang.String importBuf) throws ARException
ctx
- AR System user and host informationimportOption
- import option, which can be:
CMDBXMLImportItem.CMDB_DATA_IMPORT_OPT_ERROR_FOR_DUP
,
CMDBXMLImportItem.CMDB_DATA_IMPORT_OPT_NEWID_FOR_DUP
,
CMDBXMLImportItem.CMDB_DATA_IMPORT_OPT_MERGE_FOR_DUP
,
CMDBXMLImportItem.CMDB_DATA_IMPORT_OPT_NEWID_FOR_ALL
.importBuf
- string passed to import
ARException
public static void CMDBImportDef(ARServerUser ctx, CMDBXMLImportItem[] importItem, int importOption, java.lang.String importBuf) throws ARException
ctx
- AR System user and host informationimportItem
- list of items to be importedimportOption
- import option, which can be:
CMDBXMLImportItem.CMDB_DEF_IMPORT_OPT_CREATE
,
CMDBXMLImportItem.CMDB_DEF_IMPORT_OPT_OVERWRITE
.importBuf
- import Data in string format
ARException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |