com.ibm.pim.interfaces.context
Interface Context


public interface Context

Interface providing methods for Context


Field Summary
static java.lang.String copyright
           
 
Method Summary
 void cleanUp()
          This method is necesary to call at the same scope that the Context is created in order to free up memory used the Context.
 void commit()
          Commit transaction.
 CatalogManager getCatalogManager()
          Gets the CatalogManager for this context
 ContextAttributes getContextAttributes()
          Gets the context attributes for this context
 HierarchyManager getHierarchyManager()
          Gets the HierarchyManager for this context
 LookupTableManager getLookupTableManager()
          Gets the LookupTableManager for this context
 SearchManager getSearchManager()
          Gets the SearchManager for this context
 SpecManager getSpecManager()
          Gets the SpecManager for this context
 TimezoneResolver getTimezoneResolver()
          Gets a utility for processing timezone related information.
 UserDefinedLogManager getUserDefinedLogManager()
          Gets the UserDefinedLogManager for this context
 boolean inTransaction()
          Return true if in a transaction, or false otherwise
 void rollback()
          Rollback transaction.
 void startTransaction()
          Start a transaction.
 

Field Detail

copyright

public static final java.lang.String copyright
See Also:
Constant Field Values
Method Detail

getCatalogManager

public CatalogManager getCatalogManager()
                                 throws PIMInternalException,
                                        PIMAuthorizationException
Gets the CatalogManager for this context

Returns:
the Manager for Catalog objects
Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - if the user is not authorized to perform this operation
See Also:
CatalogManager

getHierarchyManager

public HierarchyManager getHierarchyManager()
                                     throws PIMInternalException,
                                            PIMAuthorizationException
Gets the HierarchyManager for this context

Returns:
the Manager for Hierarchy objects
Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - if the user is not authorized to perform this operation
See Also:
HierarchyManager

getLookupTableManager

public LookupTableManager getLookupTableManager()
                                         throws PIMInternalException,
                                                PIMAuthorizationException
Gets the LookupTableManager for this context

Returns:
the Manager for LookupTable objects
Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - if the user is not authorized to perform this operation
See Also:
LookupTableManager

getSearchManager

public SearchManager getSearchManager()
                               throws PIMInternalException,
                                      PIMAuthorizationException
Gets the SearchManager for this context

Returns:
the Manager for Search objects
Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - if the user is not authorized to perform this operation
See Also:
SearchManager

getSpecManager

public SpecManager getSpecManager()
                           throws PIMInternalException,
                                  PIMAuthorizationException
Gets the SpecManager for this context

Returns:
the Manager for Spec objects
Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - if the user is not authorized to perform this operation
See Also:
SpecManager

getUserDefinedLogManager

public UserDefinedLogManager getUserDefinedLogManager()
                                               throws PIMInternalException,
                                                      PIMAuthorizationException
Gets the UserDefinedLogManager for this context

Returns:
the Manager for UserDefinedLog objects
Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - if the user is not authorized to perform this operation
See Also:
UserDefinedLogManager

getContextAttributes

public ContextAttributes getContextAttributes()
                                       throws PIMInternalException,
                                              PIMAuthorizationException
Gets the context attributes for this context

Returns:
A ContextAttributes object containing attributes for this context
Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - if the user is not authorized to perform this operation
See Also:
ContextAttributes

startTransaction

public void startTransaction()
                      throws PIMInternalException,
                             PIMAuthorizationException,
                             PIMAlreadyInTransactionException
Start a transaction. No effect if already in a transaction.

Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - if the user is not authorized to perform this operation
PIMAlreadyInTransactionException - if a transaction is already started. This situation must be handled; the user can commit, rollback or cancel their operation but should not continue normal processing if this is thrown, as subsequent code will think it is in a new transaction.

commit

public void commit()
            throws PIMInternalException,
                   PIMAuthorizationException
Commit transaction. No effect if not in a transaction.

Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - if the user is not authorized to perform this operation

rollback

public void rollback()
              throws PIMInternalException,
                     PIMAuthorizationException
Rollback transaction. No effect if not in a transaction.

Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - if the user is not authorized to perform this operation

inTransaction

public boolean inTransaction()
                      throws PIMInternalException,
                             PIMAuthorizationException
Return true if in a transaction, or false otherwise

Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - if the user is not authorized to perform this operation

getTimezoneResolver

public TimezoneResolver getTimezoneResolver()
                                     throws PIMInternalException
Gets a utility for processing timezone related information.

Returns:
a TimezoneResolver
Throws:
PIMInternalException - if an internal error occurs

cleanUp

public void cleanUp()
This method is necesary to call at the same scope that the Context is created in order to free up memory used the Context. If the thread that used this Context will be cleaned up, then that will take care of this memory. Otherwise, this method must be called, or else you will have a memory leak for a long running thread. If you call any other methods on this class after calling cleanup(), you WILL get a NullPointerException. It is important NOT to call cleanup() on a Context object you did not create.