|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
Packages | |
---|---|
com.bmc.cmdb.api |
The BMC Atrium CMDB Java API enables you to integrate your Java applications with the BMC Atrium CMDB. The Java API, provides methods to manipulate the CMDB classes, instances and its attributes.
If you have any comments or suggestions about this documentation, contact BMC Information Design and Development by email at
.
In BMC Atrium CMDB version 2.1, the following changes have been made to the Java API.
BMC Atrium CMDB 2.0.x clients that use version 2.0.x DLLs and libraries can continue to work with the 2.1 server. However, if you use version 2.1 DLLs and libraries, you need to make appropriate changes to your code and recompile it. For more information about BMC Atrium CMDB Java API changes, see the section BMC Atrium CMDB Java API changes.
Additional .jar files are now required to use the Java API. For more information, see the section Installation and Deployment.
In addition, the AR System Java API now uses the log4j logging library. You can configure the logging through the Log4j.xml file. This file should be present in CLASSPATH.
For Java API, the package name has been changed from com.remedy.cmdb.api to com.bmc.cmdb.api. When you write your program to extend the BMC Atrium CMDB, make sure you update the package name and recompile your program.
In BMC Atrium CMDB version 2.1, the minimum JRE version required is changed to 1.5.0_06 or greater. If you do not upgrade to this version of JRE, your might encounter compiler errors.
Since the AR System Java API was initially written as a wrapper around the AR System C API, the Java API did not
utilize the full potential of the Java language. With AR System version 7.1, the Java API is enhanced to use some of
the features of Java, such as, annotations, enumerations, and typed-collections.
The following list outlines the changes in the AR System 7.1 Java API:
Because the BMC Atrium CMDB Java API uses classes in the AR System Java API, the 7.1 API changes impact the BMC Atrium CMDB Java API. The level of impact on BMC Atrium CMDB Java API depends on the extent on which you use the AR System API classes and methods in your program.
The BMC Atrium CMDB Java API uses the following AR System API classes:
BMC Atrium CMDB Java API signature changes |
||
Class |
Previous signature |
Changed signature |
CMDBAuditValueList | (constructor) public CMDBAuditValueList( int aOperation, AccessNameID aChangedBy, Timestamp aAuditDate, String[ ] aAttrNameChange, CMDBAttributeValue[ ] aAttributeList) |
public CMDBAuditValueList( int aOperation, String aChangedBy, Timestamp aAuditDate, String[ ] aAttrNameChange, CMDBAttributeValue[ ] aAttributeList) |
CMDBAuditValueList | public AccessNameID getChangedBy() | public String getChangedBy() |
CMDBAuditValueList | public void setChangedBy(AccessNameID aChangedBy) | public void setChangedBy(String aChangedBy) |
CMDBInstance | static void findBlobByKey( ARServerUser context,CMDBClassNameKey aClassKey, java.lang.String aDatasetId, int aGetMask, java.lang.String instanceId, java.lang.String attributeName, AttachmentInfo attachment) |
static void findBlobByKey( (ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String aDatasetId, int aGetMask, java.lang.String instanceId, java.lang.String attributeName, AttachmentValue attachment) |
CMDBInstance | static void findBlobByKey( ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String instanceId, java.lang.String attributeName, AttachmentInfo attachment) |
static void findBlobByKey( ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String instanceId, java.lang.String attributeName, AttachmentValue attachment) |
CMDBInstanceBase | static void findBlobByKey( ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String aDatasetId, int aGetMask, java.lang.String instanceId, java.lang.String attributeName, AttachmentInfo attachment) |
static void findBlobByKey( ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String aDatasetId, int aGetMask, java.lang.String instanceId, java.lang.String attributeName, AttachmentValue attachment) |
CMDBInstanceBase | static void findBlobByKey( ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String instanceId, java.lang.String attributeName, AttachmentInfo attachment) |
static void findBlobByKey( ARServerUser context, CMDBClassNameKey aClassKey, java.lang.String instanceId, java.lang.String attributeName, AttachmentValue attachment) |
CMDBUIComponentResult | CMDBUIComponentResult( java.lang.String aInstanceId, CMDBUIComponentInfo aCompInfo, java.lang.String aDataString, AttachmentInfo aAttachVal) |
CMDBUIComponentResult( java.lang.String aInstanceId, CMDBUIComponentInfo aCompInfo, java.lang.String aDataString, AttachmentValue aAttachVal) |
CMDBUIComponentResult | AttachmentInfo getAttachVal() | AttachmentValue getAttachVal() |
CMDBUIComponentResult | void setAttachVal(AttachmentInfo aAttachVal) | void setAttachVal(AttachmentValue aAttachVal) |
The Java API is built as a "wrapper" on top of the C API through the Java Native Interface (JNI) layer, which means for every function in the C API, there is an equivalent method in the Java API. You can use the Java API only on the following supported AR System platforms:
The BMC Atrium CMDB Java API uses some of the AR System Java API classes. See the AR System Java API.
Because the Java API provides an object model for the BMC Atrium CMDB, the
functionality of the C API is encapsulated within specific Java classes.
Note: The Java API methods do not correspond 1:1 with their C API equivalents.
Therefore, the signatures for these methods might be different than the C API.
Errors are modeled through the ARException class. All error messages that are returned by the server are thrown as an ARException in the Java API.
Use the following high-level steps in your Java program to implement the BMC Atrium CMDB:
Although the Java API is a wrapper on top of the C API, it uses naming conventions that are different than the C structure. The following table lists these differences:
Differences in Naming Conventions |
|
C API |
Java API |
Get |
|
Set |
|
Create |
|
Delete |
|
GetList |
|
GetMultiple | GetMultipleAttribute or GetMultipleInstance |
To use the Java API, the following libraries and DLLs must be installed on your system:
A) Contents of the BMC Atrium CMDB installation [Return to TOC]
cmdbapi21.jar |
The Java API library JAR file that contains the Java API class files for the BMC Atrium CMDB Java API clients. If two or more applications need to load the cmdbapi21.jar file, it must be stored in the classes directory to be loaded multiple times. |
log4j.xml | The logging configuration file for the AR System Java API. Details can be found at http://logging.apache.org/. This file must be present in CLASSPATH. |
New in version 2.1:
arapi71.jar arcmn71.jar arrpc71.jar arutil71.jar commons-beanutils.jar commons-codec-1.3.jar commons-collections-3.2.jar commons-configuration-1.3.jar commons-digester-1.7.jar commons-lang-2.2.jar commons-logging-1.1.jar log4j-1.2.14.jar oncrpc.jar spring.jar |
AR System Java API library JAR files that contains the Java API and dependent class files for AR System Java API clients. If two or more applications need to load the arapi71.jar file, it must be stored in the classes directory to be loaded multiple times. |
CMDB Java API & AR System Java API |
Javadoc generated HTML documents for the BMC Atrium CMDB API and the AR System Java API. |
Windows Solaris, Linux libcmdbapi21.a libcmdbjni21.a libarjni71.a libarutiljni71.a libicudatabmc32.a libicui18nbmc32.a libicuucbmc32.a libjlicapi71.a HP-UX libcmdbapi21.sl libcmdbjni21.sl libarjni71.sl libarutiljni71.sl libicudatabmc.sl.32 libicui18nbmc.sl.32 libicuucbmc.sl.32 libjlicapi71.sl | C API libraries for BMC Atrium CMDB API clients |
B) Windows environment setup [Return to TOC]
The following table lists the environment variables you need to set up for Windows.
Compiler |
Requires J2SE Software Development Kit (SDK) 1.5.0_06 or higher. |
JAR Files and CLASSPATH |
All .jar files should be present in CLASSPATH.
If you are running the BMC Atrium CMDB Java API on a web server, you must set the CLASSPATH information on the web server. |
DLLs and System Path |
The Java API requires the BMC Atrium CMDB API and AR System API DLLs.
|
Logging and CLASSPATH | The log4j.xml file must be present in CLASSPATH. |
C) UNIX environment setup [Return to TOC]
The following table lists the environment variables you need to set up for UNIX:
Compiler |
Requires J2SE Software Development Kit (SDK) 1.5.0_06 or higher. |
JAR Files and CLASSPATH |
All .jar files should be present in CLASSPATH. If you are running the BMC Atrium CMDB Java API on a web server, you must set the CLASSPATH information on the web server. |
PATH | Update your PATH environment variable to include the bin directory for the JDK. |
Library path | Set the library path environment variables to where the libcmdbjni.<operating_system> file is installed on your particular UNIX OS:
|
Logging and CLASSPATH | The log4j.xml file must be present in CLASSPATH. |
D)
Java API programs at runtime[Return to TOC]
Install and configure the Java Runtime Environment on user systems.
Tips
java -D java.library.path = <directory>; -classpath .;cmdbapi21.jar JavaDriver
E) Using the Java API Help [Return to TOC]
The BMC Atrium CMDB Java API Help provides the class and method definitions for the Java API. To launch the BMC Atrium CMDB Java API Help, double-click the index.html file installed in the sdk/javadoc/cmdbapi subdirectory of your BMC Atrium CMDB installation directory.
This section includes definitions for terms used in the BMC Atrium CMDB Java API.
Term |
Definition |
ARException | The class that is used for handling errors from the AR System server. Use the ARException methods to obtain status information (using the StatusInfo class) and to describe errors. |
ARServerUser | The ARServerUser class represents user information that contains login information for accessing the AR System. You use a ARServerUser object to initialize calls to a particular AR System server. |
AR System Java API | Application programming interface that integrates with the AR System. It consists of a collection of classes, interfaces, and relationships that abstract the AR System C API and hide some of its details, such as the memory management for data structures, managing connections, and so on. Using the Java development environment, you can use the AR System Java API--clicking this link opens the AR System Java API documentation in a new window--to communicate with the AR System server without programming in C. |
Context | The user session information that pertains to the current operation within an object. You create a Context with user information (user name, password, etc.) contained in the ARServerUser object for an operation performed in the specified session. |
create | Server object member method that creates an object on
the server specified in the ARServerUser
object. |
delete | Server object member method that deletes an object or an instance in the Class Manager. |
find |
Server object method that returns a list of objects or instances. |
findByKey | Server object that returns an object or an instance. |
JNI | The Java Native Interface. This is a C++ layer that takes calls from Java and makes corresponding calls to the C API. This happens transparently. |
Package | The package is a name space in Java for all objects and classes
pertaining to the BMC Atrium CMDB Java API. com.bmc.cmdb.api com.bmc.arsys.api |
update | Server object member method that updates an object on the database. |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |