Class EnumPropertyDescriptor
java.lang.Object
java.beans.FeatureDescriptor
java.beans.PropertyDescriptor
com.streambase.sb.operator.parameter.SBPropertyDescriptor
com.streambase.sb.operator.parameter.EnumPropertyDescriptor
- Direct Known Subclasses:
JavaEnumPropertyDescriptor
PropertyDescriptor for properties that reflect one of a fixed set of String
values. For example a WriteMode parameter might have possible
values "Read", "Write", "Update".
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.streambase.sb.operator.parameter.SBPropertyDescriptor
SBPropertyDescriptor.SingleValueSetter
-
Field Summary
Fields inherited from class com.streambase.sb.operator.parameter.SBPropertyDescriptor
_expressionInputPort, NOT_AN_EXPRESSION
-
Constructor Summary
ConstructorDescriptionEnumPropertyDescriptor
(String propertyName, Class<?> beanClass, String[] values) Construct an enumerated property descriptor.EnumPropertyDescriptor
(String propertyName, Class<?> beanClass, String readMethodName, String writeMethodName, String[] values) Construct an enumerated property descriptor with customized read/write method names. -
Method Summary
Methods inherited from class com.streambase.sb.operator.parameter.SBPropertyDescriptor
deprecated, description, displayName, getExpressionInputPort, getMaskDisplay, getMultiLine, getUIHints, isDeprecated, isExpression, isRequired, mask, multiline, optional, setDeprecated, setMaskStringDisplay, setMultiLine, setRequired, setUIHints
Methods inherited from class java.beans.PropertyDescriptor
createPropertyEditor, equals, getPropertyEditorClass, getPropertyType, getReadMethod, getWriteMethod, hashCode, isBound, isConstrained, setBound, setConstrained, setPropertyEditorClass, setReadMethod, setWriteMethod
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue, toString
-
Constructor Details
-
EnumPropertyDescriptor
public EnumPropertyDescriptor(String propertyName, Class<?> beanClass, String[] values) throws IntrospectionException Construct an enumerated property descriptor.- Parameters:
propertyName
- the name of the propertybeanClass
- the operator class containing the propertyvalues
- the set of allowable values for the property- Throws:
IntrospectionException
- if introspection fails
-
EnumPropertyDescriptor
public EnumPropertyDescriptor(String propertyName, Class<?> beanClass, String readMethodName, String writeMethodName, String[] values) throws IntrospectionException Construct an enumerated property descriptor with customized read/write method names.- Parameters:
propertyName
- the name of the propertybeanClass
- the operator class containing the propertyreadMethodName
- the name of the method used to read the propertywriteMethodName
- the name of the method used to write the propertyvalues
- the set of allowable values for the property- Throws:
IntrospectionException
- if introspection fails
-
-
Method Details
-
isValidValue
Is value valid?- Parameters:
val
- value to test- Returns:
- true if valid
-
getValues
Return the list of allowable values for the property.- Returns:
- allowable values for this property
-
setValues
Set the list of allowable values for the property.- Parameters:
values
- allowable values for this property
-