ilog.rules.brl.value.descriptor

Class IlrDecoratedValueDescriptor

  • All Implemented Interfaces:
    IlrDerivedValueDescriptor, IlrValueDescriptor, ilog.rules.brl.value.descriptor.IlrValueDescriptorExtension


    public class IlrDecoratedValueDescriptor
    extends IlrAbstractValueDescriptor
    implements IlrDerivedValueDescriptor
    Provides a mechanism for decorating an existing value descriptor with a prefix and/or a suffix. This prefix or suffix is set on the parsable representation of the referenced value descriptor. The prefix and the suffix are defined by default by custom properties on the associated BOM class:
    • valueDescriptor = <fully-qualified name of the BOM class>#Decorated(<fully-qualified name of target BOM class>)
    And in the business rule language concrete syntax properties file :
    • DecoratedValueDescriptor.prefix = <text>
    • DecoratedValueDescriptor.suffix = <text>
    • Field Detail

      • DECORATED_VALUE_DESCRIPTOR_SUFFIX

        public static final java.lang.String DECORATED_VALUE_DESCRIPTOR_SUFFIX
        See Also:
        Constant Field Values
      • DECORATED_VALUE_DESCRIPTOR_PREFIX

        public static final java.lang.String DECORATED_VALUE_DESCRIPTOR_PREFIX
        See Also:
        Constant Field Values
    • Method Detail

      • getPrefix

        public java.lang.String getPrefix()
        Returns the prefix of the decorated value.
        Returns:
        The prefix of the decorated value.
      • getSuffix

        public java.lang.String getSuffix()
        Returns the suffix of the decorated value.
        Returns:
        The suffix of the decorated value.
      • getValue

        public java.lang.Object getValue(java.lang.String persistentText)
        Description copied from interface: IlrValueDescriptor
        Returns an object that represents the value (for example, a date returns an instance of java.util.Date).
        Specified by:
        getValue in interface IlrValueDescriptor
        Parameters:
        persistentText - The value (not localized).
      • getValue

        public java.lang.Object getValue(java.lang.String text,
                                IlrBRLDefinition definition)
        Description copied from interface: IlrValueDescriptor
        Returns an object that represents the value (for example, a date returns an instance of java.util.Date).
        Specified by:
        getValue in interface IlrValueDescriptor
        Parameters:
        text - The localized text (in a form that matches the parsable representation).
        definition - The business rule language definition.
      • getValue

        public java.lang.Object getValue(java.lang.String text,
                                IlrBRLDefinition definition,
                                boolean strict)
        Description copied from class: IlrAbstractValueDescriptor
        Returns an object that represents a string value. This default implementation calls IlrValueDescriptor.getValue(text, definition). If strict is set to true, concrete subclasses of IlrAbstractValueDescriptor can implement strict parsing for text if applicable.
        Overrides:
        getValue in class IlrAbstractValueDescriptor
        Parameters:
        text - Localized text in a form that matches a parsable representation. For example, a date returns an instance of java.util.Date.
        definition - The business rule language definition.
        strict - Set to true so strict parsing of text is performed.
        Returns:
        The value resulting from parsing text.
        See Also:
        IlrValueDescriptor.getValue(java.lang.String text, IlrBRLDefinition definition)
      • getPersistentText

        public java.lang.String getPersistentText(java.lang.Object value)
        Description copied from interface: IlrValueDescriptor
        Returns the non-localized text that represents the value.
        Specified by:
        getPersistentText in interface IlrValueDescriptor
        Parameters:
        value - The value.
      • getLocalizedText

        public java.lang.String getLocalizedText(java.lang.Object value,
                                        IlrBRLDefinition definition)
        Description copied from interface: IlrValueDescriptor
        Returns the localized text that represents the value in a locale.
        Specified by:
        getLocalizedText in interface IlrValueDescriptor
        Parameters:
        value - The value.
        definition - The business rule language definition.

© Copyright IBM Corp. 1987, 2017