public class RuntimeContext extends PentahoMessenger implements org.pentaho.platform.api.engine.IRuntimeContext
Modifier and Type | Field and Description |
---|---|
protected org.pentaho.platform.api.engine.IActionSequence |
actionSequence |
protected static Map |
componentClassMap |
static boolean |
debug |
protected org.pentaho.platform.api.engine.IOutputHandler |
outputHandler |
protected static String |
PARAMETER_FORM |
protected Map |
parameterProviders |
protected String |
parameterTarget |
protected String |
parameterTemplate |
protected String |
parameterXsl |
protected org.pentaho.platform.api.engine.IParameterManager |
paramManager |
protected org.pentaho.platform.api.engine.ISolutionEngine |
solutionEngine |
protected org.pentaho.platform.api.engine.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
Constructor and Description |
---|
RuntimeContext(String instanceId,
org.pentaho.platform.api.engine.ISolutionEngine solutionEngine,
String solutionName,
org.pentaho.platform.api.repository.IRuntimeElement runtimeData,
org.pentaho.platform.api.engine.IPentahoSession session,
org.pentaho.platform.api.engine.IOutputHandler outputHandler,
String processId,
org.pentaho.platform.api.engine.IPentahoUrlFactory urlFactory,
Map parameterProviders,
List messages,
org.pentaho.platform.api.engine.ICreateFeedbackParameterCallback createFeedbackParameterCallback) |
Modifier and Type | Method and Description |
---|---|
void |
addInputParameter(String name,
org.pentaho.platform.api.engine.IActionParameter param) |
void |
addTempParameter(String name,
org.pentaho.platform.api.engine.IActionParameter param) |
String |
applyInputsToFormat(String format) |
String |
applyInputsToFormat(String format,
org.pentaho.platform.api.engine.IParameterResolver resolver) |
void |
audit(List auditList) |
void |
audit(String messageType,
String message,
String value,
long duration) |
boolean |
checkForFieldInTemplate(String fieldName) |
void |
createFeedbackParameter(org.pentaho.platform.api.engine.IActionParameter actionParam)
Deprecated.
Unused
|
void |
createFeedbackParameter(org.pentaho.platform.api.engine.ISelectionMapper selMap,
String fieldName,
Object defaultValues) |
void |
createFeedbackParameter(org.pentaho.platform.api.engine.ISelectionMapper selMap,
String fieldName,
Object defaultValues,
boolean optional) |
void |
createFeedbackParameter(String fieldName,
String displayName,
String hint,
Object defaultValue,
boolean visible) |
void |
createFeedbackParameter(String fieldName,
String displayName,
String hint,
Object defaultValue,
boolean visible,
boolean optional) |
void |
createFeedbackParameter(String fieldName,
String displayName,
String hint,
Object defaultValues,
List values,
Map dispNames,
String displayStyle) |
void |
createFeedbackParameter(String fieldName,
String displayName,
String hint,
Object defaultValues,
List values,
Map dispNames,
String displayStyle,
boolean optional) |
String |
createNewInstance(boolean persisted) |
String |
createNewInstance(boolean persisted,
Map parameters) |
String |
createNewInstance(boolean persisted,
Map parameters,
boolean forceImmediateWrite) |
void |
dispose() |
void |
dispose(List actionParameters) |
protected void |
executeComponent(org.pentaho.platform.api.engine.ISolutionActionDefinition actionDefinition) |
void |
executeSequence(org.pentaho.platform.api.engine.IActionCompleteListener doneListener,
org.pentaho.platform.api.engine.IExecutionListener execListener,
boolean async) |
void |
executeSequence(org.pentaho.platform.api.engine.IActionSequence sequence,
org.pentaho.platform.api.engine.IActionCompleteListener doneListener,
org.pentaho.platform.api.engine.IExecutionListener execListener,
boolean async) |
boolean |
feedbackAllowed() |
void |
forceSaveRuntimeData()
Forces the immediate write of runtime data to underlying persistence mechanism.
|
String |
getActionName() |
org.pentaho.platform.api.engine.IActionSequence |
getActionSequence() |
String |
getActionTitle() |
protected static Map |
getComponentClassMap() |
protected static String |
getComponentClassName(String rawClassName,
org.pentaho.platform.api.engine.IRuntimeContext runtime) |
String |
getCurrentComponentName() |
org.pentaho.commons.connection.IPentahoStreamSource |
getDataSource(String parameterName) |
int |
getErrorLevel() |
org.pentaho.platform.api.repository.IContentItem |
getFeedbackContentItem() |
String |
getHandle() |
String |
getId() |
Set |
getInputNames() |
org.pentaho.platform.api.engine.IActionParameter |
getInputParameter(String name) |
String |
getInputParameterStringValue(String name) |
Object |
getInputParameterValue(String name) |
InputStream |
getInputStream(String parameterName) |
String |
getInstanceId() |
org.apache.commons.logging.Log |
getLogger() |
String |
getLogId() |
org.pentaho.platform.api.repository.IContentItem |
getOutputContentItem(String mimeType) |
org.pentaho.platform.api.repository.IContentItem |
getOutputContentItem(String outputName,
String mimeType) |
List<org.pentaho.platform.api.repository.IContentItem> |
getOutputContentItems() |
org.pentaho.platform.api.repository.IContentItem |
getOutputItem(String outputName,
String mimeType,
String extension) |
Set |
getOutputNames() |
org.pentaho.platform.api.engine.IActionParameter |
getOutputParameter(String name) |
int |
getOutputPreference()
Gets the output type preferred by the handler.
|
org.pentaho.platform.api.engine.IParameterManager |
getParameterManager() |
Map |
getParameterProviders() |
String |
getProcessId() |
org.dom4j.Document |
getResourceAsDocument(org.pentaho.platform.api.engine.IActionSequenceResource actionResource) |
String |
getResourceAsString(org.pentaho.platform.api.engine.IActionSequenceResource actionResource) |
org.pentaho.commons.connection.IPentahoStreamSource |
getResourceDataSource(org.pentaho.platform.api.engine.IActionSequenceResource actionResource) |
org.pentaho.platform.api.engine.IActionSequenceResource |
getResourceDefintion(String name) |
InputStream |
getResourceInputStream(org.pentaho.platform.api.engine.IActionSequenceResource actionResource) |
Set |
getResourceNames() |
org.pentaho.platform.api.engine.IPentahoSession |
getSession() |
String |
getSolutionPath() |
int |
getStatus() |
String |
getStringParameter(String name,
String defaultValue) |
org.pentaho.platform.api.engine.IPentahoUrlFactory |
getUrlFactory() |
boolean |
isPromptPending()
Tells if a component is waiting for a prompt
|
void |
promptNeeded()
Sets the prompt flag but continue processing Actions
|
void |
promptNow() |
protected org.pentaho.platform.api.engine.IComponent |
resolveComponent(org.pentaho.platform.api.engine.ISolutionActionDefinition actionDefinition,
String currentInstanceId,
String currentProcessId,
org.pentaho.platform.api.engine.IPentahoSession currentSession) |
void |
sendFeedbackForm() |
void |
setActionSequence(org.pentaho.platform.api.engine.IActionSequence sequence) |
void |
setCreateFeedbackParameterCallback(org.pentaho.platform.api.engine.ICreateFeedbackParameterCallback callback) |
protected void |
setCurrentActionDef(org.pentaho.platform.api.engine.ISolutionActionDefinition actionDefinition) |
protected void |
setCurrentComponent(String componentClassName) |
void |
setOutputHandler(org.pentaho.platform.api.engine.IOutputHandler outputHandler) |
void |
setOutputValue(String name,
Object output) |
void |
setParameterTarget(String target) |
void |
setParameterXsl(String xsl) |
void |
setPromptStatus(int status) |
void |
validateSequence(String sequenceName,
org.pentaho.platform.api.engine.IExecutionListener execListener) |
debug, debug, error, error, error, fatal, fatal, getMessages, getUserString, info, info, setMessages, trace, trace, warn, warn
genLogIdFromInfo, genLogIdFromInfo, genLogIdFromSession, getLoggingLevel, getObjectName, setLoggingLevel, setLogId
protected static final String PARAMETER_FORM
protected org.pentaho.platform.api.engine.ISolutionEngine solutionEngine
protected StringBuffer xformHeader
protected StringBuffer xformBody
protected String parameterXsl
protected String parameterTemplate
protected String parameterTarget
protected org.pentaho.platform.api.engine.IPentahoUrlFactory urlFactory
protected Map parameterProviders
protected static Map componentClassMap
protected org.pentaho.platform.api.engine.IActionSequence actionSequence
public static final boolean debug
protected org.pentaho.platform.api.engine.IOutputHandler outputHandler
protected org.pentaho.platform.api.engine.IParameterManager paramManager
public RuntimeContext(String instanceId, org.pentaho.platform.api.engine.ISolutionEngine solutionEngine, String solutionName, org.pentaho.platform.api.repository.IRuntimeElement runtimeData, org.pentaho.platform.api.engine.IPentahoSession session, org.pentaho.platform.api.engine.IOutputHandler outputHandler, String processId, org.pentaho.platform.api.engine.IPentahoUrlFactory urlFactory, Map parameterProviders, List messages, org.pentaho.platform.api.engine.ICreateFeedbackParameterCallback createFeedbackParameterCallback)
public org.apache.commons.logging.Log getLogger()
getLogger
in class PentahoBase
public String createNewInstance(boolean persisted)
createNewInstance
in interface org.pentaho.platform.api.engine.IRuntimeContext
public String createNewInstance(boolean persisted, Map parameters)
createNewInstance
in interface org.pentaho.platform.api.engine.IRuntimeContext
public String createNewInstance(boolean persisted, Map parameters, boolean forceImmediateWrite)
createNewInstance
in interface org.pentaho.platform.api.engine.IRuntimeContext
public int getStatus()
getStatus
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void promptNow()
promptNow
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void promptNeeded()
promptNeeded
in interface org.pentaho.platform.api.engine.IRuntimeContext
public boolean isPromptPending()
isPromptPending
in interface org.pentaho.platform.api.engine.IRuntimeContext
public org.pentaho.platform.api.engine.IPentahoUrlFactory getUrlFactory()
getUrlFactory
in interface org.pentaho.platform.api.engine.IRuntimeContext
public boolean feedbackAllowed()
feedbackAllowed
in interface org.pentaho.platform.api.engine.IRuntimeContext
public org.pentaho.platform.api.repository.IContentItem getFeedbackContentItem()
getFeedbackContentItem
in interface org.pentaho.platform.api.engine.IRuntimeContext
public org.pentaho.platform.api.repository.IContentItem getOutputItem(String outputName, String mimeType, String extension)
getOutputItem
in interface org.pentaho.platform.api.engine.IRuntimeContext
public org.pentaho.platform.api.repository.IContentItem getOutputContentItem(String mimeType)
getOutputContentItem
in interface org.pentaho.platform.api.engine.IRuntimeContext
public org.pentaho.platform.api.repository.IContentItem getOutputContentItem(String outputName, String mimeType)
getOutputContentItem
in interface org.pentaho.platform.api.engine.IRuntimeContext
public String getHandle()
getHandle
in interface org.pentaho.platform.api.engine.IRuntimeContext
public org.pentaho.platform.api.engine.IPentahoSession getSession()
getSession
in interface org.pentaho.platform.api.engine.IRuntimeContext
public String getSolutionPath()
getSolutionPath
in interface org.pentaho.platform.api.engine.IRuntimeContext
public String getCurrentComponentName()
getCurrentComponentName
in interface org.pentaho.platform.api.engine.IRuntimeContext
public String getInstanceId()
getInstanceId
in interface org.pentaho.platform.api.engine.IRuntimeContext
public int getErrorLevel()
public void setActionSequence(org.pentaho.platform.api.engine.IActionSequence sequence)
setActionSequence
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void validateSequence(String sequenceName, org.pentaho.platform.api.engine.IExecutionListener execListener) throws org.pentaho.platform.api.engine.ActionValidationException
validateSequence
in interface org.pentaho.platform.api.engine.IRuntimeContext
org.pentaho.platform.api.engine.ActionValidationException
public org.pentaho.commons.connection.IPentahoStreamSource getDataSource(String parameterName)
getDataSource
in interface org.pentaho.platform.api.engine.IRuntimeContext
protected static Map getComponentClassMap()
protected void setCurrentComponent(String componentClassName)
protected void setCurrentActionDef(org.pentaho.platform.api.engine.ISolutionActionDefinition actionDefinition)
protected static String getComponentClassName(String rawClassName, org.pentaho.platform.api.engine.IRuntimeContext runtime)
protected org.pentaho.platform.api.engine.IComponent resolveComponent(org.pentaho.platform.api.engine.ISolutionActionDefinition actionDefinition, String currentInstanceId, String currentProcessId, org.pentaho.platform.api.engine.IPentahoSession currentSession) throws ClassNotFoundException, org.pentaho.platform.api.engine.PluginBeanException, InstantiationException, IllegalAccessException
ClassNotFoundException
org.pentaho.platform.api.engine.PluginBeanException
InstantiationException
IllegalAccessException
public void executeSequence(org.pentaho.platform.api.engine.IActionCompleteListener doneListener, org.pentaho.platform.api.engine.IExecutionListener execListener, boolean async) throws org.pentaho.platform.api.engine.ActionSequenceException
executeSequence
in interface org.pentaho.platform.api.engine.IRuntimeContext
org.pentaho.platform.api.engine.ActionSequenceException
public void setPromptStatus(int status)
setPromptStatus
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void executeSequence(org.pentaho.platform.api.engine.IActionSequence sequence, org.pentaho.platform.api.engine.IActionCompleteListener doneListener, org.pentaho.platform.api.engine.IExecutionListener execListener, boolean async) throws org.pentaho.platform.api.engine.ActionSequenceException
org.pentaho.platform.api.engine.ActionSequenceException
protected void executeComponent(org.pentaho.platform.api.engine.ISolutionActionDefinition actionDefinition) throws org.pentaho.platform.api.engine.ActionExecutionException
org.pentaho.platform.api.engine.ActionExecutionException
public void dispose()
dispose
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void dispose(List actionParameters)
dispose
in interface org.pentaho.platform.api.engine.IRuntimeContext
public Object getInputParameterValue(String name)
getInputParameterValue
in interface org.pentaho.platform.api.engine.IRuntimeContext
public String getInputParameterStringValue(String name)
getInputParameterStringValue
in interface org.pentaho.platform.api.engine.IRuntimeContext
public org.pentaho.platform.api.engine.IActionParameter getInputParameter(String name)
getInputParameter
in interface org.pentaho.platform.api.engine.IRuntimeContext
public org.pentaho.platform.api.engine.IActionParameter getOutputParameter(String name)
getOutputParameter
in interface org.pentaho.platform.api.engine.IRuntimeContext
public org.pentaho.platform.api.engine.IActionSequenceResource getResourceDefintion(String name)
getResourceDefintion
in interface org.pentaho.platform.api.engine.IRuntimeContext
public Set getInputNames()
getInputNames
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void addTempParameter(String name, org.pentaho.platform.api.engine.IActionParameter param)
addTempParameter
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void setOutputValue(String name, Object output)
setOutputValue
in interface org.pentaho.platform.api.engine.IRuntimeContext
public InputStream getInputStream(String parameterName)
getInputStream
in interface org.pentaho.platform.api.engine.IRuntimeContext
public Set getOutputNames()
getOutputNames
in interface org.pentaho.platform.api.engine.IRuntimeContext
public Set getResourceNames()
getResourceNames
in interface org.pentaho.platform.api.engine.IRuntimeContext
public InputStream getResourceInputStream(org.pentaho.platform.api.engine.IActionSequenceResource actionResource) throws FileNotFoundException
getResourceInputStream
in interface org.pentaho.platform.api.engine.IRuntimeContext
FileNotFoundException
public String getResourceAsString(org.pentaho.platform.api.engine.IActionSequenceResource actionResource) throws IOException
getResourceAsString
in interface org.pentaho.platform.api.engine.IRuntimeContext
IOException
public org.dom4j.Document getResourceAsDocument(org.pentaho.platform.api.engine.IActionSequenceResource actionResource) throws IOException
getResourceAsDocument
in interface org.pentaho.platform.api.engine.IRuntimeContext
IOException
public org.pentaho.commons.connection.IPentahoStreamSource getResourceDataSource(org.pentaho.platform.api.engine.IActionSequenceResource actionResource) throws FileNotFoundException
getResourceDataSource
in interface org.pentaho.platform.api.engine.IRuntimeContext
FileNotFoundException
public String getId()
getId
in interface org.pentaho.platform.api.engine.IAuditable
public String getProcessId()
getProcessId
in interface org.pentaho.platform.api.engine.IAuditable
public String getActionName()
getActionName
in interface org.pentaho.platform.api.engine.IAuditable
public String getActionTitle()
getActionTitle
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void audit(List auditList)
public void audit(String messageType, String message, String value, long duration)
audit
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void addInputParameter(String name, org.pentaho.platform.api.engine.IActionParameter param)
addInputParameter
in interface org.pentaho.platform.api.engine.IRuntimeContext
public String applyInputsToFormat(String format)
applyInputsToFormat
in interface org.pentaho.platform.api.engine.IRuntimeContext
public String applyInputsToFormat(String format, org.pentaho.platform.api.engine.IParameterResolver resolver)
applyInputsToFormat
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void sendFeedbackForm() throws org.pentaho.platform.api.engine.ActionSequencePromptException
sendFeedbackForm
in interface org.pentaho.platform.api.engine.IRuntimeContext
org.pentaho.platform.api.engine.ActionSequencePromptException
@Deprecated public void createFeedbackParameter(org.pentaho.platform.api.engine.IActionParameter actionParam)
createFeedbackParameter
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void createFeedbackParameter(org.pentaho.platform.api.engine.ISelectionMapper selMap, String fieldName, Object defaultValues)
createFeedbackParameter
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void createFeedbackParameter(org.pentaho.platform.api.engine.ISelectionMapper selMap, String fieldName, Object defaultValues, boolean optional)
createFeedbackParameter
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void createFeedbackParameter(String fieldName, String displayName, String hint, Object defaultValues, List values, Map dispNames, String displayStyle)
createFeedbackParameter
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void createFeedbackParameter(String fieldName, String displayName, String hint, Object defaultValues, List values, Map dispNames, String displayStyle, boolean optional)
createFeedbackParameter
in interface org.pentaho.platform.api.engine.IRuntimeContext
public boolean checkForFieldInTemplate(String fieldName)
public void createFeedbackParameter(String fieldName, String displayName, String hint, Object defaultValue, boolean visible)
createFeedbackParameter
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void createFeedbackParameter(String fieldName, String displayName, String hint, Object defaultValue, boolean visible, boolean optional)
createFeedbackParameter
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void setParameterXsl(String xsl)
setParameterXsl
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void setParameterTarget(String target)
setParameterTarget
in interface org.pentaho.platform.api.engine.IRuntimeContext
public String getLogId()
getLogId
in class PentahoBase
public void forceSaveRuntimeData()
forceSaveRuntimeData
in interface org.pentaho.platform.api.engine.IRuntimeContext
public int getOutputPreference()
getOutputPreference
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void setOutputHandler(org.pentaho.platform.api.engine.IOutputHandler outputHandler)
setOutputHandler
in interface org.pentaho.platform.api.engine.IRuntimeContext
public org.pentaho.platform.api.engine.IActionSequence getActionSequence()
getActionSequence
in interface org.pentaho.platform.api.engine.IRuntimeContext
public org.pentaho.platform.api.engine.IParameterManager getParameterManager()
getParameterManager
in interface org.pentaho.platform.api.engine.IRuntimeContext
public Map getParameterProviders()
getParameterProviders
in interface org.pentaho.platform.api.engine.IRuntimeContext
public void setCreateFeedbackParameterCallback(org.pentaho.platform.api.engine.ICreateFeedbackParameterCallback callback)
setCreateFeedbackParameterCallback
in interface org.pentaho.platform.api.engine.IRuntimeContext
public List<org.pentaho.platform.api.repository.IContentItem> getOutputContentItems()
getOutputContentItems
in interface org.pentaho.platform.api.engine.IRuntimeContext
Copyright © 2019 Hitachi Vantara. All rights reserved.