Class FileValidator
java.lang.Object
com.sun.enterprise.admin.servermgmt.Validator
com.sun.enterprise.admin.servermgmt.FileValidator
This class performs the file related validations such as
-
existence of the file read, write invalid input: '&' execute permissions, whether the file is a directory or a file
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFileValidator(String name, String constraints) Constructs a new FileValidator object. -
Method Summary
Modifier and TypeMethodDescriptionsetConstraints(String constraints) Sets the current constraint set to the given set if it is a valid constriant set.voidValidates the given File.
-
Field Details
-
validConstraints
The valid constraint set.- See Also:
-
-
Constructor Details
-
FileValidator
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.
-
-
Method Details
-
getConstraints
- Returns:
- Returns the current constraint set.
-
setConstraints
Sets the current constraint set to the given set if it is a valid constriant set. -
validate
Validates the given File.- Overrides:
validatein classValidator- Parameters:
str- Must be the absolute path of the File that will be validated.- Throws:
InvalidConfigException
-