Package org.apache.jackrabbit.oak.api
Class CommitFailedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.jackrabbit.oak.api.CommitFailedException
- All Implemented Interfaces:
Serializable
Main exception thrown by methods defined on the
ContentSession
interface indicating that committing a given set of changes failed.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringType name for access violation (i.e.static final StringType name for access control violation errors.static final StringType name for constraint violation errors.static final StringType name for referential integrity violation errors.static final StringType name for label exists version errors.static final StringType name for lock violation errors.static final StringType name for merge errors.static final StringType name for name violation errors.static final StringType name for namespace violation errors.static final StringType name for node type violation errors.static final StringSource name for exceptions thrown by components in the Oak project.static final StringType name for state violation errors.static final StringUnsupported operation or featurestatic final StringType name for version violation errors. -
Constructor Summary
ConstructorsConstructorDescriptionCommitFailedException(String type, int code, String message) CommitFailedException(String type, int code, String message, Throwable cause) CommitFailedException(String source, String type, int code, String message, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionWraps the givenCommitFailedExceptioninstance using the appropriateRepositoryExceptionsubclass based on thetypeof the given exception.asRepositoryException(@NotNull String message) Wraps the givenCommitFailedExceptioninstance using the appropriateRepositoryExceptionsubclass based on thetypeof the given exception.intgetCode()Returns the type-specific error code of this exception.Returns the name of the source of this exception.getType()Return the name of the type of this exception.booleanChecks whether this is an access control violation exception.booleanChecks whether this is an access violation exception.booleanChecks whether this is a constraint violation exception.booleanChecks whether this exception is of the given type.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
OAK
Source name for exceptions thrown by components in the Oak project.- See Also:
-
ACCESS
Type name for access violation (i.e. permission denied) errors.- See Also:
-
ACCESS_CONTROL
Type name for access control violation errors.- See Also:
-
CONSTRAINT
Type name for constraint violation errors.- See Also:
-
INTEGRITY
Type name for referential integrity violation errors.- See Also:
-
LOCK
Type name for lock violation errors.- See Also:
-
NAME
Type name for name violation errors.- See Also:
-
NAMESPACE
Type name for namespace violation errors.- See Also:
-
NODE_TYPE
Type name for node type violation errors.- See Also:
-
STATE
Type name for state violation errors.- See Also:
-
VERSION
Type name for version violation errors.- See Also:
-
LABEL_EXISTS
Type name for label exists version errors.- See Also:
-
MERGE
Type name for merge errors.- See Also:
-
UNSUPPORTED
Unsupported operation or feature- See Also:
-
-
Constructor Details
-
CommitFailedException
-
CommitFailedException
-
CommitFailedException
-
-
Method Details
-
isOfType
Checks whether this exception is of the given type.- Parameters:
type- type name- Returns:
trueiff this exception is of the given type
-
isAccessViolation
public boolean isAccessViolation()Checks whether this is an access violation exception.- Returns:
trueiff this is an access violation exception
-
isAccessControlViolation
public boolean isAccessControlViolation()Checks whether this is an access control violation exception.- Returns:
trueiff this is an access control violation exception
-
isConstraintViolation
public boolean isConstraintViolation()Checks whether this is a constraint violation exception.- Returns:
trueiff this is a constraint violation exception
-
getSource
Returns the name of the source of this exception.- Returns:
- source name
-
getType
Return the name of the type of this exception.- Returns:
- type name
-
getCode
public int getCode()Returns the type-specific error code of this exception.- Returns:
- error code
-
asRepositoryException
Wraps the givenCommitFailedExceptioninstance using the appropriateRepositoryExceptionsubclass based on thetypeof the given exception.- Returns:
- matching repository exception
-
asRepositoryException
Wraps the givenCommitFailedExceptioninstance using the appropriateRepositoryExceptionsubclass based on thetypeof the given exception.- Parameters:
message- The exception message.- Returns:
- matching repository exception
-