com.streambase.sb.operator.parameter

## Class SBExpressionPropertyDescriptor

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

-     public class SBExpressionPropertyDescriptor
      extends SBPropertyDescriptor

  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 that `timeout` is a field of type double, is compatible with an Operator property of type double
  - the expression text "`input1.targetExecutionVenue`", given that `targetExecutionVenue` is a field of type string, is compatible with an Operator property of type String
  Properties can also be of type `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:
    `SBPropertyDescriptor`, `SBExpressionPropertyType`

- - ### 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

    Constructors
    Constructor and Description
    `SBExpressionPropertyDescriptor(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`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### 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 property
        `beanClass` - the operator class containing the property
        `readMethodName` - the name of the method used to read the property
        `writeMethodName` - the name of the method used to write the property
        `expressionInputPort` - 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 property
        `beanClass` - the operator class containing the property
        `expressionInputPort` - 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 from
        `beanClass` - the operator class containing the property
        `expressionInputPort` - the input port that this expression is valid against
      Throws:
        `IntrospectionException` - if introspection fails

Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.