com.sun.enterprise.admin.servermgmt
Class FileValidator
java.lang.Object
com.sun.enterprise.admin.servermgmt.Validator
com.sun.enterprise.admin.servermgmt.FileValidator
public class FileValidator
- extends Validator
This class performs the file related validations such as
existence of the file
read, write & execute permissions,
whether the file is a directory or a file
NOT THREAD SAFE
|
Field Summary |
static java.lang.String |
validConstraints
The valid constraint set. |
|
Constructor Summary |
FileValidator(java.lang.String name,
java.lang.String constraints)
Constructs a new FileValidator object. |
|
Method Summary |
java.lang.String |
getConstraints()
|
java.lang.String |
setConstraints(java.lang.String constraints)
Sets the current constraint set to the given set if it is a valid
constriant set. |
void |
validate(java.lang.Object str)
Validates the given File. |
| Methods inherited from class com.sun.enterprise.admin.servermgmt.Validator |
getName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
validConstraints
public static final java.lang.String validConstraints
- The valid constraint set.
- See Also:
- Constant Field Values
FileValidator
public FileValidator(java.lang.String name,
java.lang.String constraints)
- Constructs a new FileValidator object.
- Parameters:
name - The name of the entity that will be validated. This name is
used in the error message.constraints - The constaint set that will be checked for any given
file during validation.
getConstraints
public java.lang.String getConstraints()
- Returns:
- Returns the current constraint set.
setConstraints
public java.lang.String setConstraints(java.lang.String constraints)
- Sets the current constraint set to the given set if it is a valid
constriant set.
validate
public void validate(java.lang.Object str)
throws InvalidConfigException
- Validates the given File.
- Overrides:
validate in class Validator
- Parameters:
str - Must be the absolute path of the File that will be validated.
- Throws:
InvalidConfigException
Copyright © 2012 GlassFish Community. All Rights Reserved.