public class CommitFailedException
extends java.lang.Exception
ContentSession
interface indicating that committing a given set of changes failed.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACCESS
Type name for access violation (i.e.
|
static java.lang.String |
ACCESS_CONTROL
Type name for access control violation errors.
|
static java.lang.String |
CONSTRAINT
Type name for constraint violation errors.
|
static java.lang.String |
INTEGRITY
Type name for referential integrity violation errors.
|
static java.lang.String |
LABEL_EXISTS
Type name for label exists version errors.
|
static java.lang.String |
LOCK
Type name for lock violation errors.
|
static java.lang.String |
MERGE
Type name for merge errors.
|
static java.lang.String |
NAME
Type name for name violation errors.
|
static java.lang.String |
NAMESPACE
Type name for namespace violation errors.
|
static java.lang.String |
NODE_TYPE
Type name for node type violation errors.
|
static java.lang.String |
OAK
Source name for exceptions thrown by components in the Oak project.
|
static java.lang.String |
STATE
Type name for state violation errors.
|
static java.lang.String |
UNSUPPORTED
Unsupported operation or feature
|
static java.lang.String |
VERSION
Type name for version violation errors.
|
Constructor and 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) |
Modifier and Type | Method and Description |
---|---|
RepositoryException |
asRepositoryException()
Wraps the given
CommitFailedException instance using the
appropriate RepositoryException subclass based on the
type of the given exception. |
RepositoryException |
asRepositoryException(@NotNull java.lang.String message)
Wraps the given
CommitFailedException instance using the
appropriate RepositoryException subclass based on the
type of the given exception. |
int |
getCode()
Returns the type-specific error code of this exception.
|
java.lang.String |
getSource()
Returns the name of the source of this exception.
|
java.lang.String |
getType()
Return the name of the type of this exception.
|
boolean |
isAccessControlViolation()
Checks whether this is an access control violation exception.
|
boolean |
isAccessViolation()
Checks whether this is an access violation exception.
|
boolean |
isConstraintViolation()
Checks whether this is a constraint violation exception.
|
boolean |
isOfType(java.lang.String type)
Checks whether this exception is of the given type.
|
public static final java.lang.String OAK
public static final java.lang.String ACCESS
public static final java.lang.String ACCESS_CONTROL
public static final java.lang.String CONSTRAINT
public static final java.lang.String INTEGRITY
public static final java.lang.String LOCK
public static final java.lang.String NAME
public static final java.lang.String NAMESPACE
public static final java.lang.String NODE_TYPE
public static final java.lang.String STATE
public static final java.lang.String VERSION
public static final java.lang.String LABEL_EXISTS
public static final java.lang.String MERGE
public static final java.lang.String UNSUPPORTED
public CommitFailedException(java.lang.String source, java.lang.String type, int code, java.lang.String message, java.lang.Throwable cause)
public CommitFailedException(java.lang.String type, int code, java.lang.String message, java.lang.Throwable cause)
public CommitFailedException(java.lang.String type, int code, java.lang.String message)
public boolean isOfType(java.lang.String type)
type
- type nametrue
iff this exception is of the given typepublic boolean isAccessViolation()
true
iff this is an access violation exceptionpublic boolean isAccessControlViolation()
true
iff this is an access control violation exceptionpublic boolean isConstraintViolation()
true
iff this is a constraint violation exceptionpublic java.lang.String getSource()
public java.lang.String getType()
public int getCode()
public RepositoryException asRepositoryException()
CommitFailedException
instance using the
appropriate RepositoryException
subclass based on the
type
of the given exception.public RepositoryException asRepositoryException(@NotNull @NotNull java.lang.String message)
CommitFailedException
instance using the
appropriate RepositoryException
subclass based on the
type
of the given exception.message
- The exception message.Copyright © 2010 - 2020 Adobe. All Rights Reserved