Interface IPropertyDefn

  • All Superinterfaces:
    org.eclipse.birt.report.model.metadata.IContainerDefn
    All Known Subinterfaces:
    IElementPropertyDefn
    All Known Implementing Classes:
    org.eclipse.birt.report.model.metadata.ElementPropertyDefn, org.eclipse.birt.report.model.metadata.PropertyDefn, UserPropertyDefn

    public interface IPropertyDefn
    extends org.eclipse.birt.report.model.metadata.IContainerDefn
    Base Interface for both element property, extension model property and structure member definitions.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int COMMERCIAL_PROPERTY
      Type code for a property defined for commercial element implementation.
      static int EXTENSION_MODEL_PROPERTY
      Type code for a property defined by an extension implementation of ReportItemExtensionPoint.
      static int EXTENSION_PROPERTY
      Type code for a property defined in XML file with the ReportItemExtensionPoint.
      static int ODA_PROPERTY
      Type code for a property defined by a ODA extension.
      static int SYSTEM_PROPERTY
      Type code for a system property.
      static int USER_PROPERTY
      Type code for a user property.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean allowExpression()
      Checks whether the expression can be the value of this property.
      IChoiceSet getAllowedChoices()
      Returns the allowed choices for this property.
      IChoiceSet getAllowedUnits()
      Returns the allowed units for this property.
      IChoiceSet getChoices()
      Gets the list of choices for the property.
      java.lang.String getContext()
      Return the context for a method or expression.
      java.lang.Object getDefault()
      Returns the default value for the property.
      java.lang.String getDisplayNameID()
      Returns the message id for the display name.
      IStructureDefn getStructDefn()
      Returns the structure definition for this value.
      IElementDefn getTargetElementType()
      Return the element type associated with this property.
      int getTypeCode()
      Returns the property type.
      int getValueType()
      Returns the type of this value.
      boolean hasChoices()
      Checks if a property has a set of choices whatever choice is choice, extended choice or user defined choice.
      boolean isEncryptable()
      Returns whether this property should be encrypted.
      boolean isList()
      Indicates whether this property is a list.
      • Methods inherited from interface org.eclipse.birt.report.model.metadata.IContainerDefn

        canContain, canContain, getAllowedElements, getAllowedElements, getDisplayName, getName, getNameConfig
    • Field Detail

      • SYSTEM_PROPERTY

        static final int SYSTEM_PROPERTY
        Type code for a system property.
        See Also:
        Constant Field Values
      • USER_PROPERTY

        static final int USER_PROPERTY
        Type code for a user property.
        See Also:
        Constant Field Values
      • EXTENSION_PROPERTY

        static final int EXTENSION_PROPERTY
        Type code for a property defined in XML file with the ReportItemExtensionPoint.
        See Also:
        Constant Field Values
      • EXTENSION_MODEL_PROPERTY

        static final int EXTENSION_MODEL_PROPERTY
        Type code for a property defined by an extension implementation of ReportItemExtensionPoint.
        See Also:
        Constant Field Values
      • ODA_PROPERTY

        static final int ODA_PROPERTY
        Type code for a property defined by a ODA extension.
        See Also:
        Constant Field Values
      • COMMERCIAL_PROPERTY

        static final int COMMERCIAL_PROPERTY
        Type code for a property defined for commercial element implementation.
        See Also:
        Constant Field Values
    • Method Detail

      • isList

        boolean isList()
        Indicates whether this property is a list. It is useful only when the property type is a structure type.
        Returns:
        whether the property is a list or not.
      • getTypeCode

        int getTypeCode()
        Returns the property type. See the list in PropertyType.
        Returns:
        he property type code
      • getDisplayNameID

        java.lang.String getDisplayNameID()
        Returns the message id for the display name.
        Returns:
        The display name message ID.
      • getChoices

        IChoiceSet getChoices()
        Gets the list of choices for the property.
        Returns:
        the list of choices
      • hasChoices

        boolean hasChoices()
        Checks if a property has a set of choices whatever choice is choice, extended choice or user defined choice.
        Returns:
        true if it has, otherwise false.
      • getStructDefn

        IStructureDefn getStructDefn()
        Returns the structure definition for this value.
        Returns:
        the structure definition, or null if this value is not a list of structures
      • getDefault

        java.lang.Object getDefault()
        Returns the default value for the property.
        Returns:
        The default value.
      • getTargetElementType

        IElementDefn getTargetElementType()
        Return the element type associated with this property.
        Returns:
        the element type associated with the property
      • getAllowedChoices

        IChoiceSet getAllowedChoices()
        Returns the allowed choices for this property. It contains allowed choices for a choice type.

        If a property has not defined the restriction, then whole set will be returned.

        Returns:
        Returns the allowed choices of this property.
      • getAllowedUnits

        IChoiceSet getAllowedUnits()
        Returns the allowed units for this property. It contains an allowed units set for a dimension type. Only the dimension type supports allowed units feature.

        If a property has not defined the restriction, then whole set will be returned.

        Returns:
        Returns the allowed units of this property.
      • isEncryptable

        boolean isEncryptable()
        Returns whether this property should be encrypted.
        Returns:
        true if this property should be encrypted.
      • getValueType

        int getValueType()
        Returns the type of this value. The return can be one of the following constants:

        • SYSTEM_PROPERTY
        • USER_PROPERTY
        • STRUCT_PROPERTY
        • EXTENSION_PROPERTY
        Returns:
        the type of this definition
      • getContext

        java.lang.String getContext()
        Return the context for a method or expression. If the property type is not method/expression, the return value is null.
        Returns:
        the expression or method context
      • allowExpression

        boolean allowExpression()
        Checks whether the expression can be the value of this property.
        Returns:
        true if the expression value is valid. Otherwise false.