org.apache.derby.impl.services.monitor
Class StorageFactoryService.FileOperationHelper

java.lang.Object
  extended by 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
private  java.lang.String operation
          Name of the most recently performed operation.
 
Constructor Summary
private StorageFactoryService.FileOperationHelper()
           
 
Method Summary
(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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

operation

private java.lang.String operation
Name of the most recently performed operation.

Constructor Detail

StorageFactoryService.FileOperationHelper

private StorageFactoryService.FileOperationHelper()
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 accessed
mustSucceed - if true a StandardException will be thrown, if false a warning is written to the log
se - the security exception raised
Throws:
StandardException - if mustSucceed is true
java.lang.NullPointerException - if file or se is null

Built on Wed 2013-06-12 15:21:56+0000, from revision ???

Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.