Package wt.eff.format

Class DefaultUnitEffFormat

All Implemented Interfaces:
Externalizable, Serializable, EffFormat

public class DefaultUnitEffFormat extends UnitEffFormat implements Externalizable
This format represents the default format for unit effectivity statements if no other effectivity format is supplied and thus acts like a placeholder. Since it is unaware of the actual format of effectivity statements, it provides rudimentary implementations of the various format-related operations.

This format accepts the following configurable parameters:
  • length
    • Description: Enforces effectivity statements adhering to this format, to have a fixed length.
    • Type: Positive Integer (Number).
    • Special Values: 0. This value states that the effectivity range values do not have a fixed length.
    • Required: No (If not specified, range values can have an arbitrary length)
    • Default: 0
    • Examples: 3, 6, 8.
  • contains-whitespace
    • Description: Specifies whether effectivity range values contain space(s).
    • Type: Boolean.
    • Required: No (If not specified range values can contain space characters)
    • Default: true. Allows spaces to be part of the effectivity range values.
    • Other values: false. Does not allow spaces to be part of effectivity range values.
Effectivity formats in this package are driven by parameters that dictate operations they support. See the Windchill Customizer's Guide for explanation on how to specify the format a traceable business object supports along with the parameters it accepts.
The only parameter this format supports is the length of effectivity range values.
Use this effectivity format, if you do not intend to take advantage of any of the format-related capabilities like range value validation, comparisons and range arithmetic.

Supported API: true

Extendable: true
Since:
Windchill 9.0
See Also:
  • Method Details

    • getDisplayName

      public String getDisplayName(Locale locale)


      Supported API: true
      Specified by:
      getDisplayName in interface EffFormat
      Parameters:
      locale -
      Returns:
      String
      See Also:
      • wt.eff.format#getDisplayDescription()
    • getDisplayDescription

      public String getDisplayDescription(Locale locale)


      Supported API: true
      Specified by:
      getDisplayDescription in interface EffFormat
      Parameters:
      locale -
      Returns:
      String
      See Also:
      • wt.eff.format#getDisplayName()
    • validateRangeValue

      public String validateRangeValue(String rangeValue, EffState state, Map<String,String> formatParams, boolean isStartRange)


      Supported API: true
      Specified by:
      validateRangeValue in interface EffFormat
      Parameters:
      rangeValue -
      state -
      formatParams -
      isStartRange -
      Returns:
      String
    • compareRangeValues

      public int compareRangeValues(String leftValue, String rightValue, EffState state, Map<String,String> formatParams) throws EffFormatException
      This operation uses the java.lang.String's compareTo() method for implementing comparisons, which performs a lexicographical comparison based on the Unicode value of each character in the strings. See the description of String.compareTo(String) for more details of the comparison algorithm.

      Supported API: true
      Specified by:
      compareRangeValues in interface EffFormat
      Parameters:
      leftValue -
      rightValue -
      state -
      formatParams -
      Returns:
      int
      Throws:
      EffFormatException
      See Also: