Package wt.eff.format
Class AlphaNumericUnitEffFormat
java.lang.Object
wt.eff.format.AbstractEffFormat
wt.eff.format.UnitEffFormat
wt.eff.format.AlphaNumericUnitEffFormat
- All Implemented Interfaces:
Externalizable,Serializable,EffFormat
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:
(*) 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
This format accepts the following configurable parameters:
- length
- Description: Enforces effectivity statements adhering to this format, to have a fixed length. This parameter represents the total length of the effectivity range values (including optional prefix and suffix). This format supports a maximum length of 18 digits for the numerical (ordinal) part of the effectivity range value. Prefixes and suffixes can be of any (fixed) length.
- Type: Positive Integer (Number), less than 18.
- Special Values: None
- Required: Yes
- Default: N/A
- Examples: 3, 6, 8.
- prefix
- Description: If specified, effectivity statements must have this prefix (can contain wildcards). It can consist of any character (alphabetic, numeric or special characters, except white space characters). Although wildcards are treated differently and represent a set of characters that match against them.
- Type: String.
- Special Values: "" representing an empty (non-existing) prefix
- Supported Wildcards:
- '_' : Represents a letter (a-z, A-Z) or numeric character (0-9)
- '^' : Represents a letter (a-z, A-Z)
- '#' : Represents a numeric character (0-9)
- Required: No (If not specified, range values will not be verified for any prefixes)
- Default: ""
- Examples: "ABC", "A_C", "###", "___"
- suffix
- Description: If specified, effectivity statements must have this suffix (can contain wildcards). It can consist of any character (alphabetic, numeric or special characters, except white space characters). Although wildcards are treated differently and represent a set of characters that match against them.
- Type: String.
- Special Values: "" representing an empty (non-existing) suffix
- Supported Wildcards:
- '_' : Represents a letter (a-z, A-Z) or numeric character (0-9)
- '^' : Represents a letter (a-z, A-Z)
- '#' : Represents a numeric character (0-9)
- Required: No (If not specified, range values will not be verified for any suffixes)
- Default: ""
- Examples: "ABC", "A_C", "###", "___"
- An (optional) masked* prefix.
- 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.
- An (optional) masked* suffix.
(*) 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:
-
Method Summary
Modifier and TypeMethodDescription
Supported API: trueintcompareRangeValues(String leftValue, String rightValue, EffState state, Map<String, String> formatParams)
Supported API: truegetDisplayDescription(Locale locale)
Supported API: truegetDisplayName(Locale locale)
Supported API: trueboolean
Supported API: truevalidateRangeValue(String rangeValue, EffState state, Map<String, String> formatParams, boolean isStartRange)
Supported API: trueMethods inherited from class wt.eff.format.AbstractEffFormat
toString
-
Method Details
-
getDisplayName
Supported API: true- Specified by:
getDisplayNamein interfaceEffFormat- Parameters:
locale-- Returns:
- String
- See Also:
-
wt.eff.format#getDisplayDescription()
-
getDisplayDescription
Supported API: true- Specified by:
getDisplayDescriptionin interfaceEffFormat- 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:
validateRangeValuein interfaceEffFormat- 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:
compareRangeValuesin interfaceEffFormat- Parameters:
leftValue-rightValue-state-formatParams-- Returns:
- int
- Throws:
EffFormatException
-
supportsRangeArithmetic
public boolean supportsRangeArithmetic()
Supported API: true- Specified by:
supportsRangeArithmeticin interfaceEffFormat- Overrides:
supportsRangeArithmeticin classAbstractEffFormat- Returns:
- boolean
-
addToRangeValue
public String addToRangeValue(String rangeValue, int amount, EffState state, Map<String, String> formatParams) throws EffFormatException
Supported API: true- Specified by:
addToRangeValuein interfaceEffFormat- Overrides:
addToRangeValuein classAbstractEffFormat- Parameters:
rangeValue-amount-state-formatParams-- Returns:
- String
- Throws:
EffFormatException- See Also:
-