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.ObjectHelper 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.StringoperationName of the most recently performed operation.
-
Constructor Summary
Constructors Modifier Constructor Description privateFileOperationHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) booleandelete(StorageFile file, boolean mustSucceed)(package private) booleanexists(StorageFile file, boolean mustSucceed)private voidhandleSecPrivException(StorageFile file, boolean mustSucceed, java.lang.SecurityException se)Handles security exceptions caused by missing privileges on the files being accessed.(package private) booleanrenameTo(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- iftrueaStandardExceptionwill be thrown, iffalsea warning is written to the logse- the security exception raised- Throws:
StandardException- ifmustSucceedistruejava.lang.NullPointerException- iffileorseis null
-
-