Show TOC

InputAttribute classLocate this document in the navigation structure

InputAttribute is used by the state to gather input value that will be used in the state processing, or to be included with the external web service call.

public abstract class InputAttribute extends Attribute
Base class

All members of InputAttribute, including inherited members.

Nested classes
Modifier and Type Class Description
publicclass InputValue Helper class to return the input value and provide helper methods to convert the value into needed types.
Modifier and Type Variable Description
protected boolean encrypted Indicator of whether this attribute is encrypted or not. NOTE: currently it's just a place holder for future implementation. Setting it to true does NOT encrypt the attribute value yet.
Modifier and Type Constructor Description
public InputAttribute(String, String, boolean) Constructor.
Modifier and Type Method Description
public InputType getInputType() Input type can be changed from the State Editor by checking/unchecking the input attribute checkbox, to set to InputType#SESSION or InputType#ATTRIBUTE, respectively.
public abstract InputValue getInputValue() More efficient way to check and obtain the value of the input attribute using a single database call.
public InputValue getInputValueWithWarning() Similar to getInputValue() but this method throws RequiredParameterMissingException when the input attribute is not optional (or mandatory) but the value is null (or not populated).
protected String getRawValue() Helper class used internally by the getInputValue(), getInputValueWithWarning(), and getValue().
protected String getRawValueLog() Helper class called internally by getRawValue().
public InputValue getValue() Get the InputValue with no warning.
public boolean isCheckboxEnabled() Whether the UI checkbox component is enabled or not.
public boolean isOptional() Whether the input attribute is optional.
public abstract boolean isSet() Return True/False when the InputAttribute contains value or not, respectively.
public void setCheckboxEnabled(boolean) Enable or disable the checkbox.
public void setInputType(InputType) Input type can be changed from the State Editor by checking/unchecking the input attribute checkbox, to set it to InputType#SESSION or InputType#ATTRIBUTE, respectively.
public void setOptional(boolean) Set the input attribute optional status.
Inherited members from Attribute
Modifier and Type Member Description
public Attribute(String, String) Default value (if provided)
protected SmappStateProcessingContext getContext() Sets the processing engine context.
public String getDescription() Detailed description of the attribute.
public String getId() Attribute Id.
public String getText() The text that was entered in the input field on the state editor.
public void setContext(SmappStateProcessingContext) Sets the processing engine context.
public void setDescription(String) Detailed description of the attribute.
public void setId(String) Attribute Id.
On the State Editor, InputAttribute is referred to as "Input Variable" and is represented with three UI components:
  • A checkbox
  • An "input field" (textbox or dropdown box)
  • An mandatory attribute indicator
  • A description of the input attribute
  • Mouse-hover showing the description, and the default session variable name

The checkbox indicates whether the value entered in the "input field" should be treated as "<i>session variable name</i>" when checked, or "<i>static value</i>" when not checked. When checked, the session variable name will be used in retrieving the value from the session variable.

In either cases, the value will always be persisted for durability across session.

Also, see OutputAttribute.