net.sf.springlayout.web.controller.propertyeditor
Class AbstractSecurityAwarePropertyEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by net.sf.springlayout.web.controller.propertyeditor.AbstractSecurityAwarePropertyEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public abstract class AbstractSecurityAwarePropertyEditor
extends java.beans.PropertyEditorSupport

Abstract class for creating security or mode aware property editors. To be used in conjuntion with PageAccessResolver's to provide correct values for field read / edit modes.

Can determine the correct display mode based on the user's access to the page and / or field.

Author:
Rob Monie

Constructor Summary
AbstractSecurityAwarePropertyEditor()
           
AbstractSecurityAwarePropertyEditor(AccessLevel accessLevelOverride)
           
AbstractSecurityAwarePropertyEditor(java.lang.String fieldPath)
           
AbstractSecurityAwarePropertyEditor(java.lang.String fieldPath, AccessLevel accessLevelOverride)
           
 
Method Summary
 java.lang.String getAsText()
          Determines correct mode for display and calls through to relevent method to resolve the display value
protected abstract  java.lang.String getAsTextEditMode()
           
protected abstract  java.lang.String getAsTextReadMode()
           
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSecurityAwarePropertyEditor

public AbstractSecurityAwarePropertyEditor()
Parameters:
fieldPath - the path to the field. used to determine the fields display mode

AbstractSecurityAwarePropertyEditor

public AbstractSecurityAwarePropertyEditor(java.lang.String fieldPath)
Parameters:
fieldPath - the path to the field. used to determine the fields display mode

AbstractSecurityAwarePropertyEditor

public AbstractSecurityAwarePropertyEditor(java.lang.String fieldPath,
                                           AccessLevel accessLevelOverride)
Parameters:
fieldPath - the path to the field. used to determine the fields display mode
accessLevelOverride - if provided this will override any other determined display mode for the field

AbstractSecurityAwarePropertyEditor

public AbstractSecurityAwarePropertyEditor(AccessLevel accessLevelOverride)
Parameters:
accessLevelOverride - if provided this will override any other determined display mode for the field
Method Detail

getAsText

public final java.lang.String getAsText()
Determines correct mode for display and calls through to relevent method to resolve the display value

Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class java.beans.PropertyEditorSupport
See Also:
PropertyEditorSupport.getAsText()

getAsTextEditMode

protected abstract java.lang.String getAsTextEditMode()
Returns:
value for edit mode

getAsTextReadMode

protected abstract java.lang.String getAsTextReadMode()
Returns:
value for read mode


Copyright © 2005-2007 Spring Layout Team. All Rights Reserved.