public class RuntimeContext extends PentahoMessenger implements IRuntimeContext
Modifier and Type | Field and Description |
---|---|
protected IActionSequence |
actionSequence |
protected static Map |
componentClassMap |
static boolean |
debug |
protected IOutputHandler |
outputHandler |
protected static String |
PARAMETER_FORM |
protected Map |
parameterProviders |
protected String |
parameterTarget |
protected String |
parameterTemplate |
protected String |
parameterXsl |
protected IParameterManager |
paramManager |
protected ISolutionEngine |
solutionEngine |
protected IPentahoUrlFactory |
urlFactory |
protected StringBuffer |
xformBody |
protected Map<String,String> |
xformFields |
protected StringBuffer |
xformHeader |
EMPTYLOGID, loggingLevel, LOGID_MASK1, LOGID_MASK2, LOGID_SEPARATOR
FEEDBACK_OUTPUT, PARAMETERS_FAIL, PARAMETERS_OK, PARAMETERS_UI_NEEDED, PROMPT_NO, PROMPT_NOW, PROMPT_WAITING, RUNTIME_CONTEXT_RESOLVE_FAIL, RUNTIME_CONTEXT_RESOLVE_OK, RUNTIME_CONTEXT_VALIDATE_FAIL, RUNTIME_CONTEXT_VALIDATE_OK, RUNTIME_STATUS_FAILURE, RUNTIME_STATUS_INITIALIZE_FAIL, RUNTIME_STATUS_INITIALIZE_OK, RUNTIME_STATUS_NOT_STARTED, RUNTIME_STATUS_RUNNING, RUNTIME_STATUS_SETUP_FAIL, RUNTIME_STATUS_SUCCESS
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN
Constructor and Description |
---|
RuntimeContext(String instanceId,
ISolutionEngine solutionEngine,
String solutionName,
IRuntimeElement runtimeData,
IPentahoSession session,
IOutputHandler outputHandler,
String processId,
IPentahoUrlFactory urlFactory,
Map parameterProviders,
List messages,
ICreateFeedbackParameterCallback createFeedbackParameterCallback) |
debug, debug, error, error, error, fatal, fatal, getMessages, getUserString, info, info, setMessages, trace, trace, warn, warn
genLogIdFromInfo, genLogIdFromInfo, genLogIdFromSession, getLoggingLevel, getObjectName, setLoggingLevel, setLogId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMessages
getObjectName
protected static final String PARAMETER_FORM
protected ISolutionEngine solutionEngine
protected StringBuffer xformHeader
protected StringBuffer xformBody
protected String parameterXsl
protected String parameterTemplate
protected String parameterTarget
protected IPentahoUrlFactory urlFactory
protected Map parameterProviders
protected static Map componentClassMap
protected IActionSequence actionSequence
public static final boolean debug
protected IOutputHandler outputHandler
protected IParameterManager paramManager
public RuntimeContext(String instanceId, ISolutionEngine solutionEngine, String solutionName, IRuntimeElement runtimeData, IPentahoSession session, IOutputHandler outputHandler, String processId, IPentahoUrlFactory urlFactory, Map parameterProviders, List messages, ICreateFeedbackParameterCallback createFeedbackParameterCallback)
public org.apache.commons.logging.Log getLogger()
getLogger
in class PentahoBase
public String createNewInstance(boolean persisted)
createNewInstance
in interface IRuntimeContext
public String createNewInstance(boolean persisted, Map parameters)
createNewInstance
in interface IRuntimeContext
public String createNewInstance(boolean persisted, Map parameters, boolean forceImmediateWrite)
createNewInstance
in interface IRuntimeContext
public int getStatus()
getStatus
in interface IRuntimeContext
public void promptNow()
promptNow
in interface IRuntimeContext
public void promptNeeded()
promptNeeded
in interface IRuntimeContext
public boolean isPromptPending()
isPromptPending
in interface IRuntimeContext
public IPentahoUrlFactory getUrlFactory()
getUrlFactory
in interface IRuntimeContext
public boolean feedbackAllowed()
feedbackAllowed
in interface IRuntimeContext
public IContentItem getFeedbackContentItem()
getFeedbackContentItem
in interface IRuntimeContext
public IContentItem getOutputItem(String outputName, String mimeType, String extension)
getOutputItem
in interface IRuntimeContext
public IContentItem getOutputContentItem(String mimeType)
getOutputContentItem
in interface IRuntimeContext
public IContentItem getOutputContentItem(String outputName, String mimeType)
getOutputContentItem
in interface IRuntimeContext
public String getHandle()
getHandle
in interface IRuntimeContext
public IPentahoSession getSession()
getSession
in interface IRuntimeContext
public String getSolutionPath()
getSolutionPath
in interface IRuntimeContext
public String getCurrentComponentName()
getCurrentComponentName
in interface IRuntimeContext
public String getInstanceId()
getInstanceId
in interface IRuntimeContext
public int getErrorLevel()
public void setActionSequence(IActionSequence sequence)
setActionSequence
in interface IRuntimeContext
public void validateSequence(String sequenceName, IExecutionListener execListener) throws ActionValidationException
validateSequence
in interface IRuntimeContext
ActionValidationException
public org.pentaho.commons.connection.IPentahoStreamSource getDataSource(String parameterName)
getDataSource
in interface IRuntimeContext
protected static Map getComponentClassMap()
protected void setCurrentComponent(String componentClassName)
protected void setCurrentActionDef(ISolutionActionDefinition actionDefinition)
protected static String getComponentClassName(String rawClassName, IRuntimeContext runtime)
protected IComponent resolveComponent(ISolutionActionDefinition actionDefinition, String currentInstanceId, String currentProcessId, IPentahoSession currentSession) throws ClassNotFoundException, PluginBeanException, InstantiationException, IllegalAccessException
public void executeSequence(IActionCompleteListener doneListener, IExecutionListener execListener, boolean async) throws ActionSequenceException
executeSequence
in interface IRuntimeContext
ActionSequenceException
public void setPromptStatus(int status)
setPromptStatus
in interface IRuntimeContext
public void executeSequence(IActionSequence sequence, IActionCompleteListener doneListener, IExecutionListener execListener, boolean async) throws ActionSequenceException
ActionSequenceException
protected void executeComponent(ISolutionActionDefinition actionDefinition) throws ActionExecutionException
ActionExecutionException
public void dispose()
dispose
in interface IRuntimeContext
public void dispose(List actionParameters)
dispose
in interface IRuntimeContext
public Object getInputParameterValue(String name)
getInputParameterValue
in interface IRuntimeContext
public String getInputParameterStringValue(String name)
getInputParameterStringValue
in interface IRuntimeContext
public IActionParameter getInputParameter(String name)
getInputParameter
in interface IRuntimeContext
public IActionParameter getOutputParameter(String name)
getOutputParameter
in interface IRuntimeContext
public IActionSequenceResource getResourceDefintion(String name)
getResourceDefintion
in interface IRuntimeContext
public Set getInputNames()
getInputNames
in interface IRuntimeContext
public void addTempParameter(String name, IActionParameter param)
addTempParameter
in interface IRuntimeContext
public void setOutputValue(String name, Object output)
setOutputValue
in interface IRuntimeContext
public InputStream getInputStream(String parameterName)
getInputStream
in interface IRuntimeContext
public Set getOutputNames()
getOutputNames
in interface IRuntimeContext
public Set getResourceNames()
getResourceNames
in interface IRuntimeContext
public InputStream getResourceInputStream(IActionSequenceResource actionResource) throws FileNotFoundException
getResourceInputStream
in interface IRuntimeContext
FileNotFoundException
public String getResourceAsString(IActionSequenceResource actionResource) throws IOException
getResourceAsString
in interface IRuntimeContext
IOException
public org.dom4j.Document getResourceAsDocument(IActionSequenceResource actionResource) throws IOException
getResourceAsDocument
in interface IRuntimeContext
IOException
public org.pentaho.commons.connection.IPentahoStreamSource getResourceDataSource(IActionSequenceResource actionResource) throws FileNotFoundException
getResourceDataSource
in interface IRuntimeContext
FileNotFoundException
public String getId()
getId
in interface IAuditable
public String getProcessId()
getProcessId
in interface IAuditable
public String getActionName()
getActionName
in interface IAuditable
public String getActionTitle()
getActionTitle
in interface IRuntimeContext
public void audit(List auditList)
public void audit(String messageType, String message, String value, long duration)
audit
in interface IRuntimeContext
public void addInputParameter(String name, IActionParameter param)
addInputParameter
in interface IRuntimeContext
public String applyInputsToFormat(String format)
applyInputsToFormat
in interface IRuntimeContext
public String applyInputsToFormat(String format, IParameterResolver resolver)
applyInputsToFormat
in interface IRuntimeContext
public void sendFeedbackForm() throws ActionSequencePromptException
sendFeedbackForm
in interface IRuntimeContext
ActionSequencePromptException
@Deprecated public void createFeedbackParameter(IActionParameter actionParam)
createFeedbackParameter
in interface IRuntimeContext
public void createFeedbackParameter(ISelectionMapper selMap, String fieldName, Object defaultValues)
createFeedbackParameter
in interface IRuntimeContext
public void createFeedbackParameter(ISelectionMapper selMap, String fieldName, Object defaultValues, boolean optional)
createFeedbackParameter
in interface IRuntimeContext
public void createFeedbackParameter(String fieldName, String displayName, String hint, Object defaultValues, List values, Map dispNames, String displayStyle)
createFeedbackParameter
in interface IRuntimeContext
public void createFeedbackParameter(String fieldName, String displayName, String hint, Object defaultValues, List values, Map dispNames, String displayStyle, boolean optional)
createFeedbackParameter
in interface IRuntimeContext
public boolean checkForFieldInTemplate(String fieldName)
public void createFeedbackParameter(String fieldName, String displayName, String hint, Object defaultValue, boolean visible)
createFeedbackParameter
in interface IRuntimeContext
public void createFeedbackParameter(String fieldName, String displayName, String hint, Object defaultValue, boolean visible, boolean optional)
createFeedbackParameter
in interface IRuntimeContext
public void setParameterXsl(String xsl)
setParameterXsl
in interface IRuntimeContext
public void setParameterTarget(String target)
setParameterTarget
in interface IRuntimeContext
public String getLogId()
getLogId
in class PentahoBase
public void forceSaveRuntimeData()
forceSaveRuntimeData
in interface IRuntimeContext
public int getOutputPreference()
getOutputPreference
in interface IRuntimeContext
public void setOutputHandler(IOutputHandler outputHandler)
setOutputHandler
in interface IRuntimeContext
public IActionSequence getActionSequence()
getActionSequence
in interface IRuntimeContext
public IParameterManager getParameterManager()
getParameterManager
in interface IRuntimeContext
public Map getParameterProviders()
getParameterProviders
in interface IRuntimeContext
public void setCreateFeedbackParameterCallback(ICreateFeedbackParameterCallback callback)
setCreateFeedbackParameterCallback
in interface IRuntimeContext
public List<IContentItem> getOutputContentItems()
getOutputContentItems
in interface IRuntimeContext
Copyright © 2017 Hitachi Vantara. All rights reserved.