org.pentaho.platform.api.engine
Interface IRuntimeContext

All Superinterfaces:
IAuditable, ILogger
All Known Implementing Classes:
RuntimeContext, RuntimeContext_new, RuntimeContextBase

public interface IRuntimeContext
extends IAuditable, ILogger

This interface defines methods and constants that are used during action execution to resolve parameters, inputs and outputs, resources, and persist the runtime data. Think of the runtime context as working storage for the execution of an action.

Author:
James Dixon

Field Summary
static String FEEDBACK_OUTPUT
          Unused
static int PARAMETERS_FAIL
          Currently only used as an indicator that BIRT report specification parameters could not be read.
static int PARAMETERS_OK
          Currently only used as an indicator that BIRT report specification parameters could be read properly.
static int PARAMETERS_UI_NEEDED
          Indicates that parameters are required by an action, and the parameters aren't available so they need to be prompted for.
static int PROMPT_NO
          Indicates that no parameter prompts are pending.
static int PROMPT_NOW
          Indicates that we need to prompt immediately for parameters.
static int PROMPT_WAITING
          Indicates that parameter prompts are pending.
static int RUNTIME_CONTEXT_RESOLVE_FAIL
          Indicates that parameters for an action could not be resolved.
static int RUNTIME_CONTEXT_RESOLVE_OK
          Indicates that the parameters for an action were able to be resolved.
static int RUNTIME_CONTEXT_VALIDATE_FAIL
          Indicator of action validation failure
static int RUNTIME_CONTEXT_VALIDATE_OK
          Indicator of action validation success
static int RUNTIME_STATUS_FAILURE
          Indicator of action failure.
static int RUNTIME_STATUS_INITIALIZE_FAIL
          Indicator of initialization failure
static int RUNTIME_STATUS_INITIALIZE_OK
          Indicator that initialization happened successfully
static int RUNTIME_STATUS_NOT_STARTED
          When beginning execution of an action sequence, the status starts off as not started.
static int RUNTIME_STATUS_RUNNING
          As an action sequence begins execution, the status is set to running.
static int RUNTIME_STATUS_SETUP_FAIL
          Indicates an invalid instance ID was passed into the execution of an action sequence
static int RUNTIME_STATUS_SUCCESS
          Indicates that the action executed successfully
 
Fields inherited from interface org.pentaho.platform.api.engine.ILogger
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN
 
Method Summary
 void addInputParameter(String name, IActionParameter param)
          Adds an input parameter to the list of all inputs for the action sequence
 void addTempParameter(String name, IActionParameter output)
          Adds a parameter to the current inputs.
 String applyInputsToFormat(String format)
          Does parameter substitution on the input string, searching for all parameter declarations in the input string, and substituting the value from the matching input parameter.
 String applyInputsToFormat(String format, IParameterResolver resolver)
          Does parameter substitution on the input string, searching for all parameter declarations in the input string, and substituting the value from the matching input parameter.
 void audit(String messageType, String message, String value, long duration)
          Writes a message to the audit log.
 void createFeedbackParameter(IActionParameter actionParam)
          Deprecated. Adds a feedback parameter for prompts based on an Action Parameter. Uses the Selections defined in the Action Parameter for the options and sets the default to the current value
 void createFeedbackParameter(ISelectionMapper selMap, String fieldName, Object defaultValues)
          Adds a feedback parameter (essentially a form input field) for a required input.
 void createFeedbackParameter(ISelectionMapper selMap, String fieldName, Object defaultValues, boolean optional)
          Adds a feedback parameter (essentially a form input field) for a required input.
 void createFeedbackParameter(String fieldName, String displayName, String hint, Object defaultValue, boolean visible)
          Adds a scalar feedback parameter
 void createFeedbackParameter(String fieldName, String displayName, String hint, Object defaultValue, boolean visible, boolean optional)
          Adds a scalar feedback parameter
 void createFeedbackParameter(String fieldName, String displayName, String hint, Object defaultValues, List values, Map dispNames, String displayStyle)
          Creates a feedback parameter that uses a list for the values
 void createFeedbackParameter(String fieldName, String displayName, String hint, Object defaultValues, List values, Map dispNames, String displayStyle, boolean optional)
          Creates a feedback parameter that uses a list for the values
 String createNewInstance(boolean persisted)
          Creates a new runtime context that is a child of this instance
 String createNewInstance(boolean persisted, Map parameters)
          Creates a new runtime context that is a child of this instance and sets attributes of the runtime data from the parameter Map
 String createNewInstance(boolean persisted, Map parameters, boolean forceImmediateWrite)
          Creates a new runtime context that is a child of this instance and sets attributes of the runtime data from the parameter Map, and can optionally cause the new instance to be forcibly written to the underlying persistence mechanism.
 void dispose()
           
 void dispose(List exceptParameters)
           
 int executeSequence(IActionCompleteListener listener, IExecutionListener execListener, boolean async)
          Executes the action sequence.
 boolean feedbackAllowed()
           
 void forceSaveRuntimeData()
          Forces the immediate write of runtime data to underlying persistence mechanism.
 IActionSequence getActionSequence()
           
 String getActionTitle()
          During execution of an action sequence, returns the IActionSequence#getTitle().
 String getContentUrl(IContentItem contentItem)
          Returns a url to the passed in content item that can be used to retrieve the content.
 String getCurrentComponentName()
           
 IPentahoStreamSource getDataSource(String parameterName)
          Get's the content item associated with the parameter, and returns the content item's datasource
 IContentItem getFeedbackContentItem()
          Interfaces to the current output handler to get the content item that is handling feedback (i.e.
 String getHandle()
          Returns the unique context identifier.
 Set getInputNames()
           
 IActionParameter getInputParameter(String name)
          Returns the named input parameter.
 String getInputParameterStringValue(String name)
          Gets the value of the specified input parameter as a String.
 Object getInputParameterValue(String name)
          Gets the value of the specified input parameter.
 InputStream getInputStream(String parameterName)
          Returns an input stream from an input parameter, if the input parameter is a content item.
 String getInstanceId()
          Returns the unique execution instance.
 List getMessages()
           
 IContentItem getOutputContentItem(String mimeType)
          Interfaces to the current output handler to get the content item that describes the output from this request's component execution.
 IContentItem getOutputContentItem(String outputName, String mimeType)
          Interfaces to the current output handler to get the named content item from this request's component execution.
 IContentItem getOutputItem(String outputName, String mimeType, String extension)
          Returns an output stream for writing.
 Set getOutputNames()
           
 IActionParameter getOutputParameter(String name)
          Returns the named output parameter.
 int getOutputPreference()
          Gets the output type prefered by the handler.
 IParameterManager getParameterManager()
           
 Map getParameterProviders()
           
 Document getResourceAsDocument(IActionSequenceResource actionParameter)
          Gets the named resource as a Document.
 String getResourceAsString(IActionSequenceResource actionParameter)
          Gets the named resource as a String.
 IPentahoStreamSource getResourceDataSource(IActionSequenceResource actionResource)
          Gets the named resource as a DataSource.
 IActionSequenceResource getResourceDefintion(String name)
          Gets the named resource definition from the executing action sequence.
 InputStream getResourceInputStream(IActionSequenceResource actionResource)
          Gets the named resource as an InputStream.
 Set getResourceNames()
           
 Reader getResourceReader(IActionSequenceResource actionParameter)
          Gets the named resource as a Reader.
 IPentahoSession getSession()
           
 String getSolutionName()
           
 String getSolutionPath()
           
 int getStatus()
           
 IPentahoUrlFactory getUrlFactory()
          The Url Factory is used for building URL's that link to this or another application
 boolean isPromptPending()
          Tells if a component is waiting for a prompt
 void promptNeeded()
          Sets the prompt flag but continue processing Actions
 void promptNow()
          Forces the runtime to stop processing Actions and return to prompt
 void sendFeedbackForm()
          Generates a parameter acquisition form for required parameters.
 void setActionSequence(IActionSequence actionSequence)
          Sets the current action sequence
 void setCreateFeedbackParameterCallback(ICreateFeedbackParameterCallback callback)
           
 void setOutputHandler(IOutputHandler outputHandler)
          Sets the output handler for the runtime context
 void setOutputValue(String name, Object output)
          Sets the value of a named output parameter
 void setParameterTarget(String target)
          Sets the target window that the content will be displayed in.
 void setParameterXsl(String xsl)
          Sets the xsl file to be used to generate the parameter page for the current component.
 void setPromptStatus(int status)
          Sets the default prompt status PROMPT_NO, PROMPT_WAITING, PROMPT_NOW
 int validateSequence(String sequenceName, IExecutionListener execListener)
          Validates the action sequence for consistency
 
Methods inherited from interface org.pentaho.platform.api.engine.IAuditable
getActionName, getId, getObjectName, getProcessId
 
Methods inherited from interface org.pentaho.platform.api.engine.ILogger
debug, debug, error, error, fatal, fatal, getLoggingLevel, info, info, setLoggingLevel, trace, trace, warn, warn
 

Field Detail

FEEDBACK_OUTPUT

static final String FEEDBACK_OUTPUT
Unused

See Also:
Constant Field Values

RUNTIME_CONTEXT_VALIDATE_FAIL

static final int RUNTIME_CONTEXT_VALIDATE_FAIL
Indicator of action validation failure

See Also:
Constant Field Values

RUNTIME_CONTEXT_VALIDATE_OK

static final int RUNTIME_CONTEXT_VALIDATE_OK
Indicator of action validation success

See Also:
Constant Field Values

RUNTIME_CONTEXT_RESOLVE_OK

static final int RUNTIME_CONTEXT_RESOLVE_OK
Indicates that the parameters for an action were able to be resolved.

See Also:
Constant Field Values

RUNTIME_CONTEXT_RESOLVE_FAIL

static final int RUNTIME_CONTEXT_RESOLVE_FAIL
Indicates that parameters for an action could not be resolved.

See Also:
Constant Field Values

RUNTIME_STATUS_NOT_STARTED

static final int RUNTIME_STATUS_NOT_STARTED
When beginning execution of an action sequence, the status starts off as not started.

See Also:
Constant Field Values

RUNTIME_STATUS_INITIALIZE_OK

static final int RUNTIME_STATUS_INITIALIZE_OK
Indicator that initialization happened successfully

See Also:
Constant Field Values

RUNTIME_STATUS_INITIALIZE_FAIL

static final int RUNTIME_STATUS_INITIALIZE_FAIL
Indicator of initialization failure

See Also:
Constant Field Values

RUNTIME_STATUS_RUNNING

static final int RUNTIME_STATUS_RUNNING
As an action sequence begins execution, the status is set to running.

See Also:
Constant Field Values

RUNTIME_STATUS_SUCCESS

static final int RUNTIME_STATUS_SUCCESS
Indicates that the action executed successfully

See Also:
Constant Field Values

RUNTIME_STATUS_FAILURE

static final int RUNTIME_STATUS_FAILURE
Indicator of action failure.

See Also:
Constant Field Values

RUNTIME_STATUS_SETUP_FAIL

static final int RUNTIME_STATUS_SETUP_FAIL
Indicates an invalid instance ID was passed into the execution of an action sequence

See Also:
Constant Field Values

PARAMETERS_FAIL

static final int PARAMETERS_FAIL
Currently only used as an indicator that BIRT report specification parameters could not be read.

See Also:
Constant Field Values

PARAMETERS_OK

static final int PARAMETERS_OK
Currently only used as an indicator that BIRT report specification parameters could be read properly.

See Also:
Constant Field Values

PARAMETERS_UI_NEEDED

static final int PARAMETERS_UI_NEEDED
Indicates that parameters are required by an action, and the parameters aren't available so they need to be prompted for.

See Also:
Constant Field Values

PROMPT_NO

static final int PROMPT_NO
Indicates that no parameter prompts are pending.

See Also:
Constant Field Values

PROMPT_WAITING

static final int PROMPT_WAITING
Indicates that parameter prompts are pending.

See Also:
Constant Field Values

PROMPT_NOW

static final int PROMPT_NOW
Indicates that we need to prompt immediately for parameters.

See Also:
Constant Field Values
Method Detail

getHandle

String getHandle()
Returns the unique context identifier. The handle is created during construction of the RuntimeContext object, and should be unique down to the date/time of construction. The default form of this as implemented in RuntimeContext includes context- plus the hashcode and the date/time.

Returns:
the unique handle.
See Also:
RuntimeContext

getActionTitle

String getActionTitle()
During execution of an action sequence, returns the IActionSequence#getTitle().

Returns:
Action sequence title
See Also:
IActionSequence#getSequenceTitle()

promptNow

void promptNow()
Forces the runtime to stop processing Actions and return to prompt


promptNeeded

void promptNeeded()
Sets the prompt flag but continue processing Actions


isPromptPending

boolean isPromptPending()
Tells if a component is waiting for a prompt

Returns:
true if a prompt is pending

getInstanceId

String getInstanceId()
Returns the unique execution instance. This is typically a GUID that can be used to track the entire execution of an action sequence all the way from beginning to end.

Returns:
unique instance Id

setActionSequence

void setActionSequence(IActionSequence actionSequence)
Sets the current action sequence

Parameters:
actionSequence - The action sequence to validate

getActionSequence

IActionSequence getActionSequence()

validateSequence

int validateSequence(String sequenceName,
                     IExecutionListener execListener)
Validates the action sequence for consistency

Parameters:
sequenceName - The name of the sequence to validate
Returns:
integer indicating success or failure
See Also:
RUNTIME_CONTEXT_VALIDATE_FAIL, RUNTIME_CONTEXT_VALIDATE_OK

executeSequence

int executeSequence(IActionCompleteListener listener,
                    IExecutionListener execListener,
                    boolean async)
Executes the action sequence.

Parameters:
listener - The listener to be notified when the sequence finishes
async - Whether the action is synchronous or asynchronous.
Returns:
int indicating success
See Also:
RUNTIME_STATUS_FAILURE, RUNTIME_STATUS_SUCCESS

getUrlFactory

IPentahoUrlFactory getUrlFactory()
The Url Factory is used for building URL's that link to this or another application

Returns:
the URL Factory

getSolutionName

String getSolutionName()
Returns:
The name of the solution holding the currently executing action sequence

getSolutionPath

String getSolutionPath()
Returns:
The path within the solution holding the currently executing action sequence

getCurrentComponentName

String getCurrentComponentName()
Returns:
The component in the action seqeuence that's being executed

getSession

IPentahoSession getSession()
Returns:
The session that started execution of the current action sequence

audit

void audit(String messageType,
           String message,
           String value,
           long duration)
Writes a message to the audit log.

Parameters:
messageType - Message type as defined in MessageTypes
message - Message to appear in the log
value - Value of an object to be logged.
duration - For time-tracked execution paths, indicates the duration the task took
See Also:
IAuditEntry, IAuditable, org.pentaho.core.audit.MessageTypes

getInputParameter

IActionParameter getInputParameter(String name)
Returns the named input parameter. This will search amongst all the input parameter providers (IParameterProvider) in order until it finds the input parameter and returns it. Throws a NullPointerException if the parameter is not found. This method never returns null

Parameters:
name - The name of the parameter to get
Returns:
The parameter
See Also:
org.pentaho.platform.api.engine.services.IParameterProvider

getOutputParameter

IActionParameter getOutputParameter(String name)
Returns the named output parameter. This will search amongst all the output parameter providers (IParameterProvider) in order until it finds the output parameter and returns it. Throws a NullPointerException if the parameter is not found. This method never returns null

Parameters:
name - The name of the parameter to get
Returns:
The requested parameter
See Also:
org.pentaho.platform.api.engine.services.IParameterProvider

getResourceDefintion

IActionSequenceResource getResourceDefintion(String name)
Gets the named resource definition from the executing action sequence. Throws a NullPointerException if the resource is not found. This method never returns null

Parameters:
name - The named resource to get
Returns:
The resource if it exists.
See Also:
IActionSequenceResource

getInputParameterValue

Object getInputParameterValue(String name)
Gets the value of the specified input parameter. Throws a NullPointerException if the parameter is not found. This method never returns null

Parameters:
name - The named parameter to retrieve
Returns:
The IActionParameter#getValue()
See Also:
IActionParameter

getInputParameterStringValue

String getInputParameterStringValue(String name)
Gets the value of the specified input parameter as a String. Throws a NullPointerException if the parameter is not found. This method never returns null

Parameters:
name - The named parameter to retrieve
Returns:
The IActionParameter#getStringValue()
See Also:
IActionParameter

getResourceInputStream

InputStream getResourceInputStream(IActionSequenceResource actionResource)
                                   throws FileNotFoundException
Gets the named resource as an InputStream. This is just a utility method that interfaces to ISolutionRepository

Parameters:
actionResource - The resource to get from the SolutionRepository
Returns:
The InputStream that contains the resource.
Throws:
FileNotFoundException
See Also:
ISolutionRepository#getResourceInputStream(IActionResource)

getResourceDataSource

IPentahoStreamSource getResourceDataSource(IActionSequenceResource actionResource)
                                           throws FileNotFoundException
Gets the named resource as a DataSource. This is just a utility method that interfaces to ISolutionRepository

Parameters:
actionResource - The resource to get from the SolutionRepository
Returns:
The DataSource
Throws:
FileNotFoundException
See Also:
ISolutionRepository#getResourceDataSource(IActionResource)

getResourceReader

Reader getResourceReader(IActionSequenceResource actionParameter)
                         throws IOException
Gets the named resource as a Reader. This is just a utility method that interfaces to ISolutionRepository

Parameters:
actionResource - The resource to get from the SolutionRepository
Returns:
The Reader
Throws:
IOException
See Also:
ISolutionRepository#getResourceReader(IActionResource)

getResourceAsString

String getResourceAsString(IActionSequenceResource actionParameter)
                           throws IOException
Gets the named resource as a String. This is just a utility method that interfaces to ISolutionRepository

Parameters:
actionResource - The resource to get from the SolutionRepository
Returns:
The String
Throws:
IOException
See Also:
ISolutionRepository#getResourceAsString(IActionResource)

getResourceAsDocument

Document getResourceAsDocument(IActionSequenceResource actionParameter)
                               throws IOException,
                                      DocumentException
Gets the named resource as a Document. This is just a utility method that interfaces to ISolutionRepository

Parameters:
actionResource - The resource to get from the SolutionRepository
Returns:
The DataSource
Throws:
IOException
DocumentException
See Also:
ISolutionRepository#getResourceAsDocument(IActionResource)

setOutputValue

void setOutputValue(String name,
                    Object output)
Sets the value of a named output parameter

Parameters:
name - The name of the output parameter
output - The value to set the output parameter to

addTempParameter

void addTempParameter(String name,
                      IActionParameter output)
Adds a parameter to the current inputs. A component can be use this to create parameters for internal use or for new outputs.

Parameters:
name - The name of the temporary parameter
output - The value to set the temporary parameter to

getOutputItem

IContentItem getOutputItem(String outputName,
                           String mimeType,
                           String extension)
Returns an output stream for writing.

Parameters:
outputName - The name of the output
mimeType - The mime type of the output
extension - The file extension of the output
Returns:
OutputStream for writing to

getInputStream

InputStream getInputStream(String parameterName)
Returns an input stream from an input parameter, if the input parameter is a content item.

Parameters:
parameterName - The name of the parameter
Returns:
An InputStream from the content item

getDataSource

IPentahoStreamSource getDataSource(String parameterName)
Get's the content item associated with the parameter, and returns the content item's datasource

Parameters:
parameterName - The name of the parameter
Returns:
The IPentahoStreamSource from the Content Item
See Also:
IContentItem.getDataSource()

getInputNames

Set getInputNames()
Returns:
a Set containing all the inputs in the current action.

getResourceNames

Set getResourceNames()
Returns:
a Set containing the resource names in the action

getOutputNames

Set getOutputNames()
Returns:
a Set containing the output names in the current action

applyInputsToFormat

String applyInputsToFormat(String format)
Does parameter substitution on the input string, searching for all parameter declarations in the input string, and substituting the value from the matching input parameter. In other words, it replaces {REGION} with the value of the input parameter called REGION.

Parameters:
format - The string containing possible parameter references
Returns:
String with parameters resolved.

applyInputsToFormat

String applyInputsToFormat(String format,
                           IParameterResolver resolver)
Does parameter substitution on the input string, searching for all parameter declarations in the input string, and substituting the value from the matching input parameter. In other words, it replaces {REGION} with the value of the input parameter called REGION.

Parameters:
format - The string containing possible parameter references
Resolver - for parameters for overriding behavior
Returns:
String with parameters resolved.

addInputParameter

void addInputParameter(String name,
                       IActionParameter param)
Adds an input parameter to the list of all inputs for the action sequence

Parameters:
name - The name of the parameter (the key to the parameter map)
param - The parameter to add
See Also:
IActionParameter

feedbackAllowed

boolean feedbackAllowed()
Returns:
true if the current output device allows user feedback (i.e. parameter input forms)

getFeedbackContentItem

IContentItem getFeedbackContentItem()
Interfaces to the current output handler to get the content item that is handling feedback (i.e. parameter input forms)

Returns:
the Content Item for user input
See Also:
IContentItem, IOutputHandler

getOutputContentItem

IContentItem getOutputContentItem(String mimeType)
Interfaces to the current output handler to get the content item that describes the output from this request's component execution.

Returns:
The content item for output
See Also:
IContentItem, IOutputHandler

getOutputContentItem

IContentItem getOutputContentItem(String outputName,
                                  String mimeType)
Interfaces to the current output handler to get the named content item from this request's component execution.

Parameters:
outputName - the name of the output
Returns:
The requested content item
See Also:
IContentItem, IOutputHandler

getContentUrl

String getContentUrl(IContentItem contentItem)
Returns a url to the passed in content item that can be used to retrieve the content.

Parameters:
parameterName - the parameter name of the content
Returns:
a string representing the URL or null if the name is not a content item or is not a valid name.

sendFeedbackForm

void sendFeedbackForm()
                      throws IOException
Generates a parameter acquisition form for required parameters. This writes directly to the output stream provided by the output handler.

Throws:
IOException
See Also:
IOutputHandler

setCreateFeedbackParameterCallback

void setCreateFeedbackParameterCallback(ICreateFeedbackParameterCallback callback)

createFeedbackParameter

@Deprecated
void createFeedbackParameter(IActionParameter actionParam)
Deprecated. Adds a feedback parameter for prompts based on an Action Parameter. Uses the Selections defined in the Action Parameter for the options and sets the default to the current value

Parameters:
actionParam - The Action Parameter to use as the model for the prompt

createFeedbackParameter

void createFeedbackParameter(ISelectionMapper selMap,
                             String fieldName,
                             Object defaultValues)
Adds a feedback parameter (essentially a form input field) for a required input.

Parameters:
selMap - Maps IPentahoResultSet objects to selection objects
fieldName - Name of the form field
defaultValues - default values for the input field
See Also:
SelectionMapper

createFeedbackParameter

void createFeedbackParameter(ISelectionMapper selMap,
                             String fieldName,
                             Object defaultValues,
                             boolean optional)
Adds a feedback parameter (essentially a form input field) for a required input.

Parameters:
selMap - Maps IPentahoResultSet objects to selection objects
fieldName - Name of the form field
defaultValues - default values for the input field
optional - specifies if the feedback parameter is required or not
See Also:
SelectionMapper

createFeedbackParameter

void createFeedbackParameter(String fieldName,
                             String displayName,
                             String hint,
                             Object defaultValue,
                             boolean visible)
Adds a scalar feedback parameter

Parameters:
fieldName - Name of the input field
displayName - display name of the input field
hint - Fly-over hint for the input field
defaultValue - Default value for the input field
visible - Whether the input field is visible or not
See Also:
XForm

createFeedbackParameter

void createFeedbackParameter(String fieldName,
                             String displayName,
                             String hint,
                             Object defaultValue,
                             boolean visible,
                             boolean optional)
Adds a scalar feedback parameter

Parameters:
fieldName - Name of the input field
displayName - display name of the input field
hint - Fly-over hint for the input field
defaultValue - Default value for the input field
visible - Whether the input field is visible or not
optional - specifies if the feedback parameter is required or not
See Also:
XForm

createFeedbackParameter

void createFeedbackParameter(String fieldName,
                             String displayName,
                             String hint,
                             Object defaultValues,
                             List values,
                             Map dispNames,
                             String displayStyle)
Creates a feedback parameter that uses a list for the values

Parameters:
fieldName - The name of the field
displayName - Display name
hint - Fly-over hint for the input field
defaultValues - Default value of the input field
values - List of values
dispNames - Map of display names
displayStyle - how to display the control
See Also:
XForm

createFeedbackParameter

void createFeedbackParameter(String fieldName,
                             String displayName,
                             String hint,
                             Object defaultValues,
                             List values,
                             Map dispNames,
                             String displayStyle,
                             boolean optional)
Creates a feedback parameter that uses a list for the values

Parameters:
fieldName - The name of the field
displayName - Display name
hint - Fly-over hint for the input field
defaultValues - Default value of the input field
values - List of values
dispNames - Map of display names
displayStyle - how to display the control
See Also:
XForm

getStatus

int getStatus()
Returns:
the current status of execution

getMessages

List getMessages()
Returns:
List of messages saved up during execution. This is used to provide failure feedback to the user.

createNewInstance

String createNewInstance(boolean persisted)
Creates a new runtime context that is a child of this instance

Parameters:
persisted - Should the runtime data be persisted
Returns:
Instance id of the new RuntimeContext

createNewInstance

String createNewInstance(boolean persisted,
                         Map parameters)
Creates a new runtime context that is a child of this instance and sets attributes of the runtime data from the parameter Map

Parameters:
persisted - Should the runtime data be persisted
parameters - parameters for the new instance
Returns:
Instance id of the new RuntimeContext

createNewInstance

String createNewInstance(boolean persisted,
                         Map parameters,
                         boolean forceImmediateWrite)
Creates a new runtime context that is a child of this instance and sets attributes of the runtime data from the parameter Map, and can optionally cause the new instance to be forcibly written to the underlying persistence mechanism.

Parameters:
persisted - Should the runtime data be persisted
parameters - parameters for the new instance
forceImmediateWrite - if true, will call the new runtime element's forceSave method before returning.
Returns:
Instance id of the new RuntimeContext

dispose

void dispose()

dispose

void dispose(List exceptParameters)

setParameterXsl

void setParameterXsl(String xsl)
Sets the xsl file to be used to generate the parameter page for the current component. The parameter should be a full path from the solution root starting with a /, or it should be a path relative to the directory of the current action sequence.

Parameters:
xsl - The name of the XSL file

setParameterTarget

void setParameterTarget(String target)
Sets the target window that the content will be displayed in. This name is used at the target in an Window.open() javascript call made when the submit button on the parameter page is clicked.

Parameters:
target - Window name

forceSaveRuntimeData

void forceSaveRuntimeData()
Forces the immediate write of runtime data to underlying persistence mechanism. In the case of using Hibernate for the runtime data persistence, this works out to a call to HibernateUtil.flush().


getOutputPreference

int getOutputPreference()
Gets the output type prefered by the handler. Values are defined in org.pentaho.platform.api.engine.IOutputHandler and are OUTPUT_TYPE_PARAMETERS, OUTPUT_TYPE_CONTENT, or OUTPUT_TYPE_DEFAULT

Returns:
Output type

setOutputHandler

void setOutputHandler(IOutputHandler outputHandler)
Sets the output handler for the runtime context

Parameters:
outputHandler - The output handler

setPromptStatus

void setPromptStatus(int status)
Sets the default prompt status PROMPT_NO, PROMPT_WAITING, PROMPT_NOW

Parameters:
status -

getParameterManager

IParameterManager getParameterManager()

getParameterProviders

Map getParameterProviders()