Package com.thortech.xl.util.adapters
Class tcUtilXellerateOperations
java.lang.Object
com.thortech.xl.util.adapters.tcUtilXellerateOperations
This class that will perform Xellerate specific utility functions
particularly for Rule generations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
chckProcOrderedForAct
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psActKey) Method that checks if a particular process has been successfully ordered for a user.static String
chckProcOrderedForUser
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psUsrKey) Method that checks if a particular process has been successfully ordered for a user.static String
checkProcessOrderedForAct
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psActKey) Method that checks if a particular process has been successfully ordered for an organization.static String
checkProcessOrderedForParentAct
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psActKey) Method that checks if a particular process has been successfully ordered for parent of an organization.static String
checkProcessOrderedForUser
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psUsrKey) Method that checks if a particular process has been successfully ordered for a user.static boolean
checkValueUniqueness
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, com.thortech.xl.dataobj.tcDataObj poDataObj, String psColumnName, String psColumnValue) method that validates uniqueness of the value.static boolean
checkValueUniquenessIgnoreCase
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, com.thortech.xl.dataobj.tcDataObj poDataObj, String psColumnName, String psColumnValue) method that validates uniqueness of the value(ignore case)static String
getDataFromOrc
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psOrcKey, String psColumnName) Method that gets the value of a particular field from the process data for a specific orc ordered for the specified organization.static String
getDataFromProcessOrderedForAct
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psActKey, String psColumnName) Method that gets the value of a particular field from the process data for a specific process ordered for the specified organization.static String
getDataFromProcessOrderedForUser
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psUsrKey, String psColumnName) Method that gets the value of a particular field from the process data for a specific process ordered for the specified user.static Map
getDeletedProcessFormChildData
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, long childFormDefinitionKey, long processInstanceKey, long taskInstanceKey) Get the deleted child form entry details.static String
getITAssetKey
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psITAssetType, String psITAssetName) Method that given an Asset Type and Asset Name, returns the Asset Instance Keystatic Hashtable
getITAssetProperties
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psServerName) Method that given an Asset Name, returns the Asset Properties in a Hashtablestatic String
getObjKeyfromOrcKey
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psOrcKey) method that find the obj_key from the orc_keystatic String
getObjOrderForfromObjKey
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psObjKey) method that get obj_order_for column from the obj table by obj_key providedstatic String
getOstKey
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psObjKey, String psOstStatus) method that get ost_key from the ost table by obj_key and ost_status providedstatic boolean
isValueChanged
(com.thortech.xl.dataobj.tcDataObj poDataObj, String psColumName) method that validates that value has been changed in the database.static String
orderProcessForUser
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psUsrKey) Method that orders a process for a user.static void
This method prints out the parameter is is being passed in.static String
setDataForOrcProcess
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psOrcKey, String psColumnName, String psColumnValue) Method that sets the value of a particular field in the process data for a specific process instance (ORC).static String
setDataForProcessOrderedForUser
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psUsrKey, String psColumnName, String psColumnValue) Method that sets the value of a particular field in the process data for a specific process ordered for the specified user.static boolean
setOstKeyforObject
(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psOrcKey, String psObjOrderFor, String psOstKey) method that set obj status in oio/oiu tablestatic void
updateITAssetProperty
(com.thortech.xl.server.tcOrbServerObject poCreator, com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psServerName, String psPropName, String psPropValue) Given an Asset Name, associated property name, and its value, the method will update this property with the value passed
-
Method Details
-
isValueChanged
public static boolean isValueChanged(com.thortech.xl.dataobj.tcDataObj poDataObj, String psColumName) throws Exception method that validates that value has been changed in the database.- Parameters:
poDataObj
- poDataObj for all data objects except tcScheduleItem.psColumName
- psColumName name of the column being compared.- Returns:
- boolean flag that indicates whether value passed is identical to the one in database.
- Throws:
Exception
com.thortech.xl.dataobj.tcUnsupportedDataObjException
-
checkValueUniqueness
public static boolean checkValueUniqueness(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, com.thortech.xl.dataobj.tcDataObj poDataObj, String psColumnName, String psColumnValue) throws Exception method that validates uniqueness of the value.- Parameters:
poDataProvider
- poDataProvider data base connection.poDataObj
- poDataObj for all data objects except tcScheduleItem.psColumnName
- psColumName name of the column being checked.psColumnValue
- psColumnValue value of the column being checked.- Returns:
- boolean flag that indicates whether value passed exists in the table.
- Throws:
Exception
com.thortech.xl.dataobj.tcUnsupportedDataObjException
-
checkValueUniquenessIgnoreCase
public static boolean checkValueUniquenessIgnoreCase(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, com.thortech.xl.dataobj.tcDataObj poDataObj, String psColumnName, String psColumnValue) throws Exception method that validates uniqueness of the value(ignore case)- Parameters:
poDataProvider
- poDataProvider data base connection.poDataObj
- poDataObj for all data objects except tcScheduleItem.psColumnName
- psColumName name of the column being checked.psColumnValue
- psColumnValue value of the column being checked.- Returns:
- boolean flag that indicates whether value passed exists in the table.
- Throws:
Exception
com.thortech.xl.dataobj.tcUnsupportedDataObjException
-
getObjKeyfromOrcKey
public static String getObjKeyfromOrcKey(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psOrcKey) throws Exception method that find the obj_key from the orc_key- Parameters:
poDataProvider
- poDataProvider data base connection.psOrcKey
- psOrcKey orc_key for the process form- Returns:
- the obj_key related to the orc_key
- Throws:
Exception
-
getObjOrderForfromObjKey
public static String getObjOrderForfromObjKey(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psObjKey) throws Exception method that get obj_order_for column from the obj table by obj_key provided- Parameters:
poDataProvider
- poDataProvider data base connection.psObjKey
- psObjKey obj_key to check obj_order_for- Returns:
- the obj_order_for related to the obj_key
- Throws:
Exception
-
getOstKey
public static String getOstKey(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psObjKey, String psOstStatus) throws Exception method that get ost_key from the ost table by obj_key and ost_status provided- Parameters:
poDataProvider
- poDataProvider data base connection.psObjKey
- psObjKeypsOstStatus
- psOstStatus- Returns:
- the ost_key related to the obj_key and ost_status
- Throws:
Exception
-
setOstKeyforObject
public static boolean setOstKeyforObject(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psOrcKey, String psObjOrderFor, String psOstKey) throws Exception method that set obj status in oio/oiu table- Parameters:
poDataProvider
- poDataProvider data base connection.psOrcKey
- psOrcKey orc_keypsObjOrderFor
- psObjOrderFor (U/O)psOstKey
- psOstKey the new ost_key value for the oiu/oio record- Returns:
- the obj_order_for related to the obj_key
- Throws:
Exception
-
printLine
This method prints out the parameter is is being passed in.- Parameters:
psParmToPrint
- psParmToPrint value to print.
-
checkProcessOrderedForUser
public static String checkProcessOrderedForUser(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psUsrKey) throws Exception Method that checks if a particular process has been successfully ordered for a user. Success is defined as the process being ordered, in completed status, and in enabled application status. Looks for non cancelled instances of the process. If more than one exists, gets the first one found.- Parameters:
poDataProvider
- poDataProvider data base connection.psProcessName
- psProcessName name of the process to look for.psUsrKey
- psUsrKey Key of the user to check process for.- Returns:
- String containing the ORC KEY, if successful.
If not successful, returns the following error codes:
-10 is User Key given was blank or null
-20 is process not ordered for user or is cancelled - Throws:
Exception
-
chckProcOrderedForUser
public static String chckProcOrderedForUser(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psUsrKey) throws Exception Method that checks if a particular process has been successfully ordered for a user. Success is defined as the process being ordered, in completed status, and in enabled application status. Looks for non cancelled instances of the process. If more than one exists, gets the first one found.- Parameters:
poDataProvider
- poDataProvider data base connection.psProcessName
- psProcessName name of the process to look for.psUsrKey
- psUsrKey Key of the user to check process for.- Returns:
- String 1, if checkProcessOrderedForUser is positive
otherwise return error code that was defined from checkProcessOrderedForUser method: - Throws:
Exception
-
checkProcessOrderedForAct
public static String checkProcessOrderedForAct(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psActKey) throws Exception Method that checks if a particular process has been successfully ordered for an organization. Success is defined as the process being ordered, in completed status. Looks for non cancelled instances of the process. If more than one exists, gets the first one found.- Parameters:
poDataProvider
- poDataProvider data base connection.psProcessName
- psProcessName name of the process to look for.psActKey
- psActKey Key of the organization to check process for.- Returns:
- String containing the ORC KEY, if successful.
If not successful, returns the following error codes:
-10 is Organization Key given was blank or null
-20 is process not ordered for organization or is cancelled - Throws:
Exception
-
chckProcOrderedForAct
public static String chckProcOrderedForAct(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psActKey) throws Exception Method that checks if a particular process has been successfully ordered for a user. Success is defined as the process being ordered, in completed status, and in enabled application status. Looks for non cancelled instances of the process. If more than one exists, gets the first one found.- Parameters:
poDataProvider
- poDataProvider data base connection.psProcessName
- psProcessName name of the process to look for.psActKey
- psActKey Key of the organization to check process for.- Returns:
- String 1, if checkProcessOrderedForAct is positive
otherwise return error code that was defined from checkProcessOrderedForAct method: - Throws:
Exception
-
checkProcessOrderedForParentAct
public static String checkProcessOrderedForParentAct(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psActKey) throws Exception Method that checks if a particular process has been successfully ordered for parent of an organization. Success is defined as the process being ordered, in completed status. Looks for non cancelled instances of the process. If more than one exists, gets the first one found.- Parameters:
poDataProvider
- poDataProvider data base connection.psProcessName
- psProcessName name of the process to look for.psActKey
- psActKey Key of the organization whose parent to check process for.- Returns:
- String containing the ORC KEY, if successful.
If not successful, returns the following error codes:
-10 is Organization Key given was blank or null
-20 is process not ordered for organization or was cancelled
-50 if Organization does not have a parent - Throws:
Exception
-
getDataFromProcessOrderedForUser
public static String getDataFromProcessOrderedForUser(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psUsrKey, String psColumnName) throws Exception Method that gets the value of a particular field from the process data for a specific process ordered for the specified user. Looks for non cancelled instances of the process. If more than one exists, gets the first one found.- Parameters:
poDataProvider
- poDataProvider data base connection.psProcessName
- psProcessName name of the process to look for.psUsrKey
- psUsrKey The user process data is to be retrieved.psColumnName
- psColumnName The field whose value is to be retrieved.- Returns:
- String containing the ORC KEY, if successful.
If not successful, returns the following error codes:
-10 is User Key given was blank or null
-20 if Process not ordered for user or is cancelled
-30 if Process not atomic process
-40 if Process doesn't define process data
-50 if Process has no process data - Throws:
Exception
-
getDataFromProcessOrderedForAct
public static String getDataFromProcessOrderedForAct(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psActKey, String psColumnName) throws Exception Method that gets the value of a particular field from the process data for a specific process ordered for the specified organization. Looks for non cancelled instances of the process. If more than one exists, gets the first one found.- Parameters:
poDataProvider
- poDataProvider data base connection.psProcessName
- psProcessName name of the process to look for.psActKey
- psActKey The organization process data is to be retrieved.psColumnName
- psColumnName The field whose value is to be retrieved.- Returns:
- String containing the ORC KEY, if successful.
If not successful, returns the following error codes:
-10 is User Key given was blank or null
-20 if Process not ordered for organization or is cancelled
-30 if Process not atomic process
-40 if Process doesn't define process data
-50 if Process has no process data - Throws:
Exception
-
getDataFromOrc
public static String getDataFromOrc(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psOrcKey, String psColumnName) throws Exception Method that gets the value of a particular field from the process data for a specific orc ordered for the specified organization.- Parameters:
poDataProvider
- poDataProvider data base connection.psOrcKey
- psProcessName name of the process to look for.psColumnName
- psActKey The organization process data is to be retrieved.- Returns:
- String containing the ORC KEY, if successful.
If not successful, returns the following error codes:
-10 if Orc Key was blank
-20 if Process doesn't exist or is cancelled
-30 if Process not atomic process
-40 if Process doesn't define process data
-50 if Process has no process data - Throws:
Exception
-
setDataForOrcProcess
public static String setDataForOrcProcess(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psOrcKey, String psColumnName, String psColumnValue) throws Exception Method that sets the value of a particular field in the process data for a specific process instance (ORC). If more than one exists, uses the first one found.- Parameters:
poDataProvider
- poDataProvider data base connection.psOrcKey
- psProcessName name of the process to look for.psColumnName
- psOrcKey The process insatnce whose data is to be set.psColumnValue
- psColumnName The field whose value is to be set.- Returns:
- String containing the result code:
1 if successful
-10 if Orc Key was blank
-20 if Process doesn't exist or is cancelled
-30 if Process not atomic process
-40 if Process doesn't define process data
-50 if Process has no process data - Throws:
Exception
-
setDataForProcessOrderedForUser
public static String setDataForProcessOrderedForUser(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psUsrKey, String psColumnName, String psColumnValue) throws Exception Method that sets the value of a particular field in the process data for a specific process ordered for the specified user. Looks for non cancelled instances of the process. If more than one exists, uses the first one found.- Parameters:
poDataProvider
- poDataProvider data base connection.psProcessName
- psProcessName The name of the process to look for.psUsrKey
- psUsrKey The user whose process data is to be modified.psColumnName
- psColumnName The field whose value is to be set.psColumnValue
- psColumnValue The value to be set.- Returns:
- String containing a result code:
1 if successful
-10 is User Key given was blank or null
-20 if Process not ordered for user or is cancelled
-30 if Process not atomic process
-40 if Process doesn't define process data
-50 if Process has no process data - Throws:
Exception
-
orderProcessForUser
public static String orderProcessForUser(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psProcessName, String psUsrKey) throws Exception Method that orders a process for a user.- Parameters:
poDataProvider
- A data providerpsProcessName
- The name of the process to orderpsUsrKey
- The key of the user to order the process for- Returns:
- The Orc Key of the resultant process instance
- Throws:
Exception
-
getITAssetKey
public static String getITAssetKey(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psITAssetType, String psITAssetName) throws Exception Method that given an Asset Type and Asset Name, returns the Asset Instance Key- Parameters:
poDataProvider
- A data providerpsITAssetType
- The type of the IT AssetpsITAssetName
- The name of the IT Asset- Returns:
- The Asset Key
- Throws:
Exception
-
getITAssetProperties
public static Hashtable getITAssetProperties(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psServerName) throws Exception Method that given an Asset Name, returns the Asset Properties in a Hashtable- Parameters:
poDataProvider
- A data providerpsServerName
- The name of the IT Asset- Returns:
- The Asset Properties Hashtable
- Throws:
Exception
-
updateITAssetProperty
public static void updateITAssetProperty(com.thortech.xl.server.tcOrbServerObject poCreator, com.thortech.xl.dataaccess.tcDataProvider poDataProvider, String psServerName, String psPropName, String psPropValue) throws Exception Given an Asset Name, associated property name, and its value, the method will update this property with the value passed- Parameters:
poCreator
- tcOrbServerObject type objectpoDataProvider
- A data providerpsServerName
- The name of the IT AssetpsPropName
- The name of the IT Asset PropertypsPropValue
- The new value of the IT Asset Property- Throws:
Exception
-
getDeletedProcessFormChildData
public static Map getDeletedProcessFormChildData(com.thortech.xl.dataaccess.tcDataProvider poDataProvider, long childFormDefinitionKey, long processInstanceKey, long taskInstanceKey) throws tcProcessNotFoundException, tcFormNotFoundException, tcAPIException, Exception Get the deleted child form entry details.- Parameters:
poDataProvider
- A data providerpsChildTableName
- Child process form namechildFormDefinitionKey
- Child process form keyprocessInstanceKey
- Process Instance KeytaskInstanceKey
- Task Instance Key- Returns:
- Map deleted child process form column name and value.
- Throws:
Exception
- DOCUMENT ME!tcProcessNotFoundException
tcFormNotFoundException
tcAPIException
-