ariba.util.formatter
Class SecureStringFormatter

java.lang.Object
  extended by ariba.util.formatter.Formatter
      extended by ariba.util.formatter.StringFormatter
          extended by ariba.util.formatter.SecureStringFormatter
All Implemented Interfaces:
Compare, StringParser

public class SecureStringFormatter
extends StringFormatter

Formats strings such that certain characters are "blocked out". For example, the string "1234" can be formatted to display "XX34". This formatter uses a format string to format string values. This format string supports the following syntax: D - display a character as is X - replaces the character with the cross out character The string value is right justified relative to the format. Any excess characters are trimmed away. If the format string is longer than the value, then the value will be padded by the format string's characters. So, for example, if the format "XXD" with blockoutChar "*" is applied to "12345", the user will see "**5".


Field Summary
static java.lang.String ClassName
          The class name of this formatter.
 
Fields inherited from interface ariba.util.core.Compare
EqualTo, GreaterThan, LessThan
 
Constructor Summary
SecureStringFormatter()
          Creates a SecureStringFormatter.
 
Method Summary
static java.lang.String getStringValue(java.lang.Object value, java.lang.String format, java.lang.String blockoutString)
          Returns a string formatted according to the format and blockoutString parameters.
 
Methods inherited from class ariba.util.formatter.StringFormatter
compareStrings, compareStrings, getValue
 
Methods inherited from class ariba.util.formatter.Formatter
canFormatNulls, compare, compare, equal, equal, getFormat, getFormat, getFormatterClassForType, getFormatterForObject, getFormatterForType, getLocale, getStringValue, getStringValue, getValue, handlesNulls, isBidirectional, makeParseException, makeParseException, makeParseException, makeParseExceptionMessage, makeParseExceptionMessage, objectsAreEqual, objectsAreEqual, parse, parse, parseString, parseString, quickCompare, quickCompare, quickCompareValue, registerFormatter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ClassName

public static final java.lang.String ClassName
The class name of this formatter.

See Also:
Constant Field Values
Constructor Detail

SecureStringFormatter

public SecureStringFormatter()
Creates a SecureStringFormatter.

Method Detail

getStringValue

public static java.lang.String getStringValue(java.lang.Object value,
                                              java.lang.String format,
                                              java.lang.String blockoutString)
Returns a string formatted according to the format and blockoutString parameters.

Parameters:
value - The value to format.
format - The format string that controls which characters of the value get blocked out.
blockoutString - A string of length 1 that contains the If the blockoutString is null, then we'll use the default blockout character in the string resources.
Returns:
Returns a string formatted according to the format and blockoutString parameters.


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.