Interface ActivityParameterHelper
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
EmptyActivityParameterHelper
Classes that implement this interface provide additional functionality for
passing parameters to and receiving parameters from a user interface.
-
Method Summary
Modifier and TypeMethodDescriptionProduce an output map that contains values used in populating the user interface that are not passed to the UI by default.inputMapToExtraParameters
(Map fromRequest_) Convert an input map containing all the input parameters into an object containing only the parameters that are both necessary for the activity to execute and that are not converted by default.boolean
validate
(ActivityClassParameter[] acps_, Object extraParameters_, boolean isSubmit_, ServiceContext sc_, MessageHolder errorHolder_) Validate user input.
-
Method Details
-
validate
boolean validate(ActivityClassParameter[] acps_, Object extraParameters_, boolean isSubmit_, ServiceContext sc_, MessageHolder errorHolder_) Validate user input. This method will execute after user-entered values are pushed intoActivityClassParameter[]
. The framework guarantees that all values are the correct types. Returntrue
if there are no validation errors; otherwise, returnfalse
. Validation error messages to be displayed to the user should be stored on the relevantActivityClassParameter
.- Parameters:
acps_
- The parameters.extraParameters_
- The output frominputMapToExtraParameters()
.isSubmit_
-true
if the task is being submitted for completion,false
if the task is simply being saved for completion later. Validations performed if the task is being submitted may not need to be performed if it is simply being saved.sc_
- the service context of the current user.errorHolder_
- a way to add error messages to the appianwebmvc action that called this method.- Returns:
true
if there are no validation errors; otherwise,false
.
-
createExtraOutputMap
Produce an output map that contains values used in populating the user interface that are not passed to the UI by default. Any value specified as anActivityClassParameter
is passed by default. If there are no extra values to populate, the returned map should be empty. The primary intended use of this method is to pass enumerations meant to be rendered as a select box or radio buttons or some other form of widget that allows choosing from a list of alternatives.- Parameters:
acps_
- The parameters.- Returns:
- The map of output values.
-
inputMapToExtraParameters
Convert an input map containing all the input parameters into an object containing only the parameters that are both necessary for the activity to execute and that are not converted by default. Any parameter that corresponds to anActivityClassParameter
is converted by default. If there are no extra parameters, the method should returnnull
. The primary intended use of this method is for handling files submitted via the browser.- Parameters:
fromRequest_
- The map of input parameters.- Returns:
- The extra activity parameters.
-