7.0 Action Request System Java API

com.remedy.arsys.api
Class SchemaFactory

java.lang.Object
  extended bycom.remedy.arsys.api.SchemaFactory
All Implemented Interfaces:
IARObjectFactory

public class SchemaFactory
extends java.lang.Object
implements IARObjectFactory

The methods in the SchemaFactory class are used to instantiate a new schema object or to get an existing schema from the server. You then define the properties of the object, and then you can perform different operations (e.g. set/create/delete) on the object from the server side.

The following Java code snippet is an example of how to get a schema object that is existing on the server:

SchemaFactory schemaFactory = SchemaFactory.getFactory( );
      SchemaKey key = new SchemaKey( );
      SchemaCriteria criteria = new SchemaCriteria( );
      criteria.setRetrieveAll( true );
      Schema schema = (Schema)schemaFactory.findByKey( context, key, criteria );
 


Constructor Summary
protected SchemaFactory()
           
 
Method Summary
static SchemaKey[] find(ARServerUser context, SchemaListCriteria criteria)
          Returns a list of schema names specified by SchemaListCriteria.
static SchemaAliasInfo[] findAliases(ARServerUser context, SchemaAliasesCriteria criteria)
          Returns a list of schema names and corresponding aliases specified by SchemaListCriteria.
static Schema findByKey(ARServerUser context, SchemaKey key, SchemaCriteria criteria)
          Returns detailed information about the Schema object specified by SchemaCriteria and SchemaKey.
static Schema[] findObjects(ARServerUser context, SchemaListCriteria listcriteria, SchemaCriteria criteria)
          Returns detailed information for a list of Schema objects specified by SchemaListCriteria and SchemaCriteria.
static SchemaFactory getFactory()
          Returns factory method you want.
 java.lang.Object newInstance()
          Creates new factory class for this object.
 boolean releaseInstance(java.lang.Object schema)
          Releases schema factory object from memory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaFactory

protected SchemaFactory()
Method Detail

getFactory

public static SchemaFactory getFactory()
Returns factory method you want.


newInstance

public java.lang.Object newInstance()
Creates new factory class for this object.

Specified by:
newInstance in interface IARObjectFactory

releaseInstance

public boolean releaseInstance(java.lang.Object schema)
Releases schema factory object from memory.

Specified by:
releaseInstance in interface IARObjectFactory

findByKey

public static Schema findByKey(ARServerUser context,
                               SchemaKey key,
                               SchemaCriteria criteria)
                        throws ARException
Returns detailed information about the Schema object specified by SchemaCriteria and SchemaKey.

Parameters:
context - ARServerUser object containing user name, password, server name and language information
criteria - SchemaCriteria object containing the name of the schema and the information to retrieve
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if information is not returned

find

public static SchemaKey[] find(ARServerUser context,
                               SchemaListCriteria criteria)
                        throws ARException
Returns a list of schema names specified by SchemaListCriteria.

Parameters:
context - ARServerUser object containing user name, password, server name and language information
criteria - SchemaListCriteria object
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if list is not returned

findAliases

public static SchemaAliasInfo[] findAliases(ARServerUser context,
                                            SchemaAliasesCriteria criteria)
                                     throws ARException
Returns a list of schema names and corresponding aliases specified by SchemaListCriteria.

Parameters:
context - ARServerUser object containing user name, password, server name and language information
criteria - SchemaListCriteria object
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if list is not returned

findObjects

public static Schema[] findObjects(ARServerUser context,
                                   SchemaListCriteria listcriteria,
                                   SchemaCriteria criteria)
                            throws ARException
Returns detailed information for a list of Schema objects specified by SchemaListCriteria and SchemaCriteria.

Parameters:
context - ARServerUser object containing user name, password, server name and language information
listcriteria - SchemaListCriteria object
criteria - SchemaCriteria object
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if information is not returned

7.0 Action Request System Java API