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:
 java.io.Serializable
public class CommitFailedException extends java.lang.ExceptionMain exception thrown by methods defined on theContentSessioninterface indicating that committing a given set of changes failed.- See Also:
 - Serialized Form
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringACCESSType name for access violation (i.e.static java.lang.StringACCESS_CONTROLType name for access control violation errors.static java.lang.StringCONSTRAINTType name for constraint violation errors.static java.lang.StringINTEGRITYType name for referential integrity violation errors.static java.lang.StringLABEL_EXISTSType name for label exists version errors.static java.lang.StringLOCKType name for lock violation errors.static java.lang.StringMERGEType name for merge errors.static java.lang.StringNAMEType name for name violation errors.static java.lang.StringNAMESPACEType name for namespace violation errors.static java.lang.StringNODE_TYPEType name for node type violation errors.static java.lang.StringOAKSource name for exceptions thrown by components in the Oak project.static java.lang.StringSTATEType name for state violation errors.static java.lang.StringUNSUPPORTEDUnsupported operation or featurestatic java.lang.StringVERSIONType name for version violation errors. 
- 
Constructor Summary
Constructors Constructor Description CommitFailedException(java.lang.String type, int code, java.lang.String message)CommitFailedException(java.lang.String type, int code, java.lang.String message, java.lang.Throwable cause)CommitFailedException(java.lang.String source, java.lang.String type, int code, java.lang.String message, java.lang.Throwable cause) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.jcr.RepositoryExceptionasRepositoryException()Wraps the givenCommitFailedExceptioninstance using the appropriateRepositoryExceptionsubclass based on thetypeof the given exception.javax.jcr.RepositoryExceptionasRepositoryException(@NotNull java.lang.String message)Wraps the givenCommitFailedExceptioninstance using the appropriateRepositoryExceptionsubclass based on thetypeof the given exception.intgetCode()Returns the type-specific error code of this exception.java.lang.StringgetSource()Returns the name of the source of this exception.java.lang.StringgetType()Return the name of the type of this exception.booleanisAccessControlViolation()Checks whether this is an access control violation exception.booleanisAccessViolation()Checks whether this is an access violation exception.booleanisConstraintViolation()Checks whether this is a constraint violation exception.booleanisOfType(java.lang.String type)Checks whether this exception is of the given type. 
 - 
 
- 
- 
Field Detail
- 
OAK
public static final java.lang.String OAK
Source name for exceptions thrown by components in the Oak project.- See Also:
 - Constant Field Values
 
 
- 
ACCESS
public static final java.lang.String ACCESS
Type name for access violation (i.e. permission denied) errors.- See Also:
 - Constant Field Values
 
 
- 
ACCESS_CONTROL
public static final java.lang.String ACCESS_CONTROL
Type name for access control violation errors.- See Also:
 - Constant Field Values
 
 
- 
CONSTRAINT
public static final java.lang.String CONSTRAINT
Type name for constraint violation errors.- See Also:
 - Constant Field Values
 
 
- 
INTEGRITY
public static final java.lang.String INTEGRITY
Type name for referential integrity violation errors.- See Also:
 - Constant Field Values
 
 
- 
LOCK
public static final java.lang.String LOCK
Type name for lock violation errors.- See Also:
 - Constant Field Values
 
 
- 
NAME
public static final java.lang.String NAME
Type name for name violation errors.- See Also:
 - Constant Field Values
 
 
- 
NAMESPACE
public static final java.lang.String NAMESPACE
Type name for namespace violation errors.- See Also:
 - Constant Field Values
 
 
- 
NODE_TYPE
public static final java.lang.String NODE_TYPE
Type name for node type violation errors.- See Also:
 - Constant Field Values
 
 
- 
STATE
public static final java.lang.String STATE
Type name for state violation errors.- See Also:
 - Constant Field Values
 
 
- 
VERSION
public static final java.lang.String VERSION
Type name for version violation errors.- See Also:
 - Constant Field Values
 
 
- 
LABEL_EXISTS
public static final java.lang.String LABEL_EXISTS
Type name for label exists version errors.- See Also:
 - Constant Field Values
 
 
- 
MERGE
public static final java.lang.String MERGE
Type name for merge errors.- See Also:
 - Constant Field Values
 
 
- 
UNSUPPORTED
public static final java.lang.String UNSUPPORTED
Unsupported operation or feature- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
CommitFailedException
public CommitFailedException(java.lang.String source, java.lang.String type, int code, java.lang.String message, java.lang.Throwable cause) 
- 
CommitFailedException
public CommitFailedException(java.lang.String type, int code, java.lang.String message, java.lang.Throwable cause) 
- 
CommitFailedException
public CommitFailedException(java.lang.String type, int code, java.lang.String message) 
 - 
 
- 
Method Detail
- 
isOfType
public boolean isOfType(java.lang.String type)
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
public java.lang.String getSource()
Returns the name of the source of this exception.- Returns:
 - source name
 
 
- 
getType
public java.lang.String 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
public javax.jcr.RepositoryException asRepositoryException()
Wraps the givenCommitFailedExceptioninstance using the appropriateRepositoryExceptionsubclass based on thetypeof the given exception.- Returns:
 - matching repository exception
 
 
- 
asRepositoryException
public javax.jcr.RepositoryException asRepositoryException(@NotNull @NotNull java.lang.String message)Wraps the givenCommitFailedExceptioninstance using the appropriateRepositoryExceptionsubclass based on thetypeof the given exception.- Parameters:
 message- The exception message.- Returns:
 - matching repository exception
 
 
 - 
 
 -