Class PropertyDefinition

java.lang.Object
org.eclipse.birt.report.model.api.extension.PropertyDefinition
All Implemented Interfaces:
IPropertyDefinition

public abstract class PropertyDefinition extends Object implements IPropertyDefinition
Extension adapter class for the IPropertyDefintion. By default, the extension property definition has no resource key for the display name, no choices, no members, no default value, is not a list and is not in any property group of the extension. At the same time, the subclasses should override the some getters about the required name of the property, required display name key of the property and the required type,which is one of those defined in PropertyType.
  • Constructor Details

    • PropertyDefinition

      public PropertyDefinition()
  • Method Details

    • getGroupNameID

      public String getGroupNameID()
      Description copied from interface: IPropertyDefinition
      Returns the resource key for display name of the property group. Property groups are used in the generic property sheet to organize properties. If the resource key is null, then no group is used.
      Specified by:
      getGroupNameID in interface IPropertyDefinition
      Returns:
      the optional resource key for property group name
    • getName

      public abstract String getName()
      Description copied from interface: IPropertyDefinition
      Returns the internal name of the property. This is a non-localized, unique name used in the get/set property methods. It is required. BIRT encourages names that match the BIRT property syntax: propName, so that the properties are easy to use in scripts.
      Specified by:
      getName in interface IPropertyDefinition
      Returns:
      the internal property name
    • getDisplayNameID

      public String getDisplayNameID()
      Description copied from interface: IPropertyDefinition
      Returns the resource key for the localized display name of the property. This is the name that appears in the property sheet UI. It is optional. If omitted, the internal name will be displayed instead.
      Specified by:
      getDisplayNameID in interface IPropertyDefinition
      Returns:
      the optional resource key for the localized display name of the property
    • getType

      public abstract int getType()
      Description copied from interface: IPropertyDefinition
      Returns the property type using one of the types defined in the PropertyTypeclass. It is required. If the model does not provide a suitable type, then either map the property to one of the supported types, or don't expose it though the generic property mechanism.
      Specified by:
      getType in interface IPropertyDefinition
      Returns:
      the property type using one of the model's types
    • isList

      public boolean isList()
      Description copied from interface: IPropertyDefinition
      Returns whether this property represents a list of properties instead of a single property.
      Specified by:
      isList in interface IPropertyDefinition
      Returns:
      true if the property is a list, false if not
    • getChoices

      public List<IChoiceDefinition> getChoices()
      Description copied from interface: IPropertyDefinition
      Returns a list of choices if the property is a choice (type is CHOICE_TYPE). Should return null for non-choice properties.
      Specified by:
      getChoices in interface IPropertyDefinition
      Returns:
      a list of IChoiceDefinitionobjects
    • getMethodInfo

      public IMethodInfo getMethodInfo()
      Description copied from interface: IPropertyDefinition
      Returns the method information of this property.
      Specified by:
      getMethodInfo in interface IPropertyDefinition
      Returns:
      the method information of this property. Return null, if this property is not a method property.
    • getDefaultValue

      public Object getDefaultValue()
      Description copied from interface: IPropertyDefinition
      Returns the default value for the property. Needed only if the element supports styles or inheritance. Not needed otherwise. No default is needed for a structure or list property.
      Specified by:
      getDefaultValue in interface IPropertyDefinition
      Returns:
      the default value of the property
    • getMembers

      public List<IPropertyDefinition> getMembers()
      Description copied from interface: IPropertyDefinition
      Returns a list of member definitions if the property is a structure (type is TBD). Should return null for non-structure properties.
      Specified by:
      getMembers in interface IPropertyDefinition
      Returns:
      the list of members as a collection of IPropertyDefinition objects
    • isReadOnly

      public boolean isReadOnly()
      Description copied from interface: IPropertyDefinition
      Determines whether this property is read-only or not. If this property is read only and can not been edited, return true; otherwise return false.
      Specified by:
      isReadOnly in interface IPropertyDefinition
      Returns:
      true if this property is read-only, otherwise false
    • isVisible

      public boolean isVisible()
      Description copied from interface: IPropertyDefinition
      Determines whether this property is visible in property viewer. If this property is visible in the property viewer, return true; otherwise false.
      Specified by:
      isVisible in interface IPropertyDefinition
      Returns:
      true if this property is visible in the property viewer, otherwise false