com.endeca.cas.extension.annotation
Annotation Type IntegerProperty


@Target(value=FIELD)
@Retention(value=RUNTIME)
public @interface IntegerProperty

Indicates that a field in an 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;
 


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 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.
 

name

public abstract String name
The name of the configuration property. This will be used in crawl configurations sent through the CAS Server API and crawl configuration files used by cas-cmd. If not specified, name will default to the member variable's name.

Default:
""

isRequired

public abstract boolean isRequired
Indicates whether or not the property is required. Crawl configurations must contain valid values for all required properties.

Default:
false

possibleValues

public abstract EnumValue[] possibleValues
Specifies the set of possible values for this configuration property. An empty set indicates that valid values aren't enumerated.

Default:
{}

description

public abstract String description
A description of the configuration property.

Default:
""

displayName

public abstract String displayName
The display name of the configuration property shown in CAS Console. If not specified, displayName defaults to the configuration property's name.

Default:
""

defaultValue

public abstract String defaultValue
The default value for the property. This value displays in CAS Console as the default value for both required and non-required configuration properties. The CAS Server also uses this value for any unspecified non-required configuration properties. The value must in the format specified by Integer.decode(String). An empty string indicates the property has no default value.

Default:
""

isAlwaysVisible

public abstract boolean isAlwaysVisible
Indicates whether or not to show the configuration property in the CAS Console even if the configuration property is not required.

Default:
false

maxValue

public abstract int maxValue
The maximum allowable value for the configuration property. Configuration property values must be less than or equal to the maxValue.

Default:
2147483647

minValue

public abstract int minValue
The minimum allowable value for the configuration property. Configuration property values must be greater than or equal to the minValue.

Default:
-2147483648

configGroup

public abstract String configGroup
The name of the 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.

See Also:
ConfigurationGroup
Default:
""


Copyright © 2011 Endeca. All Rights Reserved.