Class StorageFactoryService.FileOperationHelper
java.lang.Object
org.apache.derby.impl.services.monitor.StorageFactoryService.FileOperationHelper
- Enclosing class:
StorageFactoryService
Helper class for common file operations on the service properties files.
Introduced to take care of error reporting for common file operations carried out in StorageFactoryService.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
delete
(StorageFile file, boolean mustSucceed) (package private) boolean
exists
(StorageFile file, boolean mustSucceed) private void
handleSecPrivException
(StorageFile file, boolean mustSucceed, SecurityException se) Handles security exceptions caused by missing privileges on the files being accessed.(package private) boolean
renameTo
(StorageFile from, StorageFile to, boolean mustSucceed)
-
Field Details
-
operation
Name of the most recently performed operation.
-
-
Constructor Details
-
FileOperationHelper
private FileOperationHelper()
-
-
Method Details
-
exists
- Throws:
StandardException
-
delete
- Throws:
StandardException
-
renameTo
- Throws:
StandardException
-
handleSecPrivException
private void handleSecPrivException(StorageFile file, boolean mustSucceed, SecurityException se) throws StandardException Handles security exceptions caused by missing privileges on the files being accessed.- Parameters:
file
- the file that was accessedmustSucceed
- iftrue
aStandardException
will be thrown, iffalse
a warning is written to the logse
- the security exception raised- Throws:
StandardException
- ifmustSucceed
istrue
NullPointerException
- iffile
orse
is null
-