com.ibm.tws.conn.model
Interface ConnModel


public interface ConnModel

This interface contains all the methods used to interact remotely with the TWS connector for model objects.


Field Summary
static java.lang.String COPYRIGHT
          Copyright
 
Method Summary
 Identifier addTWSObject(TWSObject twsObject, Context context)
          Creates a new TWS model object.
 TWSObject getTWSObject(java.lang.Class cl, Identifier id, boolean lock, Context context)
          Retrieves a TWS model object by identifier, optionally locking it if requested.
 TWSObject getTWSObject(java.lang.Class cl, TWSKey twsKey, boolean lock, Context context)
          Retrieves a TWS model object by external key, optionally locking it if requested.
 java.lang.Boolean isWorkstation(Identifier[] id, FlowTargetKey[] key, Context context)
          Retrieves the type, identifier and key of a Workstation or WorkstationClass object.
 JobStatistics loadJobStatistics(Identifier jobDefinitionId, Context context)
          Load job definition statistcs object by job definition id.
 JobStatistics loadJobStatistics(JobDefinitionKey jobDefinitionKey, Context context)
          Load job definition statistcs object by job definition external key.
 void lockTWSObject(java.lang.Class cl, Identifier id, Context context)
          Locks a TWS model object by identifier, checking that the object is not locked by any user.
 void lockTWSObject(java.lang.Class cl, TWSKey twsKey, Context context)
          Locks a TWS model object by external key, checking that the object is not locked by any user.
 QueryResult queryNext(QueryContext queryContext)
          Return the next chunk of objects retrieved by a queryTWSObject call.
 QueryResult queryTWSObject(java.lang.Class cl, QueryFilter filter, int howMany, Context context)
          Returns a list of the TWS model objects that match the given search filter.
 void removeTWSObject(java.lang.Class cl, Identifier id, Context context)
          Removes a TWS model object by identifier, checking that the object is not locked by any user.
 void removeTWSObject(java.lang.Class cl, TWSKey twsKey, Context context)
          Removes a TWS model object by external key, checking that the object is not locked by any user.
 Identifier setTWSObject(TWSObject twsObject, boolean isLocked, boolean unlock, Context context)
          Updates a TWS model object, checking that the lock status is the expected one and optionally releasing the lock.
 void unlockTWSObject(java.lang.Class cl, Identifier id, boolean force, Context context)
          Unlocks a TWS model object by identifier, checking that it is currently locked by the requesting user and session.
 void unlockTWSObject(java.lang.Class cl, TWSKey twsKey, boolean force, Context context)
          Unlocks a TWS model object by external key, checking that it is currently locked by the requesting user and session.
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright

Method Detail

addTWSObject

public Identifier addTWSObject(TWSObject twsObject,
                               Context context)
                        throws ConnException,
                               ConnLockingException,
                               ConnIntegrityException,
                               ConnTransportException,
                               ConnValidationException,
                               ConnSecurityException,
                               java.rmi.RemoteException
Creates a new TWS model object.

Parameters:
twsObject - The TWS model object to be created.
context - The user context, or null if a default context is to be used.
Returns:
The identifier of the new object.
Throws:
ConnException - A problem has occurred, which is not one of those listed below.
ConnLockingException - The database is locked by the planning process.
ConnIntegrityException - A data integrity check has failed.
ConnTransportException - A transport problem has been found in accessing the data.
ConnValidationException - A syntax or semantic validation check has failed.
ConnSecurityException - A security check has failed.
java.rmi.RemoteException - A problem has occurred while serializing parameters.

removeTWSObject

public void removeTWSObject(java.lang.Class cl,
                            TWSKey twsKey,
                            Context context)
                     throws ConnException,
                            ConnIntegrityException,
                            ConnNotFoundException,
                            ConnLockingException,
                            ConnTransportException,
                            ConnValidationException,
                            ConnSecurityException,
                            java.rmi.RemoteException
Removes a TWS model object by external key, checking that the object is not locked by any user.

Parameters:
cl - The Class of the TWS model object to be removed: valid classes are those that implement the TWSObject interface.
twsKey - The external key of the TWS model object to be removed.
context - The user context, or null if a default context is to be used.
Throws:
ConnException - A problem has occurred, which is not one of those listed below.
ConnNotFoundException - The object identified by the given external key was not found.
ConnLockingException - The object is locked, or the database is locked by the planning process.
ConnIntegrityException - The object cannot be removed because it is referenced by other objects.
ConnTransportException - A transport problem has been found in accessing the data.
ConnValidationException - A syntax or semantic validation check has failed.
ConnSecurityException - A security check has failed.
java.rmi.RemoteException - A problem has occurred while serializing parameters.

removeTWSObject

public void removeTWSObject(java.lang.Class cl,
                            Identifier id,
                            Context context)
                     throws ConnException,
                            ConnIntegrityException,
                            ConnNotFoundException,
                            ConnLockingException,
                            ConnTransportException,
                            ConnValidationException,
                            ConnSecurityException,
                            java.rmi.RemoteException
Removes a TWS model object by identifier, checking that the object is not locked by any user.

Parameters:
cl - The Class of the TWS model object to be removed: valid classes are those that implement the TWSObject interface.
id - The identifier of the TWS model object to be removed.
context - The user context, or null if a default context is to be used.
Throws:
ConnException - A problem has occurred, which is not one of those listed below.
ConnNotFoundException - The object identified by the given identifier was not found.
ConnLockingException - The object is locked, or the database is locked by the planning process.
ConnIntegrityException - The object cannot be removed because it is referenced by other objects.
ConnTransportException - A transport problem has been found in accessing the data.
ConnValidationException - A syntax or semantic validation check has failed.
ConnSecurityException - A security check has failed.
java.rmi.RemoteException - A problem has occurred while serializing parameters.

getTWSObject

public TWSObject getTWSObject(java.lang.Class cl,
                              TWSKey twsKey,
                              boolean lock,
                              Context context)
                       throws ConnException,
                              ConnIntegrityException,
                              ConnNotFoundException,
                              ConnLockingException,
                              ConnTransportException,
                              ConnValidationException,
                              ConnSecurityException,
                              java.rmi.RemoteException
Retrieves a TWS model object by external key, optionally locking it if requested.

Parameters:
cl - The Class of the TWS model object to be retrieved: valid classes are those that implement the TWSObject interface.
twsKey - The external key of the TWS model object to be retrieved.
context - The user context. It cannot be null if lock is true.
lock - True if the object must be locked while being retrieved.
Returns:
The retrieved TWS model object.
Throws:
ConnException - A problem has occurred, which is not one of those listed below.
ConnIntegrityException - A data integrity check has failed while trying to lock the object.
ConnNotFoundException - The object identified by the given external key was not found.
ConnLockingException - The object cannot be locked because it is already locked by this user or by a different one.
ConnTransportException - A transport problem has been found in accessing the data.
ConnValidationException - A syntax or semantic validation check has failed.
ConnSecurityException - A security check has failed.
java.rmi.RemoteException - A problem has occurred while serializing parameters.

getTWSObject

public TWSObject getTWSObject(java.lang.Class cl,
                              Identifier id,
                              boolean lock,
                              Context context)
                       throws ConnException,
                              ConnIntegrityException,
                              ConnNotFoundException,
                              ConnLockingException,
                              ConnTransportException,
                              ConnValidationException,
                              ConnSecurityException,
                              java.rmi.RemoteException
Retrieves a TWS model object by identifier, optionally locking it if requested.

Parameters:
cl - The Class of the TWS model object to be retrieved: valid classes are those that implement the TWSObject interface.
id - The identifier of the TWS model object to be retrieved.
context - The user context. It cannot be null if lock is true.
lock - True if the object must be locked while being retrieved.
Returns:
The retrieved TWS model object.
Throws:
ConnException - A problem has occurred, which is not one of those listed below.
ConnIntegrityException - A data integrity check has failed while trying to lock the object.
ConnNotFoundException - The object identified by the given identifier was not found.
ConnLockingException - The object cannot be locked because it is already locked by this user or by a different one.
ConnTransportException - A transport problem has been found in accessing the data.
ConnValidationException - A syntax or semantic validation check has failed.
ConnSecurityException - A security check has failed.
java.rmi.RemoteException - A problem has occurred while serializing parameters.

setTWSObject

public Identifier setTWSObject(TWSObject twsObject,
                               boolean isLocked,
                               boolean unlock,
                               Context context)
                        throws ConnException,
                               ConnIntegrityException,
                               ConnNotFoundException,
                               ConnLockingException,
                               ConnTransportException,
                               ConnValidationException,
                               ConnSecurityException,
                               java.rmi.RemoteException
Updates a TWS model object, checking that the lock status is the expected one and optionally releasing the lock. If an exception is thrown, the object will not be updated and lock will not be released.

Parameters:
twsObject - The TWS model object to be updated.
isLocked - True if the object is expected to be locked by the user, false if it is expected to be unlocked.
unlock - True if the lock must be released after applying the requested update.
context - The user context. It can be null only if unlock is false and isLocked is false.
Returns:
The new identifier of the object
Throws:
ConnException - A problem has occurred, which is not one of those listed below.
ConnIntegrityException - A data integrity check has failed.
ConnNotFoundException - The given object was not found, neither by identifier nor by external key.
ConnLockingException - The object is not locked as expected, or the database is locked by the planning process.
ConnTransportException - A transport problem has been found in accessing the data.
ConnValidationException - A syntax or semantic validation check has failed.
ConnSecurityException - A security check has failed.
java.rmi.RemoteException - A problem has occurred while serializing parameters.

queryTWSObject

public QueryResult queryTWSObject(java.lang.Class cl,
                                  QueryFilter filter,
                                  int howMany,
                                  Context context)
                           throws ConnException,
                                  ConnTransportException,
                                  ConnValidationException,
                                  ConnSecurityException,
                                  java.rmi.RemoteException
Returns a list of the TWS model objects that match the given search filter. Each object is returned in its "header" shape: if two separate implementations of the TWSHeader and TWSObject interfaces exist, the first one is used. To extract objects in chunks, use queryTWSObject and then call queryContext one or more times until more objects are returned.

Parameters:
cl - The Class of the TWS model object to be retrieved: valid classes are those that implement the TWSObject interface.
filter - The search filer, or null if all the objects of the given class must be returned.
howMany - The maximum number of objects to be retrieved (used to extract a large number of objects in chunks). Use 0 (zero) to retrieve all the objects that match the given filter in one shot.
context - The user context, or null if a default context is to be used.
Returns:
A QueryResult, including the TWSHeader implementation of objects retrieved.
Throws:
ConnException - A problem has occurred, which is not one of those listed below.
ConnTransportException - A transport problem has been found in accessing the data.
ConnValidationException - A syntax or semantic validation check has failed.
ConnSecurityException - A security check has failed.
java.rmi.RemoteException - A problem has occurred while serializing parameters.

queryNext

public QueryResult queryNext(QueryContext queryContext)
                      throws ConnException,
                             ConnTransportException,
                             ConnValidationException,
                             ConnSecurityException,
                             java.rmi.RemoteException
Return the next chunk of objects retrieved by a queryTWSObject call. Each object is returned in its "header" shape: if two separate implementations of the TWSHeader and TWSObject interfaces exist, the first one is used. To extract objects in chunks, use queryTWSObject and then call queryContext one or more times until more objects are returned.

Parameters:
queryContext - The query context extracted from the QueryResult that has been returned by a call to the queryTWSObject method, or by the previous call to the queryNext method.
Returns:
A QueryResult, including the TWSHeader implementation of objects retrieved.
Throws:
ConnException - A problem has occurred, which is not one of those listed below.
ConnTransportException - A transport problem has been found in accessing the data.
ConnValidationException - A syntax or semantic validation check has failed.
ConnSecurityException - A security check has failed.
java.rmi.RemoteException - A problem has occurred while serializing parameters.

lockTWSObject

public void lockTWSObject(java.lang.Class cl,
                          Identifier id,
                          Context context)
                   throws ConnException,
                          ConnIntegrityException,
                          ConnNotFoundException,
                          ConnLockingException,
                          ConnTransportException,
                          ConnValidationException,
                          ConnSecurityException,
                          java.rmi.RemoteException
Locks a TWS model object by identifier, checking that the object is not locked by any user.

Parameters:
cl - The Class of the TWS model object to be locked: valid classes are those that implement the TWSObject interface.
id - The identifier of the TWS model object to be locked.
context - The user context (a null context is not allowed).
Throws:
ConnException - A problem has occurred, which is not one of those listed below.
ConnIntegrityException - A data integrity check has failed while trying to lock the object.
ConnNotFoundException - The object identified by the given identifier was not found.
ConnLockingException - The object cannot be locked because it is already locked by this user or by a different one.
ConnTransportException - A transport problem has been found in accessing the data.
ConnValidationException - A syntax or semantic validation check has failed.
ConnSecurityException - A security check has failed.
java.rmi.RemoteException - A problem has occurred while serializing parameters.

lockTWSObject

public void lockTWSObject(java.lang.Class cl,
                          TWSKey twsKey,
                          Context context)
                   throws ConnException,
                          ConnIntegrityException,
                          ConnNotFoundException,
                          ConnLockingException,
                          ConnTransportException,
                          ConnValidationException,
                          ConnSecurityException,
                          java.rmi.RemoteException
Locks a TWS model object by external key, checking that the object is not locked by any user.

Parameters:
cl - The Class of the TWS model object to be locked: valid classes are those that implement the TWSObject interface.
twsKey - The external key of the TWS model object to be locked.
context - The user context (a null context is not allowed).
Throws:
ConnException - A problem has occurred, which is not one of those listed below.
ConnIntegrityException - A data integrity check has failed while trying to lock the object.
ConnNotFoundException - The object identified by the given external key was not found.
ConnLockingException - The object cannot be locked because it is already locked by this user or by a different one.
ConnTransportException - A transport problem has been found in accessing the data.
ConnValidationException - A syntax or semantic validation check has failed.
ConnSecurityException - A security check has failed.
java.rmi.RemoteException - A problem has occurred while serializing parameters.

unlockTWSObject

public void unlockTWSObject(java.lang.Class cl,
                            Identifier id,
                            boolean force,
                            Context context)
                     throws ConnException,
                            ConnIntegrityException,
                            ConnNotFoundException,
                            ConnLockingException,
                            ConnTransportException,
                            ConnValidationException,
                            ConnSecurityException,
                            java.rmi.RemoteException
Unlocks a TWS model object by identifier, checking that it is currently locked by the requesting user and session.

Parameters:
cl - The Class of the TWS model object to be unlocked: valid classes are those that implement the TWSObject interface.
id - The identifier of the TWS model object to be unlocked.
force - True if the object must be unlocked even if the requesting user is currently holding the lock using another session, or if the lock is held by another user and the requesting user has sufficient rights to unlock it.
context - The user context (a null context is not allowed).
Throws:
ConnException - A problem has occurred, which is not one of those listed below.
ConnIntegrityException - A data integrity check has failed while trying to unlock the object.
ConnNotFoundException - The object identified by the given identifier was not found.
ConnLockingException - The object cannot be unlocked because it is not locked by the requesting user, or is locked by the requesting user on a different session.
ConnTransportException - A transport problem has been found in accessing the data.
ConnValidationException - A syntax or semantic validation check has failed.
ConnSecurityException - A security check has failed.
java.rmi.RemoteException - A problem has occurred while serializing parameters.

unlockTWSObject

public void unlockTWSObject(java.lang.Class cl,
                            TWSKey twsKey,
                            boolean force,
                            Context context)
                     throws ConnException,
                            ConnIntegrityException,
                            ConnNotFoundException,
                            ConnLockingException,
                            ConnTransportException,
                            ConnValidationException,
                            ConnSecurityException,
                            java.rmi.RemoteException
Unlocks a TWS model object by external key, checking that it is currently locked by the requesting user and session.

Parameters:
cl - The Class of the TWS model object to be unlocked: valid classes are those that implement the TWSObject interface.
twsKey - The external key of the TWS model object to be unlocked.
force - True if the object must be unlocked even if the requesting user is currently holding the lock using another session, or if the lock is held by another user and the requesting user has sufficient rights to unlock it.
context - The user context (a null context is not allowed).
Throws:
ConnException - A problem has occurred, which is not one of those listed below.
ConnIntegrityException - A data integrity check has failed while trying to unlock the object.
ConnNotFoundException - The object identified by the given external key was not found.
ConnLockingException - The object cannot be unlocked because it is not locked by the requesting user, or is locked by the requesting user on a different session.
ConnTransportException - A transport problem has been found in accessing the data.
ConnValidationException - A syntax or semantic validation check has failed.
ConnSecurityException - A security check has failed.
java.rmi.RemoteException - A problem has occurred while serializing parameters.

loadJobStatistics

public JobStatistics loadJobStatistics(Identifier jobDefinitionId,
                                       Context context)
                                throws ConnNotFoundException,
                                       ConnException,
                                       java.rmi.RemoteException
Load job definition statistcs object by job definition id.

Parameters:
jobDefinitionId - The identifier of the job definition.
context - The user context, or null if a default context is to be used.
Returns:
job statistics
Throws:
ConnException - A problem has occurred, which is not one of those listed below.
ConnTransportException - A transport problem has been found in accessing the data.
ConnNotFoundException - The job definition identified by the given id was not found.
java.rmi.RemoteException

loadJobStatistics

public JobStatistics loadJobStatistics(JobDefinitionKey jobDefinitionKey,
                                       Context context)
                                throws ConnNotFoundException,
                                       ConnException,
                                       java.rmi.RemoteException
Load job definition statistcs object by job definition external key.

Parameters:
jobDefinitionKey - The external key of the job definition.
context - The user context, or null if a default context is to be used.
Returns:
job statistics
Throws:
ConnException - A problem has occurred, which is not one of those listed below.
ConnTransportException - A transport problem has been found in accessing the data.
ConnNotFoundException - The job definition identified by the given id was not found.
java.rmi.RemoteException

isWorkstation

public java.lang.Boolean isWorkstation(Identifier[] id,
                                       FlowTargetKey[] key,
                                       Context context)
                                throws ConnNotFoundException,
                                       ConnTransportException,
                                       ConnException,
                                       java.rmi.RemoteException
Retrieves the type, identifier and key of a Workstation or WorkstationClass object.

Parameters:
id - An input/output array of one element, including the identifier of the workstation or workstation class.
key - An input/output array of one element, including the key of the workstation or workstation class.
context - The user context, or null if a default context is to be used.
Returns:
True if the object retrieved is a workstation, false if it is a workstation class.
Throws:
ConnNotFoundException - The requested object was not found.
ConnTransportException - An error has occurred in accessing the data.
ConnException - A problem has occurred, which is not one of those listed above.
java.rmi.RemoteException


Copyright © 2005 IBM All Rights Reserved.