wt.eff.format
Class DefaultUnitEffFormat

java.lang.Object
  extended by wt.eff.format.AbstractEffFormat
      extended by wt.eff.format.UnitEffFormat
          extended by wt.eff.format.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:

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:
UnitEffFormat, EffFormat, EffFormatService, Serialized Form

Method Summary
 int compareRangeValues(String leftValue, String rightValue, EffState state, Map<String,String> formatParams)
          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.
 String getDisplayDescription(Locale locale)
          

Supported API: true
 String getDisplayName(Locale locale)
          

Supported API: true
 String validateRangeValue(String rangeValue, EffState state, Map<String,String> formatParams, boolean isStartRange)
          

Supported API: true
 
Methods inherited from class wt.eff.format.AbstractEffFormat
addToRangeValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

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:
String.compareTo(String)