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


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

Indicates that a field in an PipelineComponentConfiguration is a double configuration property. Use this annotation with PipelineComponentConfiguration member variables of type primitive double or java.lang.Double.

The CAS Server automatically validates all configuration property constraints such as isRequired, possibleValues, minValue, and maxValue.

Here is an example usage of the @DoubleProperty annotation with all parameters:

 @DoubleProperty(name="myDouble" displayName="My Double",
        description="My Double description", defaultValue="1.1",
        isRequired=true, isAlwaysVisible=true, configGroup="Basic Options",
        minValue=1.1, maxValue=3.3,
        possibleValues={
                @EnumValue(value="1.1", label="1.1 label"),
                @EnumValue(value="2.2", label="2.2 label"),
                @EnumValue(value="3.3", label="3.3 label")}
 )
 private Double myDoubleField;
 


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 always 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.
 double maxValue
          The maximum allowable value for the configuration property.
 double 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 Web 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 will default 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 Double.valueOf(String). An empty string indicates the property has no default value.

Default:
""

isAlwaysVisible

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

Default:
false

maxValue

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

Default:
1.7976931348623157E308

minValue

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

Default:
-1.7976931348623157E308

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.