wt.eff.format
Class AlphaNumericUnitEffFormat

java.lang.Object
  extended by wt.eff.format.AbstractEffFormat
      extended by wt.eff.format.UnitEffFormat
          extended by wt.eff.format.AlphaNumericUnitEffFormat
All Implemented Interfaces:
Externalizable, Serializable, EffFormat

public class AlphaNumericUnitEffFormat
extends UnitEffFormat
implements Externalizable

This format supports fixed-length effectivity statements with an optional prefix, a fixed-length numeric portion (with a max. length of 18) and an optional suffix. The prefix and suffix can contain wildcards along with any other characters - including letters, digits, special characters like dashes and so on.
This format accepts the following configurable parameters:

Thus, an effecitivity statement that adheres to this format consists of:
  1. An (optional) masked* prefix.
  2. A fixed-length numerical portion, that represents the ordinal value. This value is used by this format for comparisons of effectivity range values and range arithmetic. See the JavaDoc's for compareRangeValues() and supportsRangeArithmetic() for more information on these use cases.
  3. An (optional) masked* suffix.
Note: It is optional to specify a prefix or a suffix for this format. The only required parameter to this format is the length. If no prefix or suffix is specified, and only the length specified, the format considers that the entire range value consists of numerical digits (fixed-length) and behaves like the Numeric Unit Effectivity Format. Both formats exist to provide flexibility in the decision of choosing an effectivity format.

(*) This format supports wildcards as part of the prefix and suffix specification. This allows users to specify a wildcard in the specification of the prefix or suffix, which is matched with certain categories of characters at runtime.
Effectivity formats in this package are driven by parameters that dictate operations they support. See the Customizer's Guide for explanation on how to specify the format a traceable business object supports along with the parameters it accepts.
Also, consult the Customizer's Guide for details on how to specify the masked character positions. As an example, the masked string "##GC-^" represents any of following effectivity range values:
98GC-A
67GC-A
76GC-D
76GC-Y



Supported API: true

Extendable: true

Since:
Windchill 9.0
See Also:
UnitEffFormat, EffFormat, EffFormatService, Serialized Form

Method Summary
 String addToRangeValue(String rangeValue, int amount, EffState state, Map<String,String> formatParams)
          

Supported API: true
 int compareRangeValues(String leftValue, String rightValue, EffState state, Map<String,String> formatParams)
          

Supported API: true
 String getDisplayDescription(Locale locale)
          

Supported API: true
 String getDisplayName(Locale locale)
          

Supported API: true
 boolean supportsRangeArithmetic()
          

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
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


Supported API: true

Specified by:
compareRangeValues in interface EffFormat
Parameters:
leftValue -
rightValue -
state -
formatParams -
Returns:
int
Throws:
EffFormatException

supportsRangeArithmetic

public boolean supportsRangeArithmetic()


Supported API: true

Specified by:
supportsRangeArithmetic in interface EffFormat
Returns:
boolean
See Also:
#addToRangeValue(String, int, EffState, java.util.Map{@literal })

addToRangeValue

public String addToRangeValue(String rangeValue,
                              int amount,
                              EffState state,
                              Map<String,String> formatParams)
                       throws EffFormatException


Supported API: true

Specified by:
addToRangeValue in interface EffFormat
Overrides:
addToRangeValue in class AbstractEffFormat
Parameters:
rangeValue -
amount -
state -
formatParams -
Returns:
String
Throws:
EffFormatException
See Also:
EffFormat.supportsRangeArithmetic()