org.gcube.contentmanagement.storagelayer.storagemanagementservice.impl.util
Class FaultUtil

java.lang.Object
  extended by org.gcube.contentmanagement.storagelayer.storagemanagementservice.impl.util.FaultUtil

public class FaultUtil
extends java.lang.Object

Author:
Federico De Faveri defaveri@isti.cnr.it

Constructor Summary
FaultUtil()
           
 
Method Summary
static GCUBEFault convertStorageLayerException(StorageLayerException sle)
           
static org.oasis.wsrf.faults.BaseFaultTypeDescription[] generateFaultDescription(java.lang.String msg)
           
static void initBaseFault(org.oasis.wsrf.faults.BaseFaultType bf, java.lang.String errorMsg, java.lang.Throwable cause)
           
static void processStorageLayerException(StorageLayerException sle)
           
static void setOriginatorAndTime(org.oasis.wsrf.faults.BaseFaultType bf)
           
static void setTrace(org.oasis.wsrf.faults.BaseFaultType bf, java.lang.Throwable cause)
           
static void throwIOFault(StorageLayerException sle, boolean tryOtherInstance)
           
static void throwObjectNotFoundFaultIfAppropriate(StorageLayerException sle)
           
static void throwValuaNotValidFaultIfAppropriate(StorageLayerException sle)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FaultUtil

public FaultUtil()
Method Detail

convertStorageLayerException

public static GCUBEFault convertStorageLayerException(StorageLayerException sle)

processStorageLayerException

public static void processStorageLayerException(StorageLayerException sle)
                                         throws GCUBEUnrecoverableObjectNotFoundFault,
                                                GCUBEUnrecoverableValueNotValidFault,
                                                GCUBERetrySameIOFault,
                                                GCUBERetryEquivalentIOFault,
                                                GCUBEUnrecoverableIOFault
Throws:
GCUBEUnrecoverableObjectNotFoundFault
GCUBEUnrecoverableValueNotValidFault
GCUBERetrySameIOFault
GCUBERetryEquivalentIOFault
GCUBEUnrecoverableIOFault

initBaseFault

public static void initBaseFault(org.oasis.wsrf.faults.BaseFaultType bf,
                                 java.lang.String errorMsg,
                                 java.lang.Throwable cause)

throwValuaNotValidFaultIfAppropriate

public static void throwValuaNotValidFaultIfAppropriate(StorageLayerException sle)
                                                 throws GCUBEUnrecoverableValueNotValidFault
Throws:
GCUBEUnrecoverableValueNotValidFault

throwObjectNotFoundFaultIfAppropriate

public static void throwObjectNotFoundFaultIfAppropriate(StorageLayerException sle)
                                                  throws GCUBEUnrecoverableObjectNotFoundFault
Throws:
GCUBEUnrecoverableObjectNotFoundFault

throwIOFault

public static void throwIOFault(StorageLayerException sle,
                                boolean tryOtherInstance)
                         throws GCUBERetrySameIOFault,
                                GCUBERetryEquivalentIOFault,
                                GCUBEUnrecoverableIOFault
Throws:
GCUBERetrySameIOFault
GCUBERetryEquivalentIOFault
GCUBEUnrecoverableIOFault

generateFaultDescription

public static org.oasis.wsrf.faults.BaseFaultTypeDescription[] generateFaultDescription(java.lang.String msg)

setTrace

public static void setTrace(org.oasis.wsrf.faults.BaseFaultType bf,
                            java.lang.Throwable cause)

setOriginatorAndTime

public static void setOriginatorAndTime(org.oasis.wsrf.faults.BaseFaultType bf)