Class SBPropertyDescriptor

    • Field Detail

      • NOT_AN_EXPRESSION

        public static final int NOT_AN_EXPRESSION
        contstant to signify that this property is not a StreamBase expression. We signify that a property is a StreamBaseExpression by assigning the property to an input port.
        See Also:
        Constant Field Values
      • _expressionInputPort

        protected int _expressionInputPort
        is this property really a StreamBase expression?
    • Constructor Detail

      • SBPropertyDescriptor

        public SBPropertyDescriptor​(String propertyName,
                                    Class<?> beanClass)
                             throws IntrospectionException
        Construct a property descriptor.
        Parameters:
        propertyName - the name of the property
        beanClass - the operator class containing the property
        Throws:
        IntrospectionException - if introspection fails
      • SBPropertyDescriptor

        public SBPropertyDescriptor​(String propertyName,
                                    Class<?> beanClass,
                                    String readMethodName,
                                    String writeMethodName)
                             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
        Throws:
        IntrospectionException - if introspection fails
    • Method Detail

      • optional

        public SBPropertyDescriptor optional()
        Mark the descriptor as optional.
        Returns:
        this object
      • deprecated

        public SBPropertyDescriptor deprecated()
        Mark the descriptor as deprecated. Deprecated properties do not appear in an operator's property view within Studio and are discarded from StreamBase application files.
        Returns:
        this object
        Since:
        6.3.5
      • isExpression

        public boolean isExpression()
        Is this property an expression?
        Returns:
        is this property an expression?
      • getExpressionInputPort

        public int getExpressionInputPort()
        Return the input port that this property is bound to. May return NOT_AN_EXPRESSION as not all properties are expressions.
        Returns:
        input port that this expression is bound to
      • displayName

        public SBPropertyDescriptor displayName​(String s)
        Calls setDisplayName method, but can be chained as in: new SBPropertyDescriptor("value", Bean.class).displayName("Important Value")
        Parameters:
        s - The display name
        Returns:
        this, so the call can be chained
      • description

        public SBPropertyDescriptor description​(String s)
        Calls setShortDescription method, but can be chained as in: new SBPropertyDescriptor("value", Bean.class).description("useful value to set")
        Parameters:
        s - The display name
        Returns:
        this, so the call can be chained
      • multiline

        public SBPropertyDescriptor multiline​(int size)
        Deprecated.
        Calls setMultiLine(size) to create a multiline edit box
        Parameters:
        size - of the edit box
        Returns:
        this, so the call can be chained
        See Also:
        UIHints
      • isDeprecated

        public boolean isDeprecated()
        Return whether the property is deprecated. Deprecated properties do not appear in an operator's property view within Studio and are discarded from StreamBase application files.
        Returns:
        true if the property is deprecated
        Since:
        6.3.5
      • setDeprecated

        public void setDeprecated​(boolean deprecated)
        Set whether the property is deprecated. Deprecated properties do not appear in an operator's property view within Studio and are discarded from StreamBase application files.
        Parameters:
        deprecated - true if the property is deprecated, or false if not
        Since:
        6.3.5
      • isRequired

        public boolean isRequired()
        Return whether the property is required.
        Returns:
        true if the property is required
      • setRequired

        public void setRequired​(boolean required)
        Set whether the property is required.
        Parameters:
        required - true if the property is required, or false if not
      • setUIHints

        public SBPropertyDescriptor setUIHints​(UIHints hints)
        Associate a UIHints object with this property, providing StreamBase Studio with additional layout and display information for this property.
        Parameters:
        hints - a new UIHints object to associate with this property. Must not be null.
        Returns:
        a descriptor for this property
        Since:
        6.1.2
      • getUIHints

        public UIHints getUIHints()
        Retrieves the currently associated UIHints object for this property
        Returns:
        a non-null UIHints
        Since:
        6.1.2
      • setMaskStringDisplay

        public void setMaskStringDisplay​(boolean mask)
        Deprecated.
        For backwards compatibility, this call will set a UIHints (creating one if necessary) for this property with the mask property as given.
        Parameters:
        mask - whether to request character masking for displays of this property
        See Also:
        UIHints
      • getMaskDisplay

        public boolean getMaskDisplay()
        Deprecated.
        use getUIHints() instead
        For backwards compatibility, this call will defer to the associated UIHints (if any).
        Returns:
        whether to mask the characters of this property, if it is a String
      • setMultiLine

        public void setMultiLine​(int size)
        Deprecated.
        For backwards compatibility, this call will set a UIHints (creating one if necessary) for this property with the multi line property as given.
        Parameters:
        size - representing the requested size (in lines) of this property's edit box
        See Also:
        UIHints
      • getMultiLine

        public int getMultiLine()
        Deprecated.
        use getUIHints() instead
        For backwards compatibility, this call will defer to the associated UIHints (if any). Note that in versions prior to 6.1.2, this returned 0 to indicate one line. This method now returns 1 in this case.
        Returns:
        an integer representing the number of requested lines. 0 means not set and implies one line.