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


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

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 defaults 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. An empty string indicates the property has no default value.

Default:
""

isPassword

public abstract boolean isPassword
Specifies whether or the configuration property is a password. Password properties are masked in CAS Console and are not returned by the CAS Server when fetching crawl configurations.

Default:
false

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

maxLength

public abstract int maxLength
Specifies the maximum length of the configuration property value. This must be a positive integer.

Default:
255

isMultiLine

public abstract boolean isMultiLine
Specifies that the configuration property is a multi-line String. If true, CAS Console renders the property with a multi-line text editor rather than a single-line text editor.

Default:
false

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 © 2007, 2012, Oracle and/or its affiliates. All rights reserved.