Class ActivityClassParameter

All Implemented Interfaces:
com.appiancorp.core.expr.portable.PortableNamedTypedValue, com.appiancorp.core.expr.portable.PortableNamedTypedValueWithChildren, com.appiancorp.core.expr.portable.PortableTypedValue, com.appiancorp.process.runtime.forms.FormParameter, DeepCloneable, JSONable, JSONCacheable, XMLable, AppianTypeHolder, TypedVariableTypes, Validatable, AppianType, com.appiancorp.type.ExpressionableNamedTypedValue, com.appiancorp.type.HasTypeRef, com.appiancorp.type.NamedType, Serializable, Cloneable
Direct Known Subclasses:
ActivityReturnVariable

public class ActivityClassParameter extends ActivityClassParameterSchema implements com.appiancorp.process.runtime.forms.FormParameter, Validatable, Serializable, JSONCacheable, DeepCloneable, com.appiancorp.type.ExpressionableNamedTypedValue
An ActivityClassParameter is a variable that is specified at design time and used at runtime. It is passed into an Activity, and used as a local variable within that scope.
See Also:
  • Field Details

    • _interiorExpressions

      protected Object[] _interiorExpressions
  • Constructor Details

    • ActivityClassParameter

      public ActivityClassParameter()
      Creates a new activity class parameter
    • ActivityClassParameter

      public ActivityClassParameter(NamedTypedValue ntv_)
    • ActivityClassParameter

      @Deprecated public ActivityClassParameter(String name_, Long type_, Object value_)
      Deprecated.
      Creates a new parameter with the given name, type, and value.
      Parameters:
      name_ - the name of the parameter to set
      type_ - the type of the parameter. This must be one of the constants in TypedVariable.
      value_ - the value of the parameter to set.
      Throws:
      IllegalArgumentException - if type_ is not one of the constants from TypedVariable.
      See Also:
    • ActivityClassParameter

      public ActivityClassParameter(ActivityClassParameter acp_)
    • ActivityClassParameter

      public ActivityClassParameter(ActivityClassParameterSchema schema_)
  • Method Details

    • getHiddenAttributes

      public HashSet getHiddenAttributes()
      Description copied from interface: JSONable
      Returns the set of attributes (properties) that should not be included in the JSON representation of the object.
      Specified by:
      getHiddenAttributes in interface JSONable
      Overrides:
      getHiddenAttributes in class TypedVariable
      Returns:
      the set of hidden attributes
    • clone

      public Object clone()
      Clone this object. Note that this will produce a deep copy of value as well.
      Specified by:
      clone in interface DeepCloneable
      Overrides:
      clone in class ActivityClassParameterSchema
      Returns:
    • getXMLWrapperName

      protected String getXMLWrapperName()
      Overrides:
      getXMLWrapperName in class ActivityClassParameterSchema
    • findParameterByName

      public static ActivityClassParameter findParameterByName(ActivityClassParameter[] params_, String name_)
      Finds the parameter in the given array that has the given name. If no such parameter can be found, returns null.
    • getAcpSchemaId

      public Long getAcpSchemaId()
      Gets the Activity Class Parameter ID for this activity class parameter
      Returns:
      the Activity Class Parameter ID for this activity class parameter
    • setAcpSchemaId

      public void setAcpSchemaId(Long acpSchemaId_)
      Sets the Activity Class Parameter ID for this activity class parameter
      Parameters:
      acpSchemaId_ - the Activity Class Parameter ID for this activity class parameter
    • getExpression

      public String getExpression()
      Gets the expression for this activity class parameter
      Specified by:
      getExpression in interface com.appiancorp.type.ExpressionableNamedTypedValue
      Returns:
      the expression for this activity class parameter
    • setExpression

      public void setExpression(String expression_)
      Sets the expression for this activity class parameter
      Specified by:
      setExpression in interface com.appiancorp.type.ExpressionableNamedTypedValue
      Parameters:
      expression_ - the expression for this activity class parameter
    • getValidationMessages

      public List getValidationMessages()
      Description copied from interface: Validatable
      Retrieves the list of validation messages that have been added to this object by a validator. These messages are Strings.
      Specified by:
      getValidationMessages in interface com.appiancorp.process.runtime.forms.FormParameter
      Specified by:
      getValidationMessages in interface Validatable
      Returns:
      A list of Strings representing the validation messages.
    • addValidationMessage

      public void addValidationMessage(String message_)
      Description copied from interface: Validatable
      Adds the given validation message to the collection maintained by this object. All messages can be retrieved with getValidationMessages().
      Specified by:
      addValidationMessage in interface com.appiancorp.process.runtime.forms.FormParameter
      Specified by:
      addValidationMessage in interface Validatable
      Parameters:
      message_ - The validation message to add.
    • clearValidationMessages

      public void clearValidationMessages()
      Description copied from interface: Validatable
      Clears the collection of validation messages accumulated by this object. A subsequent call to getValidationMessages() will return an empty list, unless there are intervening calls to addValidationMessage().
      Specified by:
      clearValidationMessages in interface Validatable
    • addAllMessages

      public void addAllMessages(List newMessages_)
      Description copied from interface: Validatable
      Adds all of the messages in the given list to the collection of validation messages maintained by this object.
      Specified by:
      addAllMessages in interface Validatable
      Parameters:
      newMessages_ - A list of validation messages to add, each of which is a String .
    • getFriendlyName

      public String getFriendlyName()
      Description copied from interface: Validatable
      Gets a name that can be shown to an end user. In most cases, this is no more complicated than getKey(). Some types of variables, however, have more descriptive text sitting around, and can return that. Basically, end users know about labels, not variable names.
      Specified by:
      getFriendlyName in interface Validatable
      Returns:
      The friendly name of the variable as a String.
    • getAssignToProcessVariable

      public String getAssignToProcessVariable()
      Gets the string name of the process variable to which the value of the activity class parameter should be assigned
      Returns:
      the string name of the process variable
    • setAssignToProcessVariable

      public void setAssignToProcessVariable(String saveToPv_)
      Sets the string name of the process variable to which the value of the activity class parameter should be assigned
      Parameters:
      saveToPv_ - the string name of the process variable to save to (this can be prefixed with pv! e.g., processVar1 or pv!processVar1 both work.)
    • getGenerated

      public boolean getGenerated()
      Determines whether this variable cannot be deleted in the designer, if it is a custom ACP. ACPs that are specified at admin-time can never be deleted in the designer. The default is false, which should suffice 99% of the time.
      Returns:
      true if the user cannot delete this variable
    • setGenerated

      public void setGenerated(boolean generated_)
      Determines whether this variable was generated in the designer. The default is false, which should suffice 99% of the time.
      Parameters:
      generated_ - true if the ACP was generated
    • setValue

      public void setValue(Object value_)
      Description copied from class: TypedValue
      Sets the value of the typed variable.
      Specified by:
      setValue in interface com.appiancorp.type.ExpressionableNamedTypedValue
      Specified by:
      setValue in interface com.appiancorp.process.runtime.forms.FormParameter
      Specified by:
      setValue in interface Validatable
      Overrides:
      setValue in class TypedVariable
      Parameters:
      value_ - The value to set the typed variable to.
    • isPasswordStored

      public boolean isPasswordStored()
      Used only for passwords and only in certain circumstances. Will not return the correct value under most circumstances. Do not use except within ActivityExecuteAction.
    • shouldClear

      public boolean shouldClear()
      Does this ACP need to clear passwords?
      Returns:
    • clear

      public void clear()
      Clear passwords.
    • copy

      Deprecated.
      Can make copy externally.
      Returns a copy of this ACP and any sub-ACPs. Does NOT perform a full deep copy (e.g., non-ACP arrays are copied by reference)
    • getACP

      public ActivityClassParameter getACP(String name_)
    • setInteriorExpressions

      public void setInteriorExpressions(Object[] interiorExpressions_)
      Sets the interior expressions for this activity class parameter. These are only valid when dealing with TypedValues that are records, and the structure should mimic the one inside the Value field (an array of strings that is the length of the Record type's instance properties, with another array of strings in the case of instance properties that are also record types. These expressions will be evaluated when assigning the value to the ACP. A null value must be specified where no expression is desired.
      Parameters:
      interiorExpressions_ - the array with the Interior Expressions.
    • getInteriorExpressions

      public Object[] getInteriorExpressions()
      Gets the array that contains the interior expressions for this activity class parameter
      Returns:
      the interior expressions object array
    • clearPasswordOnTransport

      @Deprecated public void clearPasswordOnTransport(boolean clear)
      Deprecated.
      This is an internal method that will be removed from the public API.
      Set whether or not to this value should clear passwords on transport (i.e. when passed to the back-end). Transient property. Works as a flag to avoid including passwords in transport.
      Parameters:
      clear -
    • setClearPassword

      @Deprecated protected void setClearPassword(boolean clear)
      Deprecated.
      This is an internal method that will be removed from the public API.