Skip navigation links


Thor.API.Base
Class tcBaseUtility

java.lang.Object
  extended by Thor.API.Base.tcBaseUtility

All Implemented Interfaces:
com.thortech.xl.dataobj.tcErrorReceiver, com.thortech.xl.orb.api.operations._tcUtilityIntfOperations, com.thortech.xl.server.tcOrbServerObject, tcUtilityOperationsIntf

public abstract class tcBaseUtility
extends java.lang.Object
implements com.thortech.xl.orb.api.operations._tcUtilityIntfOperations, tcUtilityOperationsIntf, com.thortech.xl.server.tcOrbServerObject, com.thortech.xl.dataobj.tcErrorReceiver

Base utility server-side class. All server-side Utility/API classes must extend from this class. It provides all the base functionality necessary for a server-side object.


Nested Class Summary
static class tcBaseUtility.Entities
          The following enum serves two purposes: 1.

 

Field Summary
static java.lang.String DEFAULT_LOCALE
           
static java.lang.String DISPLAYNAME
           
static java.lang.String FIRSTNAME
           
static java.lang.String LASTNAME
           
static java.lang.String LKU_GROUP
           
static java.lang.String MANAGERKEY
           
static java.lang.String ORG_NAME
           
static java.lang.String ORGANIZATION_KEY_COL_CODE
           
static java.lang.String ORGANIZATION_NAME_COL_CODE
           
static java.lang.String ORGKEY
           
static java.lang.String ORGNAME
           
static java.lang.String ROLE_KEY_COL_CODE
           
static java.lang.String ROLE_NAME_COL_CODE
           
static java.lang.String STATUS
           
static java.lang.String USERID
           
static java.lang.String USERKEY
           
static java.lang.String USR_DEFINED_COLUMN_CONSTANT
          Added constants for the backward compatibility
static java.lang.String USR_KEY_COL_CODE
           
static java.lang.String USR_MANAGER_FIRST_NAME_COL_CODE
           
static java.lang.String USR_MANAGER_FIRST_NAME_COLUMN
           
static java.lang.String USR_MANAGER_KEY_COL_CODE
           
static java.lang.String USR_MANAGER_LAST_NAME_COL_CODE
           
static java.lang.String USR_MANAGER_LAST_NAME_COLUMN
           
static java.lang.String USR_MANAGER_LOGIN_COL_CODE
           
static java.lang.String USR_MANAGER_LOGIN_COLUMN
           

 

Constructor Summary
tcBaseUtility()
          Constructor.
tcBaseUtility(java.lang.String psName)
          Base Utility class.

 

Method Summary
 void addError(com.thortech.xl.orb.dataaccess.tcError poError)
          Adds the error to this object's error list, and sets the state to ERROR.
 void addErrorReceiver(com.thortech.xl.dataobj.tcErrorReceiver poErrorReceiver)
          Adds another error receiver to the object's error list.
 void addReject(com.thortech.xl.orb.dataaccess.tcError poReject)
          Adds the rejection to this object's rejection list.
 void checkStatusAndCallbackProvisioningHandler(long orcKey)
          This method checks for the Object Status corresponding to a Process Instance and calls back the Orchestation Engine in case the Object Status is Provisioned/Enabled/Disabled/Revoked based on the Request Model
 void clearErrors()
          Clears all errors and exceptions that are stored in the utility class.
 void close()
          This method will clean up all resources associated with this object.
 void ejbActivate()
          The ejbActivate() method as required by the EJB specification.
The activate method is called when the instance is activated from its passive" state.
 void ejbPassivate()
          The ejbPassivate() method as required by the EJB specification.
The activate method is called when the instance is activated from its "passive" state.
 void ejbRemove()
          The ejbRemove() method as required by the EJB specification.
A container invokes this method before it ends the life of the session object.
 com.thortech.xl.dataaccess.tcDataProvider getDataBase()
          Returns the database.
static java.lang.String getDefaultLocaleCode()
          This method will return default locale stored in DB as <user.language>_<user.region>
 EJBContext getEJBContext()
           
 com.thortech.xl.orb.dataaccess.tcError[] getErrors()
          Returns errors that occurred over the course of usage of the class.
static java.util.Map getMap(com.thortech.xl.orb.api.tcMapping[] paoMapping)
          Creates a Map object from the provided array of tcMapping objects.
static com.thortech.xl.orb.api.tcMapping[] getMapping(java.util.Map poMap)
          Creates a tcMapping array from the provided Map.
 java.lang.String getName()
          Returns the name of the client.
 java.lang.String getQueryFilter(java.util.Map moAttributeMap, java.util.Vector prepStmtParams)
           
 com.thortech.xl.orb.dataaccess.tcError[] getRejections()
          Returns rejections that occurred over the course of usage of the class.
 SessionContext getSessionContext()
          Get the associated session context
 void removeErrorReceiver(com.thortech.xl.dataobj.tcErrorReceiver poErrorReceiver)
          Removes the error receiver from the object's error list.
 void removeInstance()
          Releases the object resources.
 void setCountry(java.lang.String psCountry)
          Sets the country.
 void setLanguage(java.lang.String psLanguage)
          Sets the language.
 void setSessionContext(SessionContext newContext)
          Set the associated session context.
 void setVariant(java.lang.String psVariant)
          Sets the variant.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

USR_DEFINED_COLUMN_CONSTANT

public static final java.lang.String USR_DEFINED_COLUMN_CONSTANT
Added constants for the backward compatibility
See Also:
Constant Field Values

USR_KEY_COL_CODE

public static final java.lang.String USR_KEY_COL_CODE
See Also:
Constant Field Values

USR_MANAGER_KEY_COL_CODE

public static final java.lang.String USR_MANAGER_KEY_COL_CODE
See Also:
Constant Field Values

USR_MANAGER_LOGIN_COL_CODE

public static final java.lang.String USR_MANAGER_LOGIN_COL_CODE
See Also:
Constant Field Values

USR_MANAGER_FIRST_NAME_COL_CODE

public static final java.lang.String USR_MANAGER_FIRST_NAME_COL_CODE
See Also:
Constant Field Values

USR_MANAGER_LAST_NAME_COL_CODE

public static final java.lang.String USR_MANAGER_LAST_NAME_COL_CODE
See Also:
Constant Field Values

ORGANIZATION_KEY_COL_CODE

public static final java.lang.String ORGANIZATION_KEY_COL_CODE
See Also:
Constant Field Values

ORGANIZATION_NAME_COL_CODE

public static final java.lang.String ORGANIZATION_NAME_COL_CODE
See Also:
Constant Field Values

ROLE_KEY_COL_CODE

public static final java.lang.String ROLE_KEY_COL_CODE
See Also:
Constant Field Values

ROLE_NAME_COL_CODE

public static final java.lang.String ROLE_NAME_COL_CODE
See Also:
Constant Field Values

USR_MANAGER_FIRST_NAME_COLUMN

public static final java.lang.String USR_MANAGER_FIRST_NAME_COLUMN
See Also:
Constant Field Values

USR_MANAGER_LAST_NAME_COLUMN

public static final java.lang.String USR_MANAGER_LAST_NAME_COLUMN
See Also:
Constant Field Values

USR_MANAGER_LOGIN_COLUMN

public static final java.lang.String USR_MANAGER_LOGIN_COLUMN
See Also:
Constant Field Values

USERID

public static final java.lang.String USERID
See Also:
Constant Field Values

ORGKEY

public static final java.lang.String ORGKEY
See Also:
Constant Field Values

MANAGERKEY

public static final java.lang.String MANAGERKEY
See Also:
Constant Field Values

STATUS

public static final java.lang.String STATUS
See Also:
Constant Field Values

LKU_GROUP

public static final java.lang.String LKU_GROUP
See Also:
Constant Field Values

USERKEY

public static final java.lang.String USERKEY
See Also:
Constant Field Values

ORGNAME

public static final java.lang.String ORGNAME
See Also:
Constant Field Values

ORG_NAME

public static final java.lang.String ORG_NAME
See Also:
Constant Field Values

FIRSTNAME

public static final java.lang.String FIRSTNAME
See Also:
Constant Field Values

LASTNAME

public static final java.lang.String LASTNAME
See Also:
Constant Field Values

DISPLAYNAME

public static final java.lang.String DISPLAYNAME
See Also:
Constant Field Values

DEFAULT_LOCALE

public static final java.lang.String DEFAULT_LOCALE
See Also:
Constant Field Values

Constructor Detail

tcBaseUtility

public tcBaseUtility()
Constructor. Necessary for client-side instantiation.

tcBaseUtility

public tcBaseUtility(java.lang.String psName)
Base Utility class. Provides basic functionality for all utility classes.
Parameters:
psName - A descriptive name.

Method Detail

ejbActivate

public void ejbActivate()
                 throws EJBException,
                        java.rmi.RemoteException
The ejbActivate() method as required by the EJB specification.
The activate method is called when the instance is activated from its passive" state. The instance should acquire any resource that it has released earlier in the ejbPassivate() method.
This method is called with no transaction context.
Throws:
EJBException - Thrown if the instance could not perform the function requested by the container because of an system-level error.
java.rmi.RemoteException

ejbPassivate

public void ejbPassivate()
                  throws EJBException,
                         java.rmi.RemoteException
The ejbPassivate() method as required by the EJB specification.
The activate method is called when the instance is activated from its "passive" state. The instance should acquire any resource that it has released earlier in the ejbActivate() method.
This method is called with no transaction context.
Throws:
EJBException - Thrown if the instance could not perform the function requested by the container because of an system-level error.
java.rmi.RemoteException

ejbRemove

public void ejbRemove()
               throws EJBException,
                      java.rmi.RemoteException
The ejbRemove() method as required by the EJB specification.
A container invokes this method before it ends the life of the session object. This happens as a result of a client's invoking a remove operation, or when a container decides to terminate the session object after a timeout.
This method is called with no transaction context.
Throws:
EJBException - Thrown if the instance could not perform the function requested by the container because of an system-level error.
java.rmi.RemoteException

setSessionContext

public void setSessionContext(SessionContext newContext)
                       throws EJBException
Set the associated session context. The container calls this method after the instance creation.
The enterprise bean instance should store the reference to the context object in an instance variable.
This method is called with no transaction context.
Parameters:
newContext -
Throws:
EJBException - Thrown if the instance could not perform the function requested by the container because of an system-level error.

getSessionContext

public SessionContext getSessionContext()
Get the associated session context
Returns:
SessionContext

getEJBContext

public EJBContext getEJBContext()
Returns:
EJBContext

getDataBase

public com.thortech.xl.dataaccess.tcDataProvider getDataBase()
Returns the database. Wraps the method call to retrieve the database in tcObjectManager.
Specified by:
getDataBase in interface com.thortech.xl.server.tcOrbServerObject
Returns:
The database.

close

public void close()
This method will clean up all resources associated with this object. Called when it will no longer be used.
Specified by:
close in interface tcUtilityOperationsIntf

removeInstance

public void removeInstance()
Releases the object resources.
Specified by:
removeInstance in interface com.thortech.xl.orb.api.operations._tcUtilityIntfOperations
Specified by:
removeInstance in interface com.thortech.xl.server.tcOrbServerObject

getName

public java.lang.String getName()
Returns the name of the client.
Specified by:
getName in interface com.thortech.xl.orb.api.operations._tcUtilityIntfOperations
Specified by:
getName in interface tcUtilityOperationsIntf
Returns:
The name of the client.

setLanguage

public void setLanguage(java.lang.String psLanguage)
Sets the language. Used in defining the locality that this utility class represents. Only to be called by tcUtilityIntf.
Specified by:
setLanguage in interface com.thortech.xl.orb.api.operations._tcUtilityIntfOperations
Specified by:
setLanguage in interface tcUtilityOperationsIntf
Parameters:
psLanguage - The language.

setCountry

public void setCountry(java.lang.String psCountry)
Sets the country. Used in defining the locality that this utility class represents. Only to be called by tcUtilityIntf.
Specified by:
setCountry in interface com.thortech.xl.orb.api.operations._tcUtilityIntfOperations
Specified by:
setCountry in interface tcUtilityOperationsIntf
Parameters:
psCountry - The country.

setVariant

public void setVariant(java.lang.String psVariant)
Sets the variant. Used in defining the locality that this utility class represents. Only to be called by tcUtilityIntf.
Specified by:
setVariant in interface com.thortech.xl.orb.api.operations._tcUtilityIntfOperations
Specified by:
setVariant in interface tcUtilityOperationsIntf
Parameters:
psVariant - The locality variant.

addError

public void addError(com.thortech.xl.orb.dataaccess.tcError poError)
Adds the error to this object's error list, and sets the state to ERROR.
Specified by:
addError in interface com.thortech.xl.dataobj.tcErrorReceiver
Parameters:
poError - The error to add.

addReject

public void addReject(com.thortech.xl.orb.dataaccess.tcError poReject)
Adds the rejection to this object's rejection list.
Specified by:
addReject in interface com.thortech.xl.dataobj.tcErrorReceiver
Parameters:
poReject - The rejection to add.

addErrorReceiver

public void addErrorReceiver(com.thortech.xl.dataobj.tcErrorReceiver poErrorReceiver)
Adds another error receiver to the object's error list. Any time an error is added to this object's error list, the error message will also be added to the error receiver specified.
Specified by:
addErrorReceiver in interface com.thortech.xl.dataobj.tcErrorReceiver
Parameters:
poErrorReceiver - The error receiver to add.

removeErrorReceiver

public void removeErrorReceiver(com.thortech.xl.dataobj.tcErrorReceiver poErrorReceiver)
Removes the error receiver from the object's error list. Any new errors added to this object will be not be passed along to the specified error receiver.
Specified by:
removeErrorReceiver in interface com.thortech.xl.dataobj.tcErrorReceiver
Parameters:
poErrorReceiver - The error receiver to remove.

getErrors

public com.thortech.xl.orb.dataaccess.tcError[] getErrors()
Returns errors that occurred over the course of usage of the class.
Specified by:
getErrors in interface com.thortech.xl.orb.api.operations._tcUtilityIntfOperations
Returns:
An array of errors.

getRejections

public com.thortech.xl.orb.dataaccess.tcError[] getRejections()
Returns rejections that occurred over the course of usage of the class.
Specified by:
getRejections in interface com.thortech.xl.orb.api.operations._tcUtilityIntfOperations
Returns:
An array of rejections.

clearErrors

public void clearErrors()
Clears all errors and exceptions that are stored in the utility class.
Specified by:
clearErrors in interface com.thortech.xl.orb.api.operations._tcUtilityIntfOperations

getMap

public static java.util.Map getMap(com.thortech.xl.orb.api.tcMapping[] paoMapping)
Creates a Map object from the provided array of tcMapping objects. Useful for the utility classes in executing queries where they need to provide qualifiers.
Parameters:
paoMapping - An array of tcMapping objects, each of which represents a name-value pair.
Returns:
A Map object containing all the name-value pairs.

getMapping

public static com.thortech.xl.orb.api.tcMapping[] getMapping(java.util.Map poMap)
Creates a tcMapping array from the provided Map. Useful for the utility classes in executing queries where they need to provide qualifiers.
Parameters:
poMap - An array of tcMapping objects, each of which represents a name-value pair.
Returns:
A Map object containing all the name-value pairs.

getQueryFilter

public java.lang.String getQueryFilter(java.util.Map moAttributeMap,
                                       java.util.Vector prepStmtParams)
                                throws tcAPIException
Throws:
tcAPIException

getDefaultLocaleCode

public static java.lang.String getDefaultLocaleCode()
                                             throws java.lang.Exception
This method will return default locale stored in DB as <user.language>_<user.region>
Returns:
Throws:
java.lang.Exception

checkStatusAndCallbackProvisioningHandler

public void checkStatusAndCallbackProvisioningHandler(long orcKey)
                                               throws tcAPIException
This method checks for the Object Status corresponding to a Process Instance and calls back the Orchestation Engine in case the Object Status is Provisioned/Enabled/Disabled/Revoked based on the Request Model
Parameters:
orcKey - Process Instance Key
Throws:
tcAPIException

Skip navigation links


Copyright © 2010, Oracle and/or its affiliates. All rights reserved.