Class Property


  • @StableMinor(version="14.1",
                 sinceVersion="5.0")
    public class Property
    extends Object
    Represents a property of a PropertyBag.

    A property has a name, a value that may be a string or array of strings, and a flag that indicates whether the property is read-only or not. A read-only property may not be personalized.

    Since:
    5.0.0
    Version:
    $Revision: 24683 $ $Date: 2021-08-23 18:55:58 -0300 (Mon, 23 Aug 2021) $
    • Method Detail

      • getId

        public String getId()
        Returns the identifier of this property.
        Returns:
        identifier of this property.
        Since:
        5.0.0
      • getName

        public String getName()
        Returns the name of this property.
        Returns:
        the name of this property.
        Since:
        5.0.0
      • getDefaultValues

        public List<String> getDefaultValues()
        Returns the list of default values stored for this property. Does not take inheritance into account. If this property is inheriting its default values, null is returned.
        Returns:
        the list of default values. Returns an empty list if this property is set to have no default values, or returns null if this property inherits its default values from a parent property bag.
        Since:
        5.0.0
      • setDefaultValues

        public void setDefaultValues​(List<String> values)
        Sets the default values for this property.
        Parameters:
        values - the list of values to set, an empty list to set this property to have explicitly no value, or null to indicate this property will inherit its default values.
        Since:
        5.0.0
      • getPropertyBag

        public PropertyBag getPropertyBag()
        Returns the parent property bag of this property.
        Returns:
        the parent property bag.
        Since:
        5.0.0
      • getValues

        public List<String> getValues()
        Returns the values for this property, applying all property values evaluation rules.
        Returns:
        the values, or an empty list if this property has no value.
        Since:
        5.0.0
      • setPrivate

        public void setPrivate​(boolean isPrivate)
        Specifies if this property is private or public. By default private properties should not be directly exposed to the end user.
        Parameters:
        isPrivate - true if the property is private.
        Since:
        5.0.0
      • isPrivate

        public boolean isPrivate()
        Returns whether the property is private or not.
        Returns:
        true if the property is private.
        Since:
        5.0.0
      • getInheritMode

        public PropertyInheritMode getInheritMode()
        Returns the inherit mode for this property.
        Returns:
        the inherit mode for this property.
        Since:
        7.0.0
        See Also:
        PropertyInheritMode
      • setInheritMode

        public void setInheritMode​(PropertyInheritMode inheritMode)
        Sets the inherit mode for this property.
        Parameters:
        inheritMode - the inherit mode for this property.
        Since:
        7.0.0
        See Also:
        PropertyInheritMode
      • isKeepDefaultValuesWhenUpdatingFromChannelTemplate

        public boolean isKeepDefaultValuesWhenUpdatingFromChannelTemplate()
        Returns if the default values of this property are to be kept as is when updating from a channel template.
        Returns:
        true if they are to be kept, false otherwise.
        Since:
        14.0.0
      • setKeepDefaultValuesWhenUpdatingFromChannelTemplate

        public void setKeepDefaultValuesWhenUpdatingFromChannelTemplate​(boolean keepDefaultValuesWhenUpdatingFromChannelTemplate)
        Sets if the default values of this property are to be kept as is when updating from a channel template.
        Parameters:
        keep - true if they are to be kept, false otherwise.
        Since:
        14.0.0