org.pentaho.platform.api.engine
Interface IActionParameter

All Known Implementing Classes:
ActionParameter

public interface IActionParameter

An IActionParameter represents one input or output in an IActionSequence. The IActionParameter is made up of a name or key, and a value.


Field Summary
static int PROMPT_ALLOWED
          This parameter allows prompting
static int PROMPT_NEEDED
          This parameter needs to be prompted for a value
static int PROMPT_NEVER
          This parameter does not allow prompting
static int PROMPT_PENDING
          A component has already specified a prompt for this parameter
static String TYPE_CONTENT
          Parameter type indicating streamable content.
static String TYPE_DATE
          Parameter type of Date
static String TYPE_DECIMAL
          Parameter type of BigDecimal
static String TYPE_INTEGER
          Parameter type of int
static String TYPE_LIST
          Parameter type of List.
static String TYPE_OBJECT
          Parameter type indicating any type of Object
static String TYPE_RESULT_SET
          Parameter type of IPentahoResultSet
static String TYPE_STRING
          Parameter type of String
 
Method Summary
 void dispose()
          See if we need to do any cleanup here
 String getName()
          Get the name, or the key for this ActionParameter.
 int getPromptStatus()
          Returns the prompt status for this parameter.
 String getSelectionDisplayName()
          The display name to use when building a prompt.
 String getSelectionNameForValue(String value)
          When building a parameter prompt page, what is the name of the prompt
 Map getSelectionNameMap()
          Deprecated. Unused in the platform
 List getSelectionValues()
          Deprecated. Unused in the platform
 String getStringValue()
          Get the value for this ActionParameter as type String.
 String getType()
          Return the value type as one of the constants available in this class.
 Object getValue()
          Get the value for this ActionParameter as a generic Java Object.
 List getValueAsList()
          Get the value for this ActionParameter as a java.util.List.
 org.pentaho.commons.connection.IPentahoResultSet getValueAsResultSet()
          Get the value for this ActionParameter as a IPentahoResultSet
 List getVariables()
           
 boolean hasDefaultValue()
          Check if this ActionParameter has a default value set.
 boolean hasSelections()
           
 boolean hasValue()
          Check to se if a value has been set for this parameter.
 boolean isDefaultValue()
          Check to see if the value returned from thisActionParameter is indeed the default value instead of a value that was set.
 boolean isNull()
          Check to see if the value (includes the default value) is null.
 boolean isOutputParameter()
           
 void setParamSelections(List selValues, Map selNames, String displayname)
          Deprecated. Unused in the platform
 boolean setPromptStatus(int status)
          Sets the prompt status for this parameter.
 void setValue(Object value)
          Sets the value object for this ActionParameter.
 

Field Detail

TYPE_STRING

static final String TYPE_STRING
Parameter type of String

See Also:
Constant Field Values

TYPE_INTEGER

static final String TYPE_INTEGER
Parameter type of int

See Also:
Constant Field Values

TYPE_LIST

static final String TYPE_LIST
Parameter type of List.

See Also:
Constant Field Values

TYPE_CONTENT

static final String TYPE_CONTENT
Parameter type indicating streamable content. @see RuntimeContext#getOutputStream(java.lang.String,java.lang.String,java.lang.String)

See Also:
Constant Field Values

TYPE_DATE

static final String TYPE_DATE
Parameter type of Date

See Also:
Constant Field Values

TYPE_RESULT_SET

static final String TYPE_RESULT_SET
Parameter type of IPentahoResultSet

See Also:
Constant Field Values

TYPE_DECIMAL

static final String TYPE_DECIMAL
Parameter type of BigDecimal

See Also:
Constant Field Values

TYPE_OBJECT

static final String TYPE_OBJECT
Parameter type indicating any type of Object

See Also:
Constant Field Values

PROMPT_ALLOWED

static final int PROMPT_ALLOWED
This parameter allows prompting

See Also:
Constant Field Values

PROMPT_NEEDED

static final int PROMPT_NEEDED
This parameter needs to be prompted for a value

See Also:
Constant Field Values

PROMPT_NEVER

static final int PROMPT_NEVER
This parameter does not allow prompting

See Also:
Constant Field Values

PROMPT_PENDING

static final int PROMPT_PENDING
A component has already specified a prompt for this parameter

See Also:
Constant Field Values
Method Detail

getName

String getName()
Get the name, or the key for this ActionParameter.

Returns:
the ActionParameter name

getStringValue

String getStringValue()
Get the value for this ActionParameter as type String.

Returns:
the ActionParameter value as a String. getType() should be referenced first to be sure the value type is TYPE_STRING.

getValue

Object getValue()
Get the value for this ActionParameter as a generic Java Object.

Returns:
the ActionParameter value as an Object

getValueAsList

List getValueAsList()
Get the value for this ActionParameter as a java.util.List.

Returns:
the ActionParameter value as a List. getType() should be referenced first to be sure the value type is TYPE_LIST.

getValueAsResultSet

org.pentaho.commons.connection.IPentahoResultSet getValueAsResultSet()
Get the value for this ActionParameter as a IPentahoResultSet

Returns:
the IPentahoResultSet getType() should be referenced first to be sure the value type is TYPE_RESULT_SET.

getType

String getType()
Return the value type as one of the constants available in this class.

Returns:
valid return values are TYPE_STRING, TYPE_INTEGER, TYPE_LIST, TYPE_CONTENT or TYPE_DATE

setValue

void setValue(Object value)
Sets the value object for this ActionParameter.

Parameters:
value - the value Object to be set.

getVariables

List getVariables()
Returns:
List of where the parameter may come from (request, session, etc)

hasDefaultValue

boolean hasDefaultValue()
Check if this ActionParameter has a default value set.

Returns:
true if there is a default value, otherwise false

hasValue

boolean hasValue()
Check to se if a value has been set for this parameter. Default value does not count;

Returns:
true if this parameter has a non default value

isDefaultValue

boolean isDefaultValue()
Check to see if the value returned from thisActionParameter is indeed the default value instead of a value that was set.

Returns:
true if the parameter is using the default value, false otherwise

isNull

boolean isNull()
Check to see if the value (includes the default value) is null.

Returns:
true if the value is null, otherwise false

dispose

void dispose()
See if we need to do any cleanup here


getPromptStatus

int getPromptStatus()
Returns the prompt status for this parameter.

Returns:
the status.
See Also:
PROMPT_ALLOWED, PROMPT_NEVER, PROMPT_NEEDED, PROMPT_PENDING

setPromptStatus

boolean setPromptStatus(int status)
Sets the prompt status for this parameter.

Parameters:
status - The status to set.
Returns:
true if the set was successful or false if the current setting cannot be changed.
See Also:
PROMPT_ALLOWED, PROMPT_NEVER, PROMPT_NEEDED, PROMPT_PENDING

hasSelections

boolean hasSelections()

getSelectionDisplayName

String getSelectionDisplayName()
The display name to use when building a prompt.

Returns:
The display name for the prompt.

getSelectionNameForValue

String getSelectionNameForValue(String value)
When building a parameter prompt page, what is the name of the prompt

Parameters:
value -
Returns:
name for the value

isOutputParameter

boolean isOutputParameter()
Returns:
Whether parameter should be displayed in output.

getSelectionNameMap

@Deprecated
Map getSelectionNameMap()
Deprecated. Unused in the platform


getSelectionValues

@Deprecated
List getSelectionValues()
Deprecated. Unused in the platform


setParamSelections

@Deprecated
void setParamSelections(List selValues,
                                   Map selNames,
                                   String displayname)
Deprecated. Unused in the platform