Class AvailableInAnotherContextException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
EntityAvailableInAnotherContextException, RelationAvailableInAnotherContextException

public class AvailableInAnotherContextException extends ResourceRegistryException
Base exception thrown when the requested instance exists, but only in a Context other than the one scoping the request — a visibility boundary violation distinct from NotFoundException (element genuinely absent). Specialized per element kind (e.g. EntityAvailableInAnotherContextException), and also thrown directly as a generic fallback. Mapped to 403 Forbidden by the REST layer.
Author:
Luca Frosini (ISTI - CNR)
See Also:
  • Constructor Details

    • AvailableInAnotherContextException

      public AvailableInAnotherContextException(String message)
      Instantiates a new available in another context exception.
      Parameters:
      message - the message
    • AvailableInAnotherContextException

      public AvailableInAnotherContextException(Throwable cause)
      Instantiates a new available in another context exception.
      Parameters:
      cause - the cause
    • AvailableInAnotherContextException

      public AvailableInAnotherContextException(String message, Throwable cause)
      Instantiates a new available in another context exception.
      Parameters:
      message - the message
      cause - the cause