org.gcube.contentmanagement.storagelayer
Class StorageLayerException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.gcube.contentmanagement.storagelayer.StorageLayerException
All Implemented Interfaces:
java.io.Serializable

public class StorageLayerException
extends java.lang.Exception

Exception as of the semantic level of Storage Layer

Author:
michaelspringmann
See Also:
Serialized Form

Constructor Summary
StorageLayerException(java.lang.String message, java.lang.Throwable cause, java.lang.String subsystem)
          Constructs a new exception
 
Method Summary
 java.lang.String getInvalidValue()
          Returns the value that was invalid (if any)
 java.lang.String getInvalidValueName()
          Returns the name of the value that was invalid (if any)
 java.lang.String getSubSystem()
          Returns the subsystem that caused the exception
 boolean isInvalidValue()
          Indicates whether the an invalid value caused the problem
 boolean isMissingObject()
          Indicates whether the a missing object caused the problem
 boolean objectNotFound()
          Indicates whether the an object was not found.
 boolean resolvableByEquivalentInstance()
          Indicates whether a subsequent call to an equivalent instance with same parameters might have more luck
 boolean resolvableBySameInstance()
          Indicates whether a subsequent call to the same instance with same parameters might have more luck
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StorageLayerException

public StorageLayerException(java.lang.String message,
                             java.lang.Throwable cause,
                             java.lang.String subsystem)
Constructs a new exception

Parameters:
message - human-readable message about what went wrong
cause - the (underlying) exception that caused the exception
subsystem - the name of the subsystem that failed
Method Detail

getSubSystem

public java.lang.String getSubSystem()
Returns the subsystem that caused the exception

Returns:
the name of the subsystem

isInvalidValue

public boolean isInvalidValue()
Indicates whether the an invalid value caused the problem

Returns:
true, if a value was invalid

isMissingObject

public boolean isMissingObject()
Indicates whether the a missing object caused the problem

Returns:
true, if a value was missing

resolvableBySameInstance

public boolean resolvableBySameInstance()
Indicates whether a subsequent call to the same instance with same parameters might have more luck

Returns:
true, if retrying on same instance makes sense

resolvableByEquivalentInstance

public boolean resolvableByEquivalentInstance()
Indicates whether a subsequent call to an equivalent instance with same parameters might have more luck

Returns:
true, if retrying equivalent instance makes sense

getInvalidValue

public java.lang.String getInvalidValue()
Returns the value that was invalid (if any)

Returns:
the value that was not value or null, if no such invalid value

getInvalidValueName

public java.lang.String getInvalidValueName()
Returns the name of the value that was invalid (if any)

Returns:
the name of the value that was not value or null, if no such invalid value

objectNotFound

public boolean objectNotFound()
Indicates whether the an object was not found. The actual ID of the object is therefore invalid and can be retrieved using the getInvalidValue()

Returns:
true, if an object was not found