AR System Java API

AR System Java API

See:
          Description

Packages
com.bmc.arsys.api  

 

AR System Java API

Overview

The Java API is a collection of classes, interfaces, and relationships that provide full client functionality like the AR System C API in a style consistent with typical Java programming techniques. Like the C API, the Java API is forward and backward compatible with other versions of AR System. See the Integrating with Plug-ins and Third-Party Products guide for information about setting up to use the Java API.

For product related issues or questions, contact Customer Support by e-mail at support@remedy.com.
For questions or comments about this documentation, e-mail us at doc_feedback@bmc.com.

Programming model

Consistent with object-oriented design, the AR System Java API represents AR System server objects as Java objects. Classes are defined for forms, fields, menus, active link, filter, escalations, and all other objects in an AR System application. Entry objects represent entries (requests) so your Java client can manipulate AR System data as well as definitions.

The following paragraphs summarize the key classes and types of classes in the API. Follow the links for details.

ARServerUser

The ARServerUser object represents the connection between your Java client program and the AR System server. It include session information such as user name, password, and server. A typical program starts by creating an ARServerUser object with user name, password, server name, and the like. Using the ARServerUser instance methods, it logs in to the AR System server; creates, gets, searches for, updates, and deletes server objects; and log out. A call to a get method returns a server object, a call to a getList (search) methods return a list of object identities (for example, names for forms or IDs for fields), and a call to a getListObjects method returns a list of objects.

Server objects

The Java API includes classes for all server objects: Form, Field, View, ActiveLink, Escalation, Filter, Container, Menu, Entry, and SupportFile. The Form, Field, Container, and Menu classes have subclasses to represent specialized types, for example, RegularForm, IntegerField, ApplicationContainer, and SqlMenu.

The ARServerUser create methods create these objects. The get and getListObjects methods return them. Each set method takes a server object parameter that specifies which object the server should update. For example, the ARServerUser method setField takes a Field parameter.

Cloning objects

Objects in the AR System Java API are cloneable. The clone() method performs a deep copy of the object. A deep copy is a copy of an object that contains the complete encapsulated data of the original object, allowing it to be used independently of the original Java object. Of course, if the original Java object represents an AR System server object, the clone represent the same object.

Exception handling

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.

What's new in the AR System 7.5 Java API

The primary goals of this API revision are to simplify the interface and eliminate drawbacks of the 7.0 API. Changes include:

These API changes require significant code changes to update an older Java API program to the 7.5 API. These specific API changes require changes in your program:

Converting a program to the updated API

To get started converting your Java program:

  1. Make sure your programming environment is set up correctly. You need:
  2. Create a Java project in your IDE and copy in your current Java client code or back up your existing code and use the copy as your starter project.
  3. Change the import statement from com.remedy.arsys.* to com.bmc.arsys.*.
  4. Update your build class path:
  5. Compile your project. You will get several compilation errors pointing out the API usages that you need to change.

Use this information to change code with compilation errors for the new API:

Error Action Notes and Examples
Invalid method Replace with ARserverUser method

ARServerUser method names are formed by combined the word in the action they perform and are overloaded. Choose the appropriate method.
EntryFactory.findByKey() becomes ARServerUser.getEntry.
Entry.remove becomes ARServerUser.deleteEntry.
Util.GetQualifierString becomes ARServerUser.formatQualification.

Class does not exist Replace with the new class String-like classes such as AccessNameID and NameID are replaced by String.
Interger-wrapping classes such as InternalID and FieldID are replaced by int.

Server-object classes:
Schema is replaced by one of Form, DisplayOnlyForm, JoinForm, RegularForm, VendorForm, or ViewForm.
EntryItem[] is replaced by one Entry object, which is now a Map holding Integer Field ID-Value pairs.
See also Field, Menu, ActiveLink, Escalation, Filter, Container, and other classes that represent server objects.

Bad array-type method parameter Replace with List, Map, or API collection-wrapping class

The 7.5 API replaces most of the 7.0 API array-type members and method parameter and return values with List classes (typically instantiation of ArrayList) Some array-types are replaced by Maps (typically instantiation of TreeMap or LinkedHashMap). Some new classes are wrapper classes such as Entry, PropertyMap, DisplayInstanceMap, and the like.
String[] is often becomes List<String> (for example, ARServerUser.getListActiveLink returns a List<String> while the 7.0 ActiveLinkFactory.find method returned a String[]).

You can find examples of use of the 7.5 API in the JavaDriver sample program source code. (See the Integrating with Plug-ins and Third-Party Products guide for the location of the code.)

After successfully upgrading your application to use the 7.5 API, be sure to test your application and compare it with your previous implementation to ensure functional equivalence.

Update reference

These string-like wrapper classes are replaced by type String.

These integer wrapper classes are replcaed by type Integer.

These classes are no longer in the API.

ARServerUser includes the functionalty provided by the factory classes. The get and getList methods no longer use parameters with Criteria class types.

Member and constructor and method parameters of type char[] in these classes are now type String.

These classes are renamed.

Old name New name
LimitInfoFieldLimit
ActiveLinkActionInfoActiveLinkAction
ActiveLinkMacroInfoRunMacroAction
AttachmentInfoAttachmentValue
AttachmentLimitInfoAttachmentFieldLimit
AutomationInfoOleAutomationAction
ByteListInfoByteListValue
CallGuideInfoCallGuideAction
CharLimitInfoCharacterFieldLimit
CharMenuDDFieldInfoFieldDataDictionaryMenu
CharMenuDDFormInfoFormDataDictionaryMenu
CharMenuDDInfoDataDictionaryMenu
CharMenuFileInfoFileMenu
FieldCharacteristicsInfoChangeFieldAction
CharMenuInfoMenu
CharMenuItemInfoMenuItem
CharMenuListInfoCharMenuSSInfo
CharMenuQueryInfoQueryMenu
CharMenuSQLInfoSqlMenu
CloseWindowInfoCloseWindowAction
ColumnLimitInfoColumnFieldLimit
CommitChangesInfoCommitChangesAction
CurrencyLimitInfoCurrencyFieldLimit
CurrencyInfoCurrencyValue
DDEInfoDDEAction
DecimalLimitInfoDecimalFieldLimit
DiaryInfoDiaryItem
DiaryLimitInfoDiaryFieldLimit
DiaryInfo[]DiaryListValue
DisplayInstanceInfoDisplayPropertyMap
DisplayInstanceListDisplayInstanceMap
DisplayLimitsDisplayFieldLimit
SQLInfoDirectSqlAction
EnumLimitInfoSelectionFieldLimit
EscalationTmInfoEscalationTimeCriteria, EscalationInterval, EscalationTime
ExitGuideInfoExitGuideAction
ExternalReferenceInfoExternalReference
FieldLimitInfoFieldLimit
FieldMappingInfoFieldMapping, RegularFieldMapping
FilterActionInfoFilterAction
FilterStatusInfoFilterMessageAction
GotoActionInfoGotoAction
GotoGuideLabelInfoGotoGuideLabelAction
IntegerLimitInfoIntegerFieldLimit
JoinMappingInfoJoinFieldMapping
JoinSchemaInfoJoinForm
MessageInfoMessageAction
NotifyActionInfoNotifyAction
OpenDialogInfoOpenWindowAction
PropInfo[]PropertyMap
PushFieldsActionInfoPushFieldsAction
RealLimitInfoRealFieldLimit
ReferenceBaseReference
SchemaForm
SchemaCriteriaFormCriteria
SetFieldsActionInfoSetFieldsAction
StatusHistoryInfoStatusHistoryItem
ServerInfo[]ServerInfoMap
TableLimitInfoTableFieldLimit
VendorMappingInfoVendorFieldMapping
VendorSchemaInfoVendorForm
ViewLimitsViewFieldLimit
ViewMappingInfoViewFieldMapping
ViewSchemaInfoViewForm
WaitInfoWaitAction

These are new classes.

BMC, BMC Software, and the BMC Software logo are the exclusive properties of BMC Software, Inc., are registered with the U.S. Patent and Trademark Office, and may be registered or pending registration in other countries. All other BMC trademarks, service marks, and logos may be registered or pending registration in the U.S. or in other countries. All other trademarks or registered trademarks are the property of their respective owners.

DB2 is a registered trademark of International Business Machines Corporation.

IBM is a registered trademark of International Business Machines Corporation.

ITIL is a registered trademark, and a registered community trademark of the Office of Government Commerce, and is registered in the U.S. Patent and Trademark Office.

Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.

Oracle is a registered trademark of Oracle Corporation.

UNIX is a registered trademark of The Open Group.

BMC Software considers information included in this documentation to be proprietary and confidential. Your use of this information is subject to the terms and conditions of the applicable End User License Agreement for the product and the proprietary and restricted rights notices included in this documentation.


AR System Java API

? Copyright 2006, 2007 BMC Software, Inc.