JOARSE Documentation

1.0

Introduction

Welcome to JOARSE, Java Object for the AR System. JOARSE makes developing Remedy AR System integrations using Remedy's API much easier and less error prone. Your development environment remains Java, but a new Java API built on top of Remedy's C API provides a more natural set of objects which are easier to use. The same functionality will require many fewer lines of code, will be much less error prone, and in many cases will have better performance. Where Remedy's Java API exclusively uses arrays, the objects in JOARSE use Map or Vector when appropriate - such as when objects in a collection are identified by a field or property id. This provides fast and easy lookup in collections.

Here's an example:

Here's how to make an API call to find out what the server's name and database type are using JOARSE:


 Server server = new Server();
 try {
   server.login("localhost", "Demo", "");
   Map serverInfo = server.getServerInfo(new int [] {Server.AR_SERVER_INFO_SERVER_NAME, Server.AR_SERVER_INFO_DB_TYPE});
   System.out.println("Server " + serverInfo.get(new Int(Server.AR_SERVER_INFO_SERVER_NAME)) + " is using database " + 
       serverInfo.get(new Int(Server.AR_SERVER_INFO_DB_TYPE)) + "\n";
 } catch (JOARSEException err) {
    System.err.println(err.getMessage());
    return 2;
 } finally {
   try {
     server.logout();
   } catch (JOARSEException err) {
   }
 }
 return 0;
 

Here's an example of retriving matching entries and printing out values. Note that the values in an entry are stored in a Map rather than an array.


 Server server = new Server();
 try {
   server.login("localhost", "Demo", "");
   Entry [] entries = server.getListEntryWithFields("Sample:Classes", "'Status*' = \"Completed\"", new long [] { 8 });
   for (int i=0; i < entries.length; i++) {
     System.out.println("Entry: " + entries[i].getEntryId());
     System.out.println(entries[i].getValues().get(new Long(8)));
   }
 } catch (JOARSEException err) {
    System.err.println(err.getMessage());
    return 2;
 } finally {
   try {
     server.logout();
   } catch (JOARSEException err) {
   }
 }
 return 0;
 

Common Questions


Generated on Thu Jun 1 10:42:07 2006 for JOARSE by  doxygen 1.4.6-NO