public class DirectoryChecker extends AbstractLogEnabled implements Configurable, ParameterChecker, Serviceable
Modifier and Type | Field and Description |
---|---|
private boolean |
_checkWrite
Equals true if the directory has to be writable
|
private boolean |
_createsIfRequired
Creates the directory if it does not exist already
|
private ServiceManager |
_sManager |
private SourceResolver |
_sourceResolver
The source resolver
|
Constructor and Description |
---|
DirectoryChecker() |
Modifier and Type | Method and Description |
---|---|
private void |
_checkDirectory(String path)
Checks if the source exists and optionally checks if it is writable
|
void |
check(List<String> values)
Checks the validity of the parameters.
|
void |
configure(Configuration configuration) |
void |
service(ServiceManager sManager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private boolean _checkWrite
private SourceResolver _sourceResolver
private boolean _createsIfRequired
private ServiceManager _sManager
public DirectoryChecker()
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public void service(ServiceManager sManager) throws ServiceException
service
in interface Serviceable
ServiceException
public void check(List<String> values) throws ParameterCheckerTestFailureException
ParameterChecker
check
in interface ParameterChecker
values
- the values to testParameterCheckerTestFailureException
- if the test failedprivate void _checkDirectory(String path) throws ParameterCheckerTestFailureException
path
- The path of the source to checkParameterCheckerTestFailureException
- if an error occurred