Class SBExpressionPropertyDescriptor
java.lang.Object
java.beans.FeatureDescriptor
java.beans.PropertyDescriptor
com.streambase.sb.operator.parameter.SBPropertyDescriptor
com.streambase.sb.operator.parameter.SBExpressionPropertyDescriptor
A property descriptor that allows a user to define a property that
supports StreamBase expressions. The user will always be presented with
a text field to enter a StreamBase expression, and at runtime the server
will evaluate the expression in the context of each tuple, and assign the result
to the property associated with this descriptor. Studio will not call this property's
setter during authoring.
Note that the Operator property may be of any Java primitive type, and the engine will attempt to coerce the result of the expression to the property. Care should be taken to ensure the expression evaluates to a type compatible with the property type used. For example:
- the expression text "
max(input1.timeout,60.0)
", given thattimeout
is a field of type double, is compatible with an Operator property of type double - the expression text "
input1.targetExecutionVenue
", given thattargetExecutionVenue
is a field of type string, is compatible with an Operator property of type String
List
or Tuple
, but in those cases the read method for the
property must have an SBExpressionPropertyType
annotation to specify the exact
StreamBase type of the property.- Since:
- 6.0, 6.6 support for properties of type "list" and "tuple"
- 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
ConstructorDescriptionSBExpressionPropertyDescriptor
(PropertyDescriptor pd, Class<?> beanClass, int expressionInputPort) Copy a property descriptor.SBExpressionPropertyDescriptor
(String propertyName, Class<?> beanClass, int expressionInputPort) Construct a property descriptor.SBExpressionPropertyDescriptor
(String propertyName, Class<?> beanClass, String readMethodName, String writeMethodName, int expressionInputPort) Construct a property descriptor with non-standard 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
-
SBExpressionPropertyDescriptor
public SBExpressionPropertyDescriptor(String propertyName, Class<?> beanClass, String readMethodName, String writeMethodName, int expressionInputPort) throws IntrospectionException Construct a property descriptor with non-standard 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 propertyexpressionInputPort
- the input port that this expression is valid against- Throws:
IntrospectionException
- if introspection fails
-
SBExpressionPropertyDescriptor
public SBExpressionPropertyDescriptor(String propertyName, Class<?> beanClass, int expressionInputPort) throws IntrospectionException Construct a property descriptor.- Parameters:
propertyName
- the name of the propertybeanClass
- the operator class containing the propertyexpressionInputPort
- the input port that this expression is valid against- Throws:
IntrospectionException
- if introspection fails
-
SBExpressionPropertyDescriptor
public SBExpressionPropertyDescriptor(PropertyDescriptor pd, Class<?> beanClass, int expressionInputPort) throws IntrospectionException Copy a property descriptor.- Parameters:
pd
- a property descriptor to copy frombeanClass
- the operator class containing the propertyexpressionInputPort
- the input port that this expression is valid against- Throws:
IntrospectionException
- if introspection fails
-