|
SRJRCFrames v0.1.296 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.schwarzrot.ui.validation.constraints.AbstractValidationConstraint<E> de.schwarzrot.ui.validation.constraints.VCMatchingFile<E>
E
- the type of the bean, managed by a presentation modelpublic class VCMatchingFile<E extends Entity>
checks the value of a beans property against given filename. With the mode parameter it is possible to activate additional checks related to the name and/or file type.
Field Summary | |
---|---|
static int |
CONTAINS_NAME
the name of the file must contain the string from filename parameter of constructor |
static int |
DIRECTORY
file must be a directory |
static int |
ENDS_WITH
the name of the file must end with the string from filename parameter of constructor |
static int |
EXACT_NAME
the name of the file must match exactly the filename parameter from constructor |
static int |
EXECUTABLE
file must exist and be executable |
static int |
NOT_EXISTS
file must not exist |
static int |
READABLE
file must exist and be readable |
static int |
STARTS_WITH
the name of the file must start with the string from filename parameter of constructor |
static int |
WRITABLE
file must exist and be writable |
Constructor Summary | |
---|---|
VCMatchingFile(com.jgoodies.binding.PresentationModel<E> model,
String propertyName,
int mode,
String filename)
create a valiation constraint, that validates the content of a bean property against given filename and validation modes. |
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 |
Field Detail |
---|
public static final int EXACT_NAME
public static final int CONTAINS_NAME
public static final int STARTS_WITH
public static final int ENDS_WITH
public static final int READABLE
public static final int WRITABLE
public static final int EXECUTABLE
public static final int NOT_EXISTS
public static final int DIRECTORY
Constructor Detail |
---|
public VCMatchingFile(com.jgoodies.binding.PresentationModel<E> model, String propertyName, int mode, String filename)
mode
may be any combination of EXACT_NAME
,
CONTAINS_NAME
, STARTS_WITH
, ENDS_WITH
,
READABLE
, WRITABLE
and EXECUTABLE
.
model
- - the presentation model, that manages the beanpropertyName
- - the name of the property to checkmode
- - validation modes of the filefilename
- - the filename to check property content with. May be nullMethod Detail |
---|
public boolean matches()
ValidationConstraint
false - if the property failed on validation
|
SRJRCFrames v0.1.296 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |