SRJRCFrames
v0.1.296

de.schwarzrot.ui.validation.constraints
Class AbstractValidationConstraint<E extends Entity>

java.lang.Object
  extended by de.schwarzrot.ui.validation.constraints.AbstractValidationConstraint<E>
Type Parameters:
E - - the type of instance wrapped by the presentation model
All Implemented Interfaces:
ValidationConstraint
Direct Known Subclasses:
VCAnyIsTrue, VCDbExists, VCDbIsAccessible, VCDirIsWritable, VCHostIsReachable, VCIsTrue, VCMandatory, VCMatchingFile, VCSupportedCharset, VCTaskExecutedSuccessfully, VCXHostIsReachable

public abstract class AbstractValidationConstraint<E extends Entity>
extends Object
implements ValidationConstraint

base class for validation constraints. Each constraint should access the model, not the underlaying bean and validating should be based on property names, so early validation on buffered values is possible.

Author:
Reinhard Mantey

Constructor Summary
AbstractValidationConstraint(com.jgoodies.binding.PresentationModel<E> model, String propertyName)
           
 
Method Summary
protected  org.apache.commons.logging.Log getLogger()
           
 com.jgoodies.binding.PresentationModel<E> getModel()
           
 String getPropertyName()
           
 Object getValue()
           
 Object getValue(String propertyName)
           
 void setModel(com.jgoodies.binding.PresentationModel<E> model)
           
 void setPropertyName(String propertyName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.schwarzrot.ui.validation.constraints.ValidationConstraint
matches
 

Constructor Detail

AbstractValidationConstraint

public AbstractValidationConstraint(com.jgoodies.binding.PresentationModel<E> model,
                                    String propertyName)
Method Detail

getModel

public com.jgoodies.binding.PresentationModel<E> getModel()

getPropertyName

public String getPropertyName()
Specified by:
getPropertyName in interface ValidationConstraint
Returns:
the name of the property, that should be validated

getValue

public final Object getValue()

getValue

public final Object getValue(String propertyName)

setModel

public void setModel(com.jgoodies.binding.PresentationModel<E> model)

setPropertyName

public void setPropertyName(String propertyName)

getLogger

protected final org.apache.commons.logging.Log getLogger()

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.