Interface ActivityParameterHelper

All Superinterfaces:
Serializable
All Known Implementing Classes:
EmptyActivityParameterHelper

public interface ActivityParameterHelper extends Serializable
Classes that implement this interface provide additional functionality for passing parameters to and receiving parameters from a user interface.
  • 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 into ActivityClassParameter[]. The framework guarantees that all values are the correct types. Return true if there are no validation errors; otherwise, return false. Validation error messages to be displayed to the user should be stored on the relevant ActivityClassParameter.
      Parameters:
      acps_ - The parameters.
      extraParameters_ - The output from inputMapToExtraParameters().
      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 Struts action that called this method.
      Returns:
      true if there are no validation errors; otherwise, false.
    • createExtraOutputMap

      Map createExtraOutputMap(ActivityClassParameter[] acps_)
      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 an ActivityClassParameter 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

      Object 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. Any parameter that corresponds to an ActivityClassParameter is converted by default. If there are no extra parameters, the method should return null. 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.