Package org.pentaho.platform.api.engine
Interface IActionParameter
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
FieldsModifier and TypeFieldDescriptionstatic final intThis parameter allows promptingstatic final intThis parameter needs to be prompted for a valuestatic final intThis parameter does not allow promptingstatic final intA component has already specified a prompt for this parameterstatic final StringParameter type indicating streamable content.static final StringParameter type of Datestatic final StringParameter type of BigDecimalstatic final StringParameter type ofintstatic final StringParameter type of List.static final StringParameter type indicating any type of Objectstatic final StringParameter type of IPentahoResultSetstatic final StringParameter type of String -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()See if we need to do any cleanup heregetName()Get the name, or the key for this ActionParameter.intReturns the prompt status for this parameter.The display name to use when building a prompt.getSelectionNameForValue(String value) When building a parameter prompt page, what is the name of the promptDeprecated.Unused in the platformDeprecated.Unused in the platformGet the value for this ActionParameter as type String.getType()Return the value type as one of the constants available in this class.getValue()Get the value for this ActionParameter as a generic Java Object.Get the value for this ActionParameter as a java.util.List.org.pentaho.commons.connection.IPentahoResultSetGet the value for this ActionParameter as a IPentahoResultSetbooleanCheck if this ActionParameter has a default value set.booleanbooleanhasValue()Check to se if a value has been set for this parameter.booleanCheck to see if the value returned from thisActionParameter is indeed the default value instead of a value that was set.booleanisNull()Check to see if the value (includes the default value) is null.booleanvoidsetParamSelections(List selValues, Map selNames, String displayname) Deprecated.Unused in the platformbooleansetPromptStatus(int status) Sets the prompt status for this parameter.voidSets the value object for this ActionParameter.
-
Field Details
-
TYPE_STRING
Parameter type of String- See Also:
-
TYPE_INTEGER
Parameter type ofint- See Also:
-
TYPE_LIST
Parameter type of List.- See Also:
-
TYPE_CONTENT
Parameter type indicating streamable content. @see RuntimeContext#getOutputStream(java.lang.String,java.lang.String,java.lang.String)- See Also:
-
TYPE_DATE
Parameter type of Date- See Also:
-
TYPE_RESULT_SET
Parameter type of IPentahoResultSet- See Also:
-
TYPE_DECIMAL
Parameter type of BigDecimal- See Also:
-
TYPE_OBJECT
Parameter type indicating any type of Object- See Also:
-
PROMPT_ALLOWED
static final int PROMPT_ALLOWEDThis parameter allows prompting- See Also:
-
PROMPT_NEEDED
static final int PROMPT_NEEDEDThis parameter needs to be prompted for a value- See Also:
-
PROMPT_NEVER
static final int PROMPT_NEVERThis parameter does not allow prompting- See Also:
-
PROMPT_PENDING
static final int PROMPT_PENDINGA component has already specified a prompt for this parameter- See Also:
-
-
Method Details
-
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
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:
-
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:
-
hasSelections
boolean hasSelections() -
getSelectionDisplayName
String getSelectionDisplayName()The display name to use when building a prompt.- Returns:
- The display name for the prompt.
-
getSelectionNameForValue
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.Unused in the platform -
getSelectionValues
Deprecated.Unused in the platform -
setParamSelections
Deprecated.Unused in the platform
-