@Target(value=FIELD) @Retention(value=RUNTIME) public @interface IntegerProperty
PipelineComponentConfiguration
is an integer
configuration property. Use this annotation with PipelineComponentConfiguration
member variables of type primitive int or java.lang.Integer.
The CAS Server automatically validates all configuration property constraints such as isRequired, possibleValues, minValue, and maxValue.
Here is an example usage of the @IntegerProperty annotation with all parameters:
@IntegerProperty(name="myInteger" displayName="My Integer", description="My Integer description", defaultValue="1", isRequired=true, isAlwaysVisible=true, configGroup="Basic Options", minValue=1, maxValue=3, possibleValues={ @EnumValue(value="1", label="1 label"), @EnumValue(value="2", label="2 label"), @EnumValue(value="3", label="3 label")} ) private Integer myIntegerField;
Modifier and Type | Optional Element and Description |
---|---|
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 |
isRequired
Indicates whether or not the property is required.
|
int |
maxValue
The maximum allowable value for the configuration property.
|
int |
minValue
The minimum allowable value for the configuration property.
|
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
Integer.decode(String)
. An empty
string indicates the property has no default value.public abstract boolean isAlwaysVisible
public abstract int maxValue
public abstract int minValue
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
Copyright © 2007, 2015, Oracle and/or its affiliates. All rights reserved.