Oracle Fusion Middleware extensions for Logging and Diagnostics
11g Release 1 (11.1.2)

E22565-02

oracle.apps.fnd.appltest.diagfwk.engine
Class DiagCmd<T>

java.lang.Object
  extended by oracle.apps.fnd.appltest.diagfwk.engine.DiagCmd<T>
All Implemented Interfaces:
DiagConstants, DiagCmdConstants
Direct Known Subclasses:
DiagCmdExtractReport, DiagCmdGetTestExec, DiagCmdGetTestRun, DiagCmdLoadTest, DiagCmdRunTests

public abstract class DiagCmd<T>
extends java.lang.Object
implements DiagCmdConstants

Abstract base class that models a command that can be run by the diagnostics engine.

The abstract base class is genericized for type in order to facilitate concrete commands to return different objects as a result of the execution.


Nested Class Summary
 
Nested classes/interfaces inherited from interface oracle.apps.fnd.appltest.diagfwk.common.DiagConstants
DiagConstants.ExecutionMode, DiagConstants.Format, DiagConstants.LinkType, DiagConstants.Status
 
Field Summary
protected  NameValueList mParams
           
 
Fields inherited from interface oracle.apps.fnd.appltest.diagfwk.engine.DiagCmdConstants
DELIM_VALUE, PARAM_APP, PARAM_CHILD_REPORTS, PARAM_CONNECT_STR, PARAM_DB_PWD, PARAM_DB_UN, PARAM_DESTDIR, PARAM_DIR, PARAM_EXEC_MODE, PARAM_EXECID, PARAM_FORMAT, PARAM_HELP, PARAM_LANG, PARAM_MAKESUBDIR, PARAM_MODID, PARAM_MODKEY, PARAM_NTHREADS, PARAM_PREREQ, PARAM_PRINTTOCONSOLE, PARAM_PRINTTREE, PARAM_PWD, PARAM_QUERY, PARAM_RECURSE, PARAM_REGISTER, PARAM_REPORT, PARAM_RUN_LOCALLY, PARAM_RUN_NAME, PARAM_RUNID, PARAM_RUNTEST, PARAM_STATUS, PARAM_TEST, PARAM_TESTFILE, PARAM_TOKEN_INPUT, PARAM_TOKEN_TAG, PARAM_TRANSLATE, PARAM_USERNAME, PARAM_VALIDATE_ONLY, PARAM_WAITFORCOMPLETION, PARAM_WRITETOFILE, PRE_POPULATED_EXECID
 
Fields inherited from interface oracle.apps.fnd.appltest.diagfwk.common.DiagConstants
APPS_MSG_ID_TAG_NAME, CFG_ADR_PROVIDER_CLASS, CFG_CACHE_PROVIDER_CLASS, CFG_CRED_PROVIDER_CLASS, CFG_DAO_FACTORY_CLASS, CFG_DB_CONN_INFO_PROVIDER_CLASS, CFG_DB_CONN_PROVIDER_CLASS, CFG_NLS_PROVIDER_CLASS, CFG_PLSQL_PROVIDER_CLASS, CFG_PROFILE_PROVIDER_CLASS, CFG_SECURITY_PROVIDER_CLASS, CFG_SESSION_INFO_PROVIDER_CLASS, CFG_URL_PROVIDER_FACTORY_CLASS, CFG_WLS_MBEANSRV_CONNINFO_PROVIDER_CLASS, DATA_SECURITY_PERMISSION_ALLOWED, DATA_SECURITY_PERMISSION_NOT_ALLOWED, DELIM_URL, EXEC_MODE_CLI, EXEC_MODE_ESS, EXEC_MODE_INCIDENT, EXEC_MODE_JAVA, EXEC_MODE_UI, EXECUTABLE_TYPE_JAVA, EXECUTABLE_TYPE_PLSQL, EXECUTABLE_TYPE_TESTREF, FORMAT_HTML, FORMAT_XML, GUID_ORACLE_MINUS1, GUID_ORACLE_ZERO, INPUTS_STATUS_ALL_OPT_INPUTS, INPUTS_STATUS_NO_INPUTS, INPUTS_STATUS_REQ_INPUTS_NO_DEFAULTS, INPUTS_STATUS_REQ_INPUTS_W_DEFAULTS, IO_FLAG_I, IO_FLAG_O, JMX_API_BASE_OBJECT_NAME, LINK_EXTERNAL, LINK_INTERNAL, LINK_METALINK, N, NLS_BUNDLE_JAVA_RES, NLS_BUNDLE_MSG_SVC, NLS_BUNDLE_RES_REF, NLS_BUNDLE_XLIFF, NO, NULL, ODF_MBEAN_DOMAIN_NAME, PARAM_MON_INTERVAL, PLSQL_DEBUG_ENABLED_SYSTEM_PROP, PREREQ_TYPE_TAG_VALUE, PREREQ_TYPE_TEST, SECONDS_IN_ONE_DAY, SECONDS_IN_ONE_HOUR, STATUS_CANCELED, STATUS_EXECERROR, STATUS_FAILURE, STATUS_RUNNING, STATUS_SUCCESS, STATUS_WARNING, SYS_PROP_MAX_MONITOR_INTERNVAL, SYS_PROP_MAX_NUM_THREADS, SYSPROP_APPCONNFILE, SYSPROP_DIAG_CONFIG_FILE, TAG_TYPE_DIAG, TAG_TYPE_TAXONOMY, TEST_TYPE_DECL, TEST_TYPE_JAVA, USER_NAME, WEB_APP_NAME_TAG_NAME, Y, YES
 
Constructor Summary
DiagCmd()
           
 
Method Summary
 void addUpdateParam(java.lang.String name, java.lang.Object value)
           
abstract  T execute()
          Executes the current command with the parameters set by calling "setParams" method.
protected  int getIntParam(java.lang.String name, int defval)
          Gets an integer parameter value for the given parameter.
protected  java.lang.String getParam(java.lang.String name)
          Gets the value for the given parameter name
protected  java.lang.String getParam(java.lang.String name, java.lang.String defval)
          Gets the value for the given parameter.
protected  java.lang.String getParam(java.lang.String name, java.lang.String defval, java.lang.String[] possibleValues)
          Gets the value for the given parameter.
protected  NameValueList getParams()
          Gets the list of parameters that were passed to this command
protected  int getPosIntParam(java.lang.String name, int defval, int maxval)
           
protected  boolean getYNFlagParam(java.lang.String name, java.lang.String defval)
          Gets the boolean value for the given parameter that is a Y/N flag
protected static boolean isParamName(NameValue p, java.lang.String[] pNames)
          Checks if the given parameter name is in the list of given names
protected  void logParams(oracle.apps.fnd.appllcm.sdk.common.LCMLog pLogger)
          Logs the parameters for this command to the given logger.
 void setParams(NameValueList pParams)
          Set parameters on the command prior to execution
protected static java.util.List<java.lang.String> tokenize(java.lang.String pValue)
          Returns the list of tokens from the given value using the value delimitor ","
protected  void validateExactlyOneReqParam(java.lang.String[] pReqParamNames)
          Validates that exactly one of the given required parameters have been specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mParams

protected NameValueList mParams
Constructor Detail

DiagCmd

public DiagCmd()
Method Detail

setParams

public void setParams(NameValueList pParams)
Set parameters on the command prior to execution

Parameters:
pParams -

addUpdateParam

public void addUpdateParam(java.lang.String name,
                           java.lang.Object value)

getParam

protected java.lang.String getParam(java.lang.String name)
Gets the value for the given parameter name

Parameters:
name - name of the parameter
Returns:
value for the parameter

getParam

protected java.lang.String getParam(java.lang.String name,
                                    java.lang.String defval)
Gets the value for the given parameter. If the value of the parameter is null, returns the given default value.


getParam

protected java.lang.String getParam(java.lang.String name,
                                    java.lang.String defval,
                                    java.lang.String[] possibleValues)
Gets the value for the given parameter. If the value of the parameter is not specified, returns the given default value. Additionally, also validates that the value is one of the possible values that are specified


getYNFlagParam

protected boolean getYNFlagParam(java.lang.String name,
                                 java.lang.String defval)
Gets the boolean value for the given parameter that is a Y/N flag

Parameters:
name - name of the parameter
defval - Y/N default value
Returns:
true if Y, false if N

getIntParam

protected int getIntParam(java.lang.String name,
                          int defval)
Gets an integer parameter value for the given parameter.

Parameters:
name - name of the parameter
defval - default value of the parameter to return if value is not specified.
Returns:
integer value of the parameter.

getPosIntParam

protected int getPosIntParam(java.lang.String name,
                             int defval,
                             int maxval)

logParams

protected void logParams(oracle.apps.fnd.appllcm.sdk.common.LCMLog pLogger)
Logs the parameters for this command to the given logger.

Parameters:
pLogger - logger to log to

getParams

protected NameValueList getParams()
Gets the list of parameters that were passed to this command

Returns:
the list of parameters that were passed to this command.

execute

public abstract T execute()
Executes the current command with the parameters set by calling "setParams" method.

Returns:

validateExactlyOneReqParam

protected void validateExactlyOneReqParam(java.lang.String[] pReqParamNames)
Validates that exactly one of the given required parameters have been specified. For instance if both runid, and execid parameter is specified this method will throw a DiagfwkException.

Parameters:
pReqParamNames - - an Array of names of required parameters of which exactly one must be specified.

tokenize

protected static final java.util.List<java.lang.String> tokenize(java.lang.String pValue)
Returns the list of tokens from the given value using the value delimitor ","


isParamName

protected static boolean isParamName(NameValue p,
                                     java.lang.String[] pNames)
Checks if the given parameter name is in the list of given names


Oracle Fusion Middleware extensions for Logging and Diagnostics
11g Release 1 (11.1.2)

E22565-02

Copyright © 2011 Oracle. All Rights Reserved.