com.mentata.sg8
Class SG8PasswordAttribute

java.lang.Object
  extended bycom.mentata.l3d.L3DAttribute
      extended bycom.mentata.sg8.SG8StringAttribute
          extended bycom.mentata.sg8.SG8PasswordAttribute
All Implemented Interfaces:
Comparator, SG8Attribute

public class SG8PasswordAttribute
extends SG8StringAttribute

An attribute representing a password for use with SG8 objects. This attribute type suppresses all displayable output of values. Instances return duplicate password text fields as update form elements, validating a new value by ensuring a match.

Since:
0.7
Author:
Jon Roberts

Field Summary
 
Fields inherited from interface com.mentata.sg8.SG8Attribute
TEXT_RESOURCES
 
Constructor Summary
SG8PasswordAttribute()
           
 
Method Summary
 String[] getHTMLValues()
          Returns an indication that the attribute values are not for display.
 String[] getShortValues()
          Returns an indication that the attribute values are not for display.
 String getUpdateHTML()
          Returns HTML form elements for modifying the attribute.
 boolean processUpdateHTML(HttpServletRequest req)
          Reads and processes attribute changes from relevant HTML request form parameters.
 
Methods inherited from class com.mentata.sg8.SG8StringAttribute
getHyperlink, getSeparator, getSG8Object, isAugmenting, isHTMLExceeded, setAugmenting, setHTMLThreshold, setSeparator
 
Methods inherited from class com.mentata.l3d.L3DAttribute
addValue, compare, getAttribute, getBind, getContext, getLabel, getLengthThreshold, getName, getObject, getObject, getPrerequisites, getSize, getThreshold, getValues, initialize, isBound, isExceeded, isGenerated, isLengthExceeded, isMultivalue, isRequired, removeValue, same, setGenerated, setLabel, setLengthThreshold, setPrerequisites, setThreshold, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

SG8PasswordAttribute

public SG8PasswordAttribute()
Method Detail

getShortValues

public String[] getShortValues()
Returns an indication that the attribute values are not for display.

Overrides:
getShortValues in class L3DAttribute
Returns:
a single value array indicating passwords can not be displayed

getHTMLValues

public String[] getHTMLValues()
Returns an indication that the attribute values are not for display.

Specified by:
getHTMLValues in interface SG8Attribute
Overrides:
getHTMLValues in class SG8StringAttribute
Returns:
a single value array indicating passwords can not be displayed

getUpdateHTML

public String getUpdateHTML()
                     throws SG8Exception
Returns HTML form elements for modifying the attribute.

Specified by:
getUpdateHTML in interface SG8Attribute
Overrides:
getUpdateHTML in class SG8StringAttribute
Returns:
the HTML modification form elements
Throws:
SG8Exception - if the attribute is generated

processUpdateHTML

public boolean processUpdateHTML(HttpServletRequest req)
                          throws SG8Exception
Reads and processes attribute changes from relevant HTML request form parameters.

Specified by:
processUpdateHTML in interface SG8Attribute
Overrides:
processUpdateHTML in class SG8StringAttribute
Parameters:
req - a servlet request
Returns:
whether the attribute values changed
Throws:
SG8Exception - if form values are inappropriate or the attribute is generated