Interface IProperty
- All Superinterfaces:
IAttributeConfigurable<IProperty>, Serializable
Describes a property that is part of a value. For example, a record value consists of key-value pairs, each pair is a
property.
- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionList of attributes for this property.Deprecated.getDisplayDescription(Locale locale, IMessageLocalizer localizer, String i18nPrefix) Gets the localized display description for this property, localized to the given locale.getDisplayDescriptionOptional(Locale locale, IMessageLocalizer localizer, String i18nPrefix) Gets the localized display description for this property, localized to the given locale.getDisplayLabel(Locale locale, IMessageLocalizer localizer, String i18nPrefix) Gets the localized display label for this property, localized to the given locale.getDisplayLabelOptional(Locale locale, IMessageLocalizer localizer, String i18nPrefix) Gets the localized display label for this property, localized to the given locale.Gets a simple path descriptor for this property, starting at the root value.Gets the JSON path to access this property, starting at the root value, e.g.intbooleanbooleanWhether this property is a member of a union type (i.e., its parent type isEValueType.UNION).optional()default IPropertywithDefaultDescription(String description) Deprecated.withLogicalDisplayPath(String newPath) Changes thedisplay pathof this property.withUnionMember(boolean unionMember) Changes whether this property is a member of a union type.Methods inherited from interface IAttributeConfigurable
getAttribute, getAttribute, getBooleanAttribute, getBooleanAttribute, getFloatAttribute, getFloatAttribute, getIntegerAttribute, getIntegerAttribute, getStringAttribute, getStringAttribute, withAddedAttribute, withAddedAttributes, withAttributes
-
Method Details
-
getAttributes
List of attributes for this property. May be empty, but never null.- Specified by:
getAttributesin interfaceIAttributeConfigurable<IProperty>- Returns:
- A map of attributes.
-
getBaseType
EValueType getBaseType()- Returns:
- Base type of this property's value.
-
getDefaultValue
Object getDefaultValue()- Returns:
- Default value for this property when no explicit value is provided.
-
getDescriptionI18n
Deprecated.- Returns:
- Description for the property.
-
getDisplayDescription
Gets the localized display description for this property, localized to the given locale. Returns a default if no description is set.- Parameters:
locale- The locale to localize to.localizer- The message localizer to use.i18nPrefix- The i18n prefix to prepend to i18n keys.- Returns:
- The localized display description.
-
getDisplayDescriptionOptional
Gets the localized display description for this property, localized to the given locale.- Parameters:
locale- The locale to localize to.localizer- The message localizer to use.i18nPrefix- The i18n prefix to prepend to i18n keys.- Returns:
- The localized display description, or empty if no description is set.
-
getDisplayLabel
Gets the localized display label for this property, localized to the given locale. Returns a default when no label is set.- Parameters:
locale- The locale to localize to.localizer- The message localizer to use.i18nPrefix- The i18n prefix to prepend to i18n keys.- Returns:
- The localized display label.
-
getDisplayLabelOptional
Gets the localized display label for this property, localized to the given locale.- Parameters:
locale- The locale to localize to.localizer- The message localizer to use.i18nPrefix- The i18n prefix to prepend to i18n keys.- Returns:
- The localized display label, or empty if no label is set.
-
getDisplayPath
String getDisplayPath()Gets a simple path descriptor for this property, starting at the root value. This is similar to the JSON path, but with a more user-friendly syntax. Array indices are represented as[i], map keys as['key'].For programmatic access, use
getJsonPath().Example: If the JSON path to access all elements is
$.headers.*.*, the display path is.headers['key'][i].- Returns:
- The display path for this property.
-
getFullType
String getFullType()- Returns:
- Full type of this property's value.
-
getJsonPath
String getJsonPath()Gets the JSON path to access this property, starting at the root value, e.g.$.orientation[1].- Returns:
- JSON path to access this property, starting at the root value.
-
getLogicalDisplayPath
String getLogicalDisplayPath() -
getNestingLevel
int getNestingLevel()- Returns:
- The nesting level of this property relative to the root value.
-
isOptional
boolean isOptional()- Returns:
- Whether this property must be present in the parent property. For example, a property of a record may be optional.
-
isUnionMember
boolean isUnionMember()Whether this property is a member of a union type (i.e., its parent type isEValueType.UNION).- Returns:
- True if this property is a member of a union type, false otherwise.
-
optional
IProperty optional()- Returns:
- A new property instance marked as optional
-
withDefaultDescription
Deprecated.- Parameters:
description- New description for this property, may be either a localized message or an I18N key.- Returns:
- A new property instance with the given description.
-
withLogicalDisplayPath
Changes thedisplay pathof this property. Returns a new property instance with the changed display path.- Parameters:
newPath- New display path for this property.- Returns:
- A new property instance with the given display path.
-
withUnionMember
Changes whether this property is a member of a union type. Returns a new property instance with the changed value.- Parameters:
unionMember- New value for whether this property is a member of a union type.- Returns:
- A new property instance with the given value.
-
getAttributes()orgetDisplayDescription(Locale, IMessageLocalizer, String).