com.streambase.sb.operator.parameter

## Class SBSimpleBeanInfo

- java.lang.Object
- - java.beans.SimpleBeanInfo
  - - com.streambase.sb.operator.parameter.SBSimpleBeanInfo

- All Implemented Interfaces:
    SBBeanInfo, BeanInfo

      public abstract class SBSimpleBeanInfo
      extends SimpleBeanInfo
      implements SBBeanInfo

  SimpleBeanInfo subclass used by StreamBase operators and adapters to provide the set of properties available by the operator or adapter. SBSimpleBeanInfo should be used instead of `SimpleBeanInfo` to allow StreamBase to identify the name of missing getter or setter methods for a specific property.
  Since:
    7.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CAPTURE_STRATEGY_DESC_NAME` The name of the bean that stores the CaptureStrategy.
    `static String` | `CHARSET_DISPLAY_NAME`
    `static String` | `CHARSET_PROPERTY_NAME`
    `static String[]` | `CHARSET_PROPOSALS`
    `static String` | `USE_DEFAULT_CHARSET_PROPERTY_NAME`

    - ### Fields inherited from interface java.beans.BeanInfo

      `ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SBSimpleBeanInfo()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `checkCharsetProps(Operator operator, boolean useDefault, String charset)`
    `SBPropertyDescriptor` | `createCaptureTransformStrategyDescriptor()` Create a `SBPropertyDescriptor` that sets the `CaptureTransformStrategy` for this operator.
    `SBPropertyDescriptor` | `createCharsetPropertyDesc(UIHints hint, String desc, Class<?> clazz)` Same as calling createCharsetPropertyDesc(hint, desc, clazz, true)
    `SBPropertyDescriptor` | `createCharsetPropertyDesc(UIHints hint, String desc, Class<?> clazz, boolean indent)` Creates a property descriptor for character set encoding, with `CHARSET_PROPOSALS` as the proposals.
    `SBPropertyDescriptor` | `createUseDefaultCharsetPropertyDesc(UIHints hint, Class<?> clazz)` Creates a check box property descriptor for users to indicate that they would like to use the platform's default charset for this operator.
    `PropertyDescriptor[]` | `getPropertyDescriptors()` Use getPropertyDescriptorsChecked rather than getPropertyDescriptors when extending `SBSimpleBeanInfo`.
    `abstract SBPropertyDescriptor[]` | `getPropertyDescriptorsChecked()` Returns the property descriptors of an operator or adapter
    `static boolean` | `isValidCharset(String charset)`

    - ### Methods inherited from class java.beans.SimpleBeanInfo

      `getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, loadImage`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.beans.BeanInfo

      `getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors`

- - ### Field Detail

    - #### CAPTURE_STRATEGY_DESC_NAME

          public static final String CAPTURE_STRATEGY_DESC_NAME

      The name of the bean that stores the CaptureStrategy.
      See Also:
        Constant Field Values

    - #### CHARSET_PROPOSALS

          public static final String[] CHARSET_PROPOSALS

    - #### USE_DEFAULT_CHARSET_PROPERTY_NAME

          public static final String USE_DEFAULT_CHARSET_PROPERTY_NAME

      See Also:
        Constant Field Values

    - #### CHARSET_PROPERTY_NAME

          public static final String CHARSET_PROPERTY_NAME

      See Also:
        Constant Field Values

    - #### CHARSET_DISPLAY_NAME

          public static final String CHARSET_DISPLAY_NAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SBSimpleBeanInfo

          public SBSimpleBeanInfo()

  - ### Method Detail

    - #### getPropertyDescriptorsChecked

          public abstract SBPropertyDescriptor[] getPropertyDescriptorsChecked()
                                                                        throws IntrospectionException

      Description copied from interface: `SBBeanInfo`
      Returns the property descriptors of an operator or adapter
      Specified by:
        `getPropertyDescriptorsChecked` in interface `SBBeanInfo`
      Returns:
        An array containing the property descriptors of an operator or adapter
      Throws:
        `IntrospectionException` - If a getter or setter for a property is missing

    - #### getPropertyDescriptors

          public final PropertyDescriptor[] getPropertyDescriptors()

      Use getPropertyDescriptorsChecked rather than getPropertyDescriptors when extending `SBSimpleBeanInfo`.
      Specified by:
        `getPropertyDescriptors` in interface `BeanInfo`
      Overrides:
        `getPropertyDescriptors` in class `SimpleBeanInfo`
      Returns:
        null

    - #### createCaptureTransformStrategyDescriptor

          public SBPropertyDescriptor createCaptureTransformStrategyDescriptor()
                                                                        throws IntrospectionException

      Create a `SBPropertyDescriptor` that sets the `CaptureTransformStrategy` for this operator. The bean methods for this descriptor already exist in the base class.
      Returns:
        a property descriptor
      Throws:
        `IntrospectionException` - on bean introspection exception
      Since:
        7.2.6

    - #### createCharsetPropertyDesc

          public SBPropertyDescriptor createCharsetPropertyDesc(UIHints hint,
                                                                String desc,
                                                                Class<?> clazz)
                                                         throws IntrospectionException

      Same as calling createCharsetPropertyDesc(hint, desc, clazz, true)
      Parameters:
        `hint` - UIHint to be used for the SBPropertyDescriptor that should be created
        `desc` - Description or tool-tip for the property
        `clazz` - the Class containing the java bean property for this
      Returns:
        SBPropertyDescriptor for character set encoding
      Throws:
        `IntrospectionException` - on bean introspection exception

    - #### createCharsetPropertyDesc

          public SBPropertyDescriptor createCharsetPropertyDesc(UIHints hint,
                                                                String desc,
                                                                Class<?> clazz,
                                                                boolean indent)
                                                         throws IntrospectionException

      Creates a property descriptor for character set encoding, with `CHARSET_PROPOSALS` as the proposals.
      Parameters:
        `hint` - UIHint to be used for the SBPropertyDescriptor that should be created
        `desc` - Description or tool-tip for the property
        `clazz` - the Class containing the java bean property for this
        `indent` - the property will be indented if this is set to true, false otherwise
      Returns:
        SBPropertyDescriptor for character set encoding
      Throws:
        `IntrospectionException` - on bean introspection exception

    - #### createUseDefaultCharsetPropertyDesc

          public SBPropertyDescriptor createUseDefaultCharsetPropertyDesc(UIHints hint,
                                                                          Class<?> clazz)
                                                                   throws IntrospectionException

      Creates a check box property descriptor for users to indicate that they would like to use the platform's default charset for this operator.
      Parameters:
        `hint` - The UIHint to be set on the SBPropertyDescriptor that will be used
        `clazz` - the Class containing the java bean property for this
      Returns:
        SBPropertyDescriptor for users to indicate that default charset should be used
      Throws:
        `IntrospectionException` - on bean introspection exception

    - #### checkCharsetProps

          public static void checkCharsetProps(Operator operator,
                                               boolean useDefault,
                                               String charset)
                                        throws Operator.PropertyTypecheckException

      Throws:
        `Operator.PropertyTypecheckException`

    - #### isValidCharset

          public static boolean isValidCharset(String charset)

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