SRJRCFrames
v0.1.296

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

java.lang.Object
  extended by de.schwarzrot.ui.validation.constraints.AbstractValidationConstraint<E>
      extended by de.schwarzrot.ui.validation.constraints.VCDirIsWritable<E>
Type Parameters:
E - type of the bean managed by a presentation model
All Implemented Interfaces:
ValidationConstraint

public class VCDirIsWritable<E extends Entity>
extends AbstractValidationConstraint<E>

offers a constraint, that checks if certain directory is writable. Directory is the property value of a bean. The second constructor enables conditional checks depending on another property value.

Author:
Reinhard Mantey

Constructor Summary
VCDirIsWritable(com.jgoodies.binding.PresentationModel<E> model, String propertyName)
          creates a constraint, that checks, whether the value of the given property is a writable directory
VCDirIsWritable(com.jgoodies.binding.PresentationModel<E> model, String propertyName, PropertyCondition<E> pc)
          creates a constraint, that checks, whether the value of the given property is a writable directory.
 
Method Summary
 boolean matches()
          the validation kernel
 
Methods inherited from class de.schwarzrot.ui.validation.constraints.AbstractValidationConstraint
getLogger, getModel, getPropertyName, getValue, getValue, setModel, setPropertyName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VCDirIsWritable

public VCDirIsWritable(com.jgoodies.binding.PresentationModel<E> model,
                       String propertyName)
creates a constraint, that checks, whether the value of the given property is a writable directory

Parameters:
model - - the presentation model, that manages the bean
propertyName - - the name of the property containing the path of a directory

VCDirIsWritable

public VCDirIsWritable(com.jgoodies.binding.PresentationModel<E> model,
                       String propertyName,
                       PropertyCondition<E> pc)
creates a constraint, that checks, whether the value of the given property is a writable directory. PropertyCondition is a construct to check, whether validating should be bypassed or not.

Parameters:
model - - the presentation model, that manages the bean
propertyName - - the name of the property containing the path of a directory
pc - - a PropertyCondition used to bypass the validating. If property condition matches, it means no validation will be performed and if the property condition fails the validating will be performed.
Method Detail

matches

public boolean matches()
Description copied from interface: ValidationConstraint
the validation kernel

Returns:
true - if the property passed validation

false - if the property failed on validation


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.