Class Property


  • @StableMinor(version="17.0",
                 sinceVersion="5.0")
    public class Property
    extends java.lang.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: 26587 $ $Date: 2024-08-26 21:09:17 -0300 (Mon, 26 Aug 2024) $
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getDefaultValues()
      Returns the list of default values stored for this property.
      java.lang.String getId()
      Returns the identifier of this property.
      PropertyInheritMode getInheritMode()
      Returns the inherit mode for this property.
      java.lang.String getName()
      Returns the name of this property.
      PropertyBag getPropertyBag()
      Returns the parent property bag of this property.
      java.util.List<java.lang.String> getValues()
      Returns the values for this property, applying all property values evaluation rules.
      boolean isKeepDefaultValuesWhenUpdatingFromChannelTemplate()
      Returns if the default values of this property are to be kept as is when updating from a channel template.
      boolean isPrivate()
      Returns whether the property is private or not.
      void setDefaultValues​(java.util.List<java.lang.String> values)
      Sets the default values for this property.
      void setInheritMode​(PropertyInheritMode inheritMode)
      Sets the inherit mode for this property.
      void setKeepDefaultValuesWhenUpdatingFromChannelTemplate​(boolean keepDefaultValuesWhenUpdatingFromChannelTemplate)
      Sets if the default values of this property are to be kept as is when updating from a channel template.
      void setPrivate​(boolean isPrivate)
      Specifies if this property is private or public.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getId

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

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

        public java.util.List<java.lang.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​(java.util.List<java.lang.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 java.util.List<java.lang.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