Class StorageFactoryService.FileOperationHelper
- java.lang.Object
-
- org.apache.derby.impl.services.monitor.StorageFactoryService.FileOperationHelper
-
- Enclosing class:
- StorageFactoryService
private static class StorageFactoryService.FileOperationHelper extends java.lang.Object
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 Modifier and Type Field Description private java.lang.String
operation
Name of the most recently performed operation.
-
Constructor Summary
Constructors Modifier Constructor Description private
FileOperationHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
delete(StorageFile file, boolean mustSucceed)
(package private) boolean
exists(StorageFile file, boolean mustSucceed)
private void
handleSecPrivException(StorageFile file, boolean mustSucceed, java.lang.SecurityException se)
Handles security exceptions caused by missing privileges on the files being accessed.(package private) boolean
renameTo(StorageFile from, StorageFile to, boolean mustSucceed)
-
-
-
Method Detail
-
exists
boolean exists(StorageFile file, boolean mustSucceed) throws StandardException
- Throws:
StandardException
-
delete
boolean delete(StorageFile file, boolean mustSucceed) throws StandardException
- Throws:
StandardException
-
renameTo
boolean renameTo(StorageFile from, StorageFile to, boolean mustSucceed) throws StandardException
- Throws:
StandardException
-
handleSecPrivException
private void handleSecPrivException(StorageFile file, boolean mustSucceed, java.lang.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
java.lang.NullPointerException
- iffile
orse
is null
-
-