Class ConfigurationChooserPropertyDescriptor

java.lang.Object
java.beans.FeatureDescriptor
java.beans.PropertyDescriptor
com.streambase.sb.operator.parameter.SBPropertyDescriptor
com.streambase.sb.operator.parameter.ConfigurationChooserPropertyDescriptor

public class ConfigurationChooserPropertyDescriptor extends SBPropertyDescriptor
A property descriptor for use by a String-typed Java Operator or Adapter property, for cases that wish to present to the user a chooser (typically a combo box) that allows identifying some data out of the server configuration file's adapter-configurations area.

At runtime, the Operator/Adapter may use Operator.getOperatorConfigurationAccessor() along with the property value to retrieve the data.

Specifically, this descriptor is to be created with an XPath expression that selects XPathConstants.NODESET, and more specifically, that is expected to return a list of Attribute nodes, whose values will be presented to the user to select from. The value selected (or entered) is then set to a String property type.

The XPath expression supports the use of variables (using the $var syntax as specified by the JAXP API); you may use other property names as variable names, and you must declare these variables using setLinkedPropertyNames(String...).

For example, given this as the contents of the adapter-configurations element in the server's configuration file:

 <adapter-configuration type="myop">
   <section name="section1">
   ...
   </section>
   <section name="section2">
   ...
   </section>
 </adapter-configuration>
 

then this xpath: adapter-configuration[@type="myop"]/section/@name

would let the user select from:

section1 and section2

An example XPath expression using a parameter might look like: adapter-configuration[@type="myop"]/sections/[@name=$section]/@name

Note that UIHints proposals are ignored for this descriptor.

Since:
7.5
See Also: