|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value=FIELD) @Retention(value=RUNTIME) public @interface StringProperty
Indicates that a field in an PipelineComponentConfiguration
is a string
configuration property. Use this annotation with PipelineComponentConfiguration
member variables of type java.lang.String, arrays of java.lang.String, or
a Collection
of type java.lang.String.
For multiple value Strings, this annotation can be used with String arrays, Collections, Lists, Sets, or any concrete Collection implementation with a public, zero argument constructor.
The CAS Server automatically validates all configuration property constraints such as isRequired, possibleValues, and maxLength.
Here is an example usage of the @StringProperty annotation with all parameters:
@StringProperty(name="myString" displayName="My String", description="My String description", defaultValue="value1", isRequired=true, isAlwaysVisible=true, configGroup="Basic Options", maxLength=6, isMultiLine=false, possibleValues={ @EnumValue(value="value1", label="label1"), @EnumValue(value="value2", label="label2"), @EnumValue(value="value3", label="label3")} ) private String myStringField;
Optional Element Summary | |
---|---|
String |
configGroup
The name of the ConfigurationGroup this configuration property
belongs to. |
String |
defaultValue
The default value for the property. |
String |
description
A description of the configuration property. |
String |
displayName
The display name of the configuration property shown in CAS Console. |
boolean |
isAlwaysVisible
Indicates whether or not to show the configuration property in the CAS Console even if the configuration property is not required. |
boolean |
isMultiLine
Specifies that the configuration property is a multi-line String. |
boolean |
isPassword
Specifies whether or the configuration property is a password. |
boolean |
isRequired
Indicates whether or not the property is required. |
int |
maxLength
Specifies the maximum length of the configuration property value. |
String |
name
The name of the configuration property. |
EnumValue[] |
possibleValues
Specifies the set of possible values for this configuration property. |
public abstract String name
public abstract boolean isRequired
public abstract EnumValue[] possibleValues
public abstract String description
public abstract String displayName
public abstract String defaultValue
public abstract boolean isPassword
public abstract boolean isAlwaysVisible
public abstract int maxLength
public abstract boolean isMultiLine
public abstract String configGroup
ConfigurationGroup
this configuration property
belongs to. This must correspond to a ConfigGroup annotation on the
PipelineComponentConfiguration
. Alternatively the ConfigGroup can
be specified using the ConfigurationGroup.propertyOrder()
annotation parameter.
ConfigurationGroup
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |