Package com.appiancorp.suiteapi.process
Interface Validatable
- All Known Implementing Classes:
ActivityClassParameter
,ActivityReturnVariable
,ProcessVariable
,ProcessVariableInstance
public interface Validatable
Classes implementing this interface can be subjected to runtime validation. Generally,
these classes are descendants of
TypedVariable
.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
May not have a default value, but still required by the runtime user.static final int
Not required at all.static final int
Must have a default value, must have a value submitted by the runtime user. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllMessages
(List newMessages_) Adds all of the messages in the given list to the collection of validation messages maintained by this object.void
addValidationMessage
(String message_) Adds the given validation message to the collection maintained by this object.void
Clears the collection of validation messages accumulated by this object.int[]
Gets the type array of Appian Object(s) selected within the picker.Gets a name that can be shown to an end user.Retrieves the type id, which corresponds to aDatatype
.getKey()
Gets the name of this variable.int
Does this object support a value that is an array?Determines whether this object can be modified by the user.Determines whether this object can be set to null, or an empty string.getType()
Deprecated.Use getInstanceType()Retrieves the list of validation messages that have been added to this object by a validator.getValue()
Retrieves the value of this object.void
setDetailedTypes
(int[] detailedTypes_) SeegetDetailedTypes()
.void
setInstanceType
(Long type_) Sets the type id, which corresponds to aDatatype
.void
setMultiple
(int multiple_) SeegetMultiple()
.void
SeegetValue()
.
-
Field Details
-
NULLABLE_NOT_AT_ALL
static final int NULLABLE_NOT_AT_ALLMust have a default value, must have a value submitted by the runtime user.- See Also:
-
NULLABLE_BY_ALL
static final int NULLABLE_BY_ALLNot required at all.- See Also:
-
NULLABLE_ADMIN_AND_DESIGN
static final int NULLABLE_ADMIN_AND_DESIGNMay not have a default value, but still required by the runtime user.- See Also:
-
MUTABLE_NOT_BY_END_USER
static final int MUTABLE_NOT_BY_END_USER- See Also:
-
MUTABLE_BY_END_USER
static final int MUTABLE_BY_END_USER- See Also:
-
MUTABLE_AT_DESIGNER_DISCRETION
static final int MUTABLE_AT_DESIGNER_DISCRETION- See Also:
-
-
Method Details
-
getNullable
Long getNullable()Determines whether this object can be set to null, or an empty string.- Returns:
- One of the
NULLABLE_XXX
constants (defined by this interface) indicating the nullability of the object.
-
getMutable
Long getMutable()Determines whether this object can be modified by the user.- Returns:
- One of the
MUTABLE_XXX
constants defined by this interface.
-
getValue
Object getValue()Retrieves the value of this object. This value is not the object itself, but rather the object being wrapped. Think of classes that implement this interface as wrappers for a smaller object, along with a bunch of metadata about the object. This method returns the wrapped object (generally aString
or aLong
), without the metadata.- Returns:
- The object wrapped by the implementing class.
-
setValue
SeegetValue()
. -
getType
Deprecated.Use getInstanceType()Retrieves the type of this object. The type is just metadata about the value property, and corresponds to one of the constants defined inTypedVariable
.- Returns:
- The type of the wrapped object.
- See Also:
-
getInstanceType
Long getInstanceType()Retrieves the type id, which corresponds to aDatatype
. Built-in datatype ids are defined inAppianType
- Returns:
- the type id
-
setInstanceType
Sets the type id, which corresponds to aDatatype
. Built-in datatype ids are defined inAppianType
-
getValidationMessages
List getValidationMessages()Retrieves the list of validation messages that have been added to this object by a validator. These messages are Strings.- Returns:
- A list of
String
s representing the validation messages.
-
addValidationMessage
Adds the given validation message to the collection maintained by this object. All messages can be retrieved withgetValidationMessages()
.- Parameters:
message_
- The validation message to add.
-
clearValidationMessages
void clearValidationMessages()Clears the collection of validation messages accumulated by this object. A subsequent call togetValidationMessages()
will return an empty list, unless there are intervening calls toaddValidationMessage()
. -
addAllMessages
Adds all of the messages in the given list to the collection of validation messages maintained by this object.- Parameters:
newMessages_
- A list of validation messages to add, each of which is aString
.- Throws:
NullPointerException
- - if the specified collection is null
-
getKey
String getKey()Gets the name of this variable. Variables are generally key/value bindings, with the added attribute of type. This is the key part of the binding.- Returns:
- The key as a
String
.
-
getFriendlyName
String getFriendlyName()Gets a name that can be shown to an end user. In most cases, this is no more complicated thangetKey()
. Some types of variables, however, have more descriptive text sitting around, and can return that. Basically, end users know about labels, not variable names.- Returns:
- The friendly name of the variable as a
String
.
-
getMultiple
int getMultiple()Does this object support a value that is an array?- Returns:
TypedVariable.ALWAYS
orTypedVariable.NEVER
-
setMultiple
void setMultiple(int multiple_) SeegetMultiple()
. -
getDetailedTypes
int[] getDetailedTypes()Gets the type array of Appian Object(s) selected within the picker.- Returns:
- Array of values of the selected objects.
- See Also:
-
setDetailedTypes
void setDetailedTypes(int[] detailedTypes_) SeegetDetailedTypes()
.
-