Xindice API
version 1.1

org.apache.xindice.core
Class FaultCodes

java.lang.Object
  |
  +--org.apache.xindice.core.FaultCodes

public abstract class FaultCodes
extends Object

FaultCodes defines the Xindice specific fault codes and associated error messages.

Version:
$Revision: 523536 $, $Date: 2007-03-28 22:41:02 -0400 (Wed, 28 Mar 2007) $

Field Summary
static int COL
           
static int COL_CANNOT_CREATE
           
static int COL_CANNOT_DROP
           
static int COL_CANNOT_RETRIEVE
           
static int COL_CANNOT_STORE
           
static int COL_COLLECTION_CLOSED
           
static int COL_COLLECTION_NOT_FOUND
           
static int COL_COLLECTION_READ_ONLY
           
static int COL_DOCUMENT_MALFORMED
           
static int COL_DOCUMENT_NOT_FOUND
           
static int COL_DUPLICATE_COLLECTION
           
static int COL_INVALID_RESULT
           
static int COL_NO_FILER
           
static int COL_NO_INDEXMANAGER
           
static int COL_NULL_RESULT
           
static int DBE
           
static int DBE_CANNOT_CREATE
           
static int DBE_CANNOT_DROP
           
static int DBE_CANNOT_READ
           
static int DBE_NO_PARENT
           
static int GEN
           
static int GEN_CRITICAL_ERROR
           
static int GEN_FATAL_ERROR
           
static int GEN_GENERAL_ERROR
           
static int GEN_UNKNOWN
           
static int IDX
           
static int IDX_CANNOT_CREATE
           
static int IDX_CORRUPTED
           
static int IDX_DUPLICATE_INDEX
           
static int IDX_INDEX_NOT_FOUND
           
static int IDX_MATCHES_NOT_FOUND
           
static int IDX_NOT_SUPPORTED
           
static int IDX_STYLE_NOT_FOUND
           
static int IDX_VALUE_NOT_FOUND
           
static int JAVA
           
static int JAVA_RUNTIME_ERROR
           
static int MAX_CODE
          Defines maximum possible fault code
static int OBJ
           
static int QRY
           
static int QRY_COMPILATION_ERROR
           
static int QRY_NOT_SUPPORTED
           
static int QRY_NULL_RESULT
           
static int QRY_PROCESSING_ERROR
           
static int QRY_STYLE_NOT_FOUND
           
static int SEC
           
static int SEC_INVALID_ACCESS
           
static int SEC_INVALID_CREDENTIALS
           
static int SEC_INVALID_GROUP
           
static int SEC_INVALID_USER
           
static int TRX
           
static int TRX_DOC_LOCKED
           
static int TRX_NO_CONTEXT
           
static int TRX_NOT_ACTIVE
           
static int TRX_NOT_SUPPORTED
           
static int URI
           
static int URI_EMPTY
           
static int URI_NULL
           
static int URI_PARSE_ERROR
           
 
Method Summary
static org.xmldb.api.base.XMLDBException createXMLDBException(Exception e)
          createXMLDBException creates an XMLDBException instance based on the specified Exception.
static org.xmldb.api.base.XMLDBException createXMLDBException(int errorCode, int faultCode, String message, Exception e)
          Creates an XMLDBException instance based on the specified fault code, message, and Exception.
static org.xmldb.api.base.XMLDBException createXMLDBException(int faultCode, String message, Exception e)
           
static org.xmldb.api.base.XMLDBException createXMLDBException(String message, Exception e)
          createXMLDBException creates an XMLDBException instance based on the specified Exception.
static int getErrorCode(int faultCode)
          getErrorCode returns the associated XML:DB error code for the specified Xindice fault code
static int getFaultCode(Exception e)
          getFaultCode examines the provided exception to determine the fault code that is associated with it.
static int getFaultCodeSeries(Exception e)
          getFaultCodeSeries examines the provided exception to determine the fault code series that is associated with it.
static int getFaultCodeType(Exception e)
          getFaultCodeType examines the provided exception to determine the general fault code that is associated with it.
static String getFaultMessage(Exception e)
          getFaultMessage examines the provided exception to determine the fault message that is associated with it.
static String getMessage(int code)
          getMessage returns a textual form for the specified fault code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_CODE

public static final int MAX_CODE
Defines maximum possible fault code

GEN

public static final int GEN

OBJ

public static final int OBJ

COL

public static final int COL

IDX

public static final int IDX

TRX

public static final int TRX

DBE

public static final int DBE

QRY

public static final int QRY

SEC

public static final int SEC

URI

public static final int URI

JAVA

public static final int JAVA

GEN_UNKNOWN

public static final int GEN_UNKNOWN

GEN_GENERAL_ERROR

public static final int GEN_GENERAL_ERROR

GEN_CRITICAL_ERROR

public static final int GEN_CRITICAL_ERROR

GEN_FATAL_ERROR

public static final int GEN_FATAL_ERROR

COL_COLLECTION_NOT_FOUND

public static final int COL_COLLECTION_NOT_FOUND

COL_DOCUMENT_NOT_FOUND

public static final int COL_DOCUMENT_NOT_FOUND

COL_DUPLICATE_COLLECTION

public static final int COL_DUPLICATE_COLLECTION

COL_NULL_RESULT

public static final int COL_NULL_RESULT

COL_NO_FILER

public static final int COL_NO_FILER

COL_NO_INDEXMANAGER

public static final int COL_NO_INDEXMANAGER

COL_DOCUMENT_MALFORMED

public static final int COL_DOCUMENT_MALFORMED

COL_CANNOT_STORE

public static final int COL_CANNOT_STORE

COL_CANNOT_RETRIEVE

public static final int COL_CANNOT_RETRIEVE

COL_COLLECTION_READ_ONLY

public static final int COL_COLLECTION_READ_ONLY

COL_COLLECTION_CLOSED

public static final int COL_COLLECTION_CLOSED

COL_CANNOT_CREATE

public static final int COL_CANNOT_CREATE

COL_CANNOT_DROP

public static final int COL_CANNOT_DROP

COL_INVALID_RESULT

public static final int COL_INVALID_RESULT

IDX_VALUE_NOT_FOUND

public static final int IDX_VALUE_NOT_FOUND

IDX_INDEX_NOT_FOUND

public static final int IDX_INDEX_NOT_FOUND

IDX_MATCHES_NOT_FOUND

public static final int IDX_MATCHES_NOT_FOUND

IDX_DUPLICATE_INDEX

public static final int IDX_DUPLICATE_INDEX

IDX_NOT_SUPPORTED

public static final int IDX_NOT_SUPPORTED

IDX_STYLE_NOT_FOUND

public static final int IDX_STYLE_NOT_FOUND

IDX_CORRUPTED

public static final int IDX_CORRUPTED

IDX_CANNOT_CREATE

public static final int IDX_CANNOT_CREATE

TRX_DOC_LOCKED

public static final int TRX_DOC_LOCKED

TRX_NO_CONTEXT

public static final int TRX_NO_CONTEXT

TRX_NOT_ACTIVE

public static final int TRX_NOT_ACTIVE

TRX_NOT_SUPPORTED

public static final int TRX_NOT_SUPPORTED

DBE_NO_PARENT

public static final int DBE_NO_PARENT

DBE_CANNOT_DROP

public static final int DBE_CANNOT_DROP

DBE_CANNOT_CREATE

public static final int DBE_CANNOT_CREATE

DBE_CANNOT_READ

public static final int DBE_CANNOT_READ

QRY_NULL_RESULT

public static final int QRY_NULL_RESULT

QRY_COMPILATION_ERROR

public static final int QRY_COMPILATION_ERROR

QRY_PROCESSING_ERROR

public static final int QRY_PROCESSING_ERROR

QRY_NOT_SUPPORTED

public static final int QRY_NOT_SUPPORTED

QRY_STYLE_NOT_FOUND

public static final int QRY_STYLE_NOT_FOUND

SEC_INVALID_USER

public static final int SEC_INVALID_USER

SEC_INVALID_GROUP

public static final int SEC_INVALID_GROUP

SEC_INVALID_ACCESS

public static final int SEC_INVALID_ACCESS

SEC_INVALID_CREDENTIALS

public static final int SEC_INVALID_CREDENTIALS

URI_EMPTY

public static final int URI_EMPTY

URI_NULL

public static final int URI_NULL

URI_PARSE_ERROR

public static final int URI_PARSE_ERROR

JAVA_RUNTIME_ERROR

public static final int JAVA_RUNTIME_ERROR
Method Detail

getErrorCode

public static int getErrorCode(int faultCode)
getErrorCode returns the associated XML:DB error code for the specified Xindice fault code
Parameters:
faultCode - The Xindice fault code
Returns:
the associated XML:DB error code

getMessage

public static String getMessage(int code)
getMessage returns a textual form for the specified fault code.
Parameters:
code - The Fault Code
Returns:
It's textual form

createXMLDBException

public static org.xmldb.api.base.XMLDBException createXMLDBException(Exception e)
createXMLDBException creates an XMLDBException instance based on the specified Exception. If the Exception is a DBException, it will extract any important information from it (like fault codes and messages)
Parameters:
e - The Exception to use
Returns:
An XMLDBException instance

createXMLDBException

public static org.xmldb.api.base.XMLDBException createXMLDBException(String message,
                                                                     Exception e)
createXMLDBException creates an XMLDBException instance based on the specified Exception. If the Exception is a DBException, it will extract any important information from it (like fault codes and messages)
Parameters:
e - The Exception to use
message - The Message to use
Returns:
An XMLDBException instance

createXMLDBException

public static org.xmldb.api.base.XMLDBException createXMLDBException(int faultCode,
                                                                     String message,
                                                                     Exception e)

createXMLDBException

public static org.xmldb.api.base.XMLDBException createXMLDBException(int errorCode,
                                                                     int faultCode,
                                                                     String message,
                                                                     Exception e)
Creates an XMLDBException instance based on the specified fault code, message, and Exception. If the Exception is a DBException, it will extract any important information from it (like fault codes and messages). If the exception is an instance of XindiceException, the exception class name and message of any Throwable(s) available via XindiceException.getCause will also be incorporated into the message. If a chain of wrapped XindiceExceptions is available, the chain will be followed incorporating the class name and message at each level.
Parameters:
faultCode - the fault code for the created exception
e - The Exception to use
Returns:
An XMLDBException instance

getFaultCodeType

public static int getFaultCodeType(Exception e)
getFaultCodeType examines the provided exception to determine the general fault code that is associated with it. General fault codes are reduced from actual fault codes to be one of the GEN_ prefixed fault code values.
Parameters:
e - The Exception to examine
Returns:
The General Fault Code

getFaultCodeSeries

public static int getFaultCodeSeries(Exception e)
getFaultCodeSeries examines the provided exception to determine the fault code series that is associated with it. Series are reduced from actual fault codes to be one of the fault code prefixes (ex: COL, DB, SEC).
Parameters:
e - The Exception to examine
Returns:
The Fault Code Series

getFaultCode

public static int getFaultCode(Exception e)
getFaultCode examines the provided exception to determine the fault code that is associated with it.
Parameters:
e - The Exception to examine
Returns:
The Fault Code

getFaultMessage

public static String getFaultMessage(Exception e)
getFaultMessage examines the provided exception to determine the fault message that is associated with it.
Parameters:
e - The Exception to examine
Returns:
The Fault Message

Xindice API
version 1.1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.