Class PropertyType

  • All Implemented Interfaces:
    Serializable

    public class PropertyType
    extends MetadataItem
    A user-defined profile or session property, specifying how possible values are constrained, if the value is multi-valued (a vector of values as opposed to a scalar value).
    See Also:
    Serialized Form
    • Constructor Detail

      • PropertyType

        public PropertyType()
        Instantiates a new Property type.
      • PropertyType

        public PropertyType​(Metadata metadata)
        Instantiates a new Property type with the specified Metadata.
        Parameters:
        metadata - the metadata associated with the specified metadata
    • Method Detail

      • getTarget

        public String getTarget()
        Retrieves the target for this property type, indicating the type of elements this property type is defined for. For example, for property types attached to profiles, target would be "profiles". TODO: deprecated?
        Returns:
        the target for this property type
      • setTarget

        public void setTarget​(String target)
        Sets the target for this property type. TODO: deprecated?
        Parameters:
        target - the target for this property type, indicating the type of elements this property type is defined for
      • getValueTypeId

        public String getValueTypeId()
        Retrieves the identifier of the value type constraining values for properties using this PropertyType.
        Returns:
        the value type identifier associated with values defined by this PropertyType
        See Also:
        ValueType
      • setValueTypeId

        public void setValueTypeId​(String valueTypeId)
        Sets the value type identifier.
        Parameters:
        valueTypeId - the value type identifier
      • getValueType

        public ValueType getValueType()
        Retrieves the value type associated with values defined for properties using this PropertyType.
        Returns:
        the value type associated with values defined for properties using this PropertyType
      • setValueType

        public void setValueType​(ValueType valueType)
        Sets the value type.
        Parameters:
        valueType - the value type associated with values defined for properties using this PropertyType
      • getDefaultValue

        public String getDefaultValue()
        Retrieves the default value defined for property using this PropertyType.
        Returns:
        the default value defined for property using this PropertyType
      • setDefaultValue

        public void setDefaultValue​(String defaultValue)
        Sets the default value that properties using this PropertyType will use if no value is specified explicitly.
        Parameters:
        defaultValue - the default value that properties using this PropertyType will use if no value is specified explicitly
      • getAutomaticMappingsFrom

        public Set<String> getAutomaticMappingsFrom()
        Retrieves the set of JCR properties from which properties of this type would be automatically initialized from. TODO: remove from API?
        Returns:
        the name of JCR properties properties of this type would be automatically initialized from
      • setAutomaticMappingsFrom

        public void setAutomaticMappingsFrom​(Set<String> automaticMappingsFrom)
        Specifies the set of JCR properties from which properties of this type would be automatically initialized from. TODO: remove from API?
        Parameters:
        automaticMappingsFrom - the set of JCR properties from which properties of this type would be automatically initialized from
      • getRank

        public Double getRank()
        Retrieves the rank of this PropertyType for ordering purpose.
        Returns:
        the rank of this PropertyType for ordering purpose
      • setRank

        public void setRank​(Double rank)
        Specifies the rank of this PropertyType for ordering purpose.
        Parameters:
        rank - the rank of this PropertyType for ordering purpose
      • getMergeStrategy

        public String getMergeStrategy()
        Retrieves the identifier of the PropertyMergeStrategyType to be used in case profiles with properties using this PropertyType are being merged.
        Returns:
        the identifier of the PropertyMergeStrategyType to be used in case profiles with properties using this PropertyType are being merged
      • setMergeStrategy

        public void setMergeStrategy​(String mergeStrategy)
        Sets the identifier of the PropertyMergeStrategyType to be used in case profiles with properties using this PropertyType are being merged
        Parameters:
        mergeStrategy - the identifier of the PropertyMergeStrategyType to be used in case profiles with properties using this PropertyType are being merged
      • getDateRanges

        public List<DateRange> getDateRanges()
        Retrieves the date ranges.
        Returns:
        the date ranges
      • setDateRanges

        public void setDateRanges​(List<DateRange> dateRanges)
        Sets the date ranges.
        Parameters:
        dateRanges - the date ranges
      • getNumericRanges

        public List<NumericRange> getNumericRanges()
        Retrieves the numeric ranges.
        Returns:
        the numeric ranges
      • setNumericRanges

        public void setNumericRanges​(List<NumericRange> numericRanges)
        Sets the numeric ranges.
        Parameters:
        numericRanges - the numeric ranges
      • getIpRanges

        public List<IpRange> getIpRanges()
        Retrieves the ip ranges.
        Returns:
        the ip ranges
      • setIpRanges

        public void setIpRanges​(List<IpRange> ipRanges)
        Sets the ip ranges.
        Parameters:
        ipRanges - the ip ranges
      • isMultivalued

        public Boolean isMultivalued()
        Whether properties using this property type are multi-valued.
        Returns:
        true if properties of this type should be multi-valued, false otherwise
      • setMultivalued

        public void setMultivalued​(Boolean multivalued)
        Specifies whether properties using this property type are multi-valued.
        Parameters:
        multivalued - true if properties of this type should be multi-valued, false otherwise
      • isProtected

        public Boolean isProtected()
        Whether properties with this type are marked as protected. Protected properties can be displayed but their value cannot be changed. TODO: rename to readOnly?
        Returns:
        true if properties of this type are protected, false otherwise
      • setProtected

        public void setProtected​(boolean protekted)
        Specifies whether properties with this type are marked as protected.
        Parameters:
        protekted - true if properties of this type are protected, false otherwise
      • setChildPropertyTypes

        public void setChildPropertyTypes​(Set<PropertyType> childPropertyTypes)