AR System Java Plug-in API

com.bmc.arsys.pluginsvr.plugins
Class ARDBCPlugin

java.lang.Object
  extended by com.bmc.arsys.pluginsvr.plugins.ARPlugin
      extended by com.bmc.arsys.pluginsvr.plugins.ARDBCPlugin
All Implemented Interfaces:
ARDBCPluggable, ARPluggable

public abstract class ARDBCPlugin
extends ARPlugin
implements ARDBCPluggable

Default implemetation of the ARDBC plugin


Constructor Summary
ARDBCPlugin()
           
 
Method Summary
 void cancel(ARPluginContext context, long transId)
          Cancel the given transaction
 void commit(ARPluginContext context, long transId)
          Commit the given transaction in the external datasouce
 String createEntry(ARPluginContext context, String tableName, List<ARVendorField> fieldsList, long transId, com.bmc.arsys.api.Entry entry)
          Create an entry in the given table for external data source.
 void deleteEntry(ARPluginContext context, String tableName, List<ARVendorField> fieldsList, long transId, String entryId)
          Given the table name and entry id, delete the entry from the table in the external data source
 com.bmc.arsys.api.AttachmentValue getBLOB(ARPluginContext context, String tableName, List<ARVendorField> fieldsList, long transId, String entryId, int fieldId)
          Given the table name, entry id and the blob field id, fetch the blob from that field in that table for that entry
 com.bmc.arsys.api.Entry getEntry(ARPluginContext context, String tableName, List<ARVendorField> fieldsList, long transId, String entryId, int[] idList)
          Given the table name, list of fields and entry id, fetch the entry from the external data source.
 List<com.bmc.arsys.api.StatisticsResultInfo> getEntryStatistics(ARPluginContext context, String tableName, List<ARVendorField> fieldsList, long transId, com.bmc.arsys.api.QualifierInfo qualifier, com.bmc.arsys.api.ArithmeticOrRelationalOperand target, int statistic, int[] groupByList)
          Return the entry statistics for the given table and qualification.
 List<com.bmc.arsys.api.Entry> getListEntryWithFields(ARPluginContext context, String tableName, List<ARVendorField> fieldsList, long transId, com.bmc.arsys.api.QualifierInfo qualifier, List<com.bmc.arsys.api.SortInfo> sortList, List<com.bmc.arsys.api.EntryListFieldInfo> getListFields, int startAt, int maxRetrieve, com.bmc.arsys.api.OutputInteger numMatches)
          Given the table name, a qualification, and list of fields to fetch the values for, return a list of entries with all fields and their values that meet the given qualification.
 List<com.bmc.arsys.api.VendorForm> getListForms(ARPluginContext context)
          Return the list of forms/tables that needs to be exposed to the AR Server.
 List<ARVendorField> getMultipleFields(ARPluginContext context, com.bmc.arsys.api.VendorForm schema)
          Given the Vendor form details, return it's list of fields with all their properties
 void rollback(ARPluginContext context, long transId)
          Rollback the given transaction in the external datasource.
 void setBLOB(ARPluginContext context, String tableName, List<ARVendorField> fieldsList, long transId, String entryId, int fieldId, com.bmc.arsys.api.AttachmentValue info)
          Given the table, entry and the blob field id, insert the blob into the external datasource table
 void setEntry(ARPluginContext context, String tableName, List<ARVendorField> fieldsList, long transId, String entryId, com.bmc.arsys.api.Entry entry, com.bmc.arsys.api.Timestamp getTimestamp)
          Given the table name, and entry object, modify the entry recognized by the entry key of the entry object in the external datasource.
 
Methods inherited from class com.bmc.arsys.pluginsvr.plugins.ARPlugin
initialize, onEvent, terminate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bmc.arsys.pluginsvr.plugins.ARPluggable
initialize, onEvent, terminate
 

Constructor Detail

ARDBCPlugin

public ARDBCPlugin()
Method Detail

createEntry

public String createEntry(ARPluginContext context,
                          String tableName,
                          List<ARVendorField> fieldsList,
                          long transId,
                          com.bmc.arsys.api.Entry entry)
                   throws com.bmc.arsys.api.ARException
Description copied from interface: ARDBCPluggable
Create an entry in the given table for external data source. Called on a creation of a new entry in the AR Vendor form based on this table from the external datasource.

Specified by:
createEntry in interface ARDBCPluggable
Parameters:
context - Current context for this plugin call, like username etc.
tableName - table name
fieldsList - list of fields on the form and its datatypes etc.
transId - transaction id
entry - the entry object with all field value pairs
Returns:
String object with the entry id for the newly created entry.
Throws:
com.bmc.arsys.api.ARException - with a list of StatusInfo objects in it that can be passed on to the server

getEntry

public com.bmc.arsys.api.Entry getEntry(ARPluginContext context,
                                        String tableName,
                                        List<ARVendorField> fieldsList,
                                        long transId,
                                        String entryId,
                                        int[] idList)
                                 throws com.bmc.arsys.api.ARException
Description copied from interface: ARDBCPluggable
Given the table name, list of fields and entry id, fetch the entry from the external data source.

Specified by:
getEntry in interface ARDBCPluggable
Parameters:
context - Current context for this plugin call, like username etc.
tableName - table name
fieldsList - list of fields on the form and its datatypes etc.
transId - transaction id
entryId - String object with the id for the entry to fetch
idList - list of field ids to fetch the values for in the entry
Returns:
Entry object with a list of field value pair
Throws:
com.bmc.arsys.api.ARException

setEntry

public void setEntry(ARPluginContext context,
                     String tableName,
                     List<ARVendorField> fieldsList,
                     long transId,
                     String entryId,
                     com.bmc.arsys.api.Entry entry,
                     com.bmc.arsys.api.Timestamp getTimestamp)
              throws com.bmc.arsys.api.ARException
Description copied from interface: ARDBCPluggable
Given the table name, and entry object, modify the entry recognized by the entry key of the entry object in the external datasource.

Specified by:
setEntry in interface ARDBCPluggable
Parameters:
context - Current context for this plugin call, like username etc.
tableName - table name
fieldsList - list of fields on the form and its datatypes etc.
transId - transaction id
entryId - entry id for entry to set
entry - entry object with new field value pairs to modify the entry
getTimestamp - Timestamp for last modified time to recognize entries to modify
Throws:
com.bmc.arsys.api.ARException

deleteEntry

public void deleteEntry(ARPluginContext context,
                        String tableName,
                        List<ARVendorField> fieldsList,
                        long transId,
                        String entryId)
                 throws com.bmc.arsys.api.ARException
Description copied from interface: ARDBCPluggable
Given the table name and entry id, delete the entry from the table in the external data source

Specified by:
deleteEntry in interface ARDBCPluggable
Parameters:
context - Current context for this plugin call, like username etc.
tableName - table name
fieldsList - list of fields on the form and its datatypes etc.
transId - transaction id
entryId - String object iding the entry in the table
Throws:
com.bmc.arsys.api.ARException

getBLOB

public com.bmc.arsys.api.AttachmentValue getBLOB(ARPluginContext context,
                                                 String tableName,
                                                 List<ARVendorField> fieldsList,
                                                 long transId,
                                                 String entryId,
                                                 int fieldId)
                                          throws com.bmc.arsys.api.ARException
Description copied from interface: ARDBCPluggable
Given the table name, entry id and the blob field id, fetch the blob from that field in that table for that entry

Specified by:
getBLOB in interface ARDBCPluggable
Parameters:
context - Current context for this plugin call, like username etc.
tableName - table name
fieldsList - list of fields on the form and its datatypes etc.
transId - transaction id
entryId - String object iding the entry in the table
fieldId - Fieldid to fetch the blob object from
Returns:
An AttachmentValue object with the blob in it.
Throws:
com.bmc.arsys.api.ARException

setBLOB

public void setBLOB(ARPluginContext context,
                    String tableName,
                    List<ARVendorField> fieldsList,
                    long transId,
                    String entryId,
                    int fieldId,
                    com.bmc.arsys.api.AttachmentValue info)
             throws com.bmc.arsys.api.ARException
Description copied from interface: ARDBCPluggable
Given the table, entry and the blob field id, insert the blob into the external datasource table

Specified by:
setBLOB in interface ARDBCPluggable
Parameters:
context - Current context for this plugin call, like username etc.
tableName - table name
fieldsList - list of fields on the form and its datatypes etc.
transId - transaction id
entryId - String object iding the entry in the table
fieldId - Fieldid to fetch the blob object from
info - AttachmentValue object with the blob to set.
Throws:
com.bmc.arsys.api.ARException

getListEntryWithFields

public List<com.bmc.arsys.api.Entry> getListEntryWithFields(ARPluginContext context,
                                                            String tableName,
                                                            List<ARVendorField> fieldsList,
                                                            long transId,
                                                            com.bmc.arsys.api.QualifierInfo qualifier,
                                                            List<com.bmc.arsys.api.SortInfo> sortList,
                                                            List<com.bmc.arsys.api.EntryListFieldInfo> getListFields,
                                                            int startAt,
                                                            int maxRetrieve,
                                                            com.bmc.arsys.api.OutputInteger numMatches)
                                                     throws com.bmc.arsys.api.ARException
Description copied from interface: ARDBCPluggable
Given the table name, a qualification, and list of fields to fetch the values for, return a list of entries with all fields and their values that meet the given qualification.

Specified by:
getListEntryWithFields in interface ARDBCPluggable
Parameters:
context - Current context for this plugin call, like username etc.
tableName - table name
fieldsList - list of fields on the form and its datatypes etc.
transId - transaction id
qualifier - QualifierInfo for the qualification
sortList - SortInfo for the sort orders
getListFields - list of fields to fetch values for
startAt - starting record
maxRetrieve - max number of records to fetch
numMatches - OutputInteger to be returned with number of records that actually matched the qual
Returns:
list of Entry objects that satisfy the qualification
Throws:
com.bmc.arsys.api.ARException

commit

public void commit(ARPluginContext context,
                   long transId)
            throws com.bmc.arsys.api.ARException
Description copied from interface: ARDBCPluggable
Commit the given transaction in the external datasouce

Specified by:
commit in interface ARDBCPluggable
Parameters:
context - Current context for this plugin call, like username etc.
transId - transaction id
Throws:
com.bmc.arsys.api.ARException

rollback

public void rollback(ARPluginContext context,
                     long transId)
              throws com.bmc.arsys.api.ARException
Description copied from interface: ARDBCPluggable
Rollback the given transaction in the external datasource.

Specified by:
rollback in interface ARDBCPluggable
Parameters:
context - Current context for this plugin call, like username etc.
transId - transaction id
Throws:
com.bmc.arsys.api.ARException

cancel

public void cancel(ARPluginContext context,
                   long transId)
            throws com.bmc.arsys.api.ARException
Description copied from interface: ARDBCPluggable
Cancel the given transaction

Specified by:
cancel in interface ARDBCPluggable
Parameters:
context - Current context for this plugin call, like username etc.
transId - transaction id
Throws:
com.bmc.arsys.api.ARException

getListForms

public List<com.bmc.arsys.api.VendorForm> getListForms(ARPluginContext context)
                                                throws com.bmc.arsys.api.ARException
Description copied from interface: ARDBCPluggable
Return the list of forms/tables that needs to be exposed to the AR Server. The forms are represented by the VendorForm objects.

Specified by:
getListForms in interface ARDBCPluggable
Parameters:
context - Current context for this plugin call, like username etc.
Returns:
List of VenforForm objects to expose
Throws:
com.bmc.arsys.api.ARException

getMultipleFields

public List<ARVendorField> getMultipleFields(ARPluginContext context,
                                             com.bmc.arsys.api.VendorForm schema)
                                      throws com.bmc.arsys.api.ARException
Description copied from interface: ARDBCPluggable
Given the Vendor form details, return it's list of fields with all their properties

Specified by:
getMultipleFields in interface ARDBCPluggable
Parameters:
context - Current context for this plugin call, like username etc.
schema - VendorForm object with details about the form
Returns:
List of fields for the table with details for each field
Throws:
com.bmc.arsys.api.ARException

getEntryStatistics

public List<com.bmc.arsys.api.StatisticsResultInfo> getEntryStatistics(ARPluginContext context,
                                                                       String tableName,
                                                                       List<ARVendorField> fieldsList,
                                                                       long transId,
                                                                       com.bmc.arsys.api.QualifierInfo qualifier,
                                                                       com.bmc.arsys.api.ArithmeticOrRelationalOperand target,
                                                                       int statistic,
                                                                       int[] groupByList)
                                                                throws com.bmc.arsys.api.ARException
Description copied from interface: ARDBCPluggable
Return the entry statistics for the given table and qualification.

Specified by:
getEntryStatistics in interface ARDBCPluggable
Parameters:
context - Current context for this plugin call, like username etc.
tableName - table name
fieldsList - list of fields on the form and its datatypes etc.
transId - transaction id
qualifier - QualifierInfo for the qualification
target - Operation for the statistics
statistic - the type of statistic
groupByList - list of fields to group by
Returns:
StatisticsResultInfo that has the statistics
Throws:
com.bmc.arsys.api.ARException

AR System Java Plug-in API

? Copyright 2006, 2007 BMC Software, Inc.