|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
javax.servlet.ServletException
com.ibm.xdms.exception.XdmsException
com.ibm.xdms.exception.xcap.XcapException
public class XcapException
Top level XCAP Exception class
Field Summary | |
---|---|
protected static java.lang.String |
BASE_ERROR_DOC
Base error document |
protected static java.lang.String |
BASE_ERROR_DOC_PREFIX
Base error document prefix |
protected static java.lang.String |
BASE_ERROR_DOC_SUFFIX
Base error document suffix |
static java.lang.String |
CONTENT_TYPE_XCAP_ERROR
Error content type |
protected java.lang.Object |
errorDocumentLock
Document lock object |
protected static java.util.logging.Logger |
LOGGER
Logger |
Fields inherited from class com.ibm.xdms.exception.XdmsException |
---|
hasSetResponse |
Constructor Summary | |
---|---|
XcapException(int statusCode)
Constructor, uses the default content type of application/xcap-error+xml and returns no error document |
|
XcapException(int statusCode,
java.lang.String elementTag)
Constructor, uses the default content type of application/xcap-error+xml and returns an error document with a single error tag |
|
XcapException(int statusCode,
java.lang.String elementTag,
java.lang.String attributeName,
java.lang.String attributeValue)
Constructor, uses the default content type of application/xcap-error+xml and returns an error document with a single error tag and its associated attribute |
|
XcapException(java.lang.String namespace,
int statusCode,
java.lang.String elementTag)
Constructor, uses the default content type of application/xcap-error+xml and returns an error document with a single error tag |
|
XcapException(java.lang.String namespace,
int statusCode,
java.lang.String elementTag,
java.lang.String attributeName,
java.lang.String attributeValue)
Constructor, uses the default content type of application/xcap-error+xml and returns an error document with a single error tag and its associated attribute |
Method Summary | |
---|---|
protected org.w3c.dom.Document |
createBaseErrorDocument()
Forms the base error document in which other exceptions may append their respective error elements |
java.lang.String |
getContentType()
Retrieves the HTTP Content Type |
org.w3c.dom.Document |
getErrorDocument()
Returns the error document associated with this exception. |
java.lang.String |
getErrorDocumentAsString()
Returns the error document as a String |
int |
getStatusCode()
Returns the HTTP status code |
void |
setErrorElement(java.lang.String elementTag)
Set a simple response with the given tag |
void |
setErrorElement(java.lang.String elementTag,
java.lang.String attributeName,
java.lang.String attributeValue)
Set a simple response with the given tag and attribute |
void |
setErrorElementNS(java.lang.String namespace,
java.lang.String elementTag)
Set a simple response with the given tag |
void |
setErrorElementNS(java.lang.String namespace,
java.lang.String elementTag,
java.lang.String attributeName,
java.lang.String attributeValue)
Set a simple response with the given tag and attribute |
void |
setupResponse(XcapServerResponse xcapResponse)
Sets up the response based on the XcapException |
Methods inherited from class com.ibm.xdms.exception.XdmsException |
---|
createLocalizedMessage, createLocalizedXdmsException, createServerMessage, createServerXdmsException, setupResponse |
Methods inherited from class javax.servlet.ServletException |
---|
getRootCause |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String BASE_ERROR_DOC_PREFIX
protected static final java.lang.String BASE_ERROR_DOC_SUFFIX
protected static final java.lang.String BASE_ERROR_DOC
public static final java.lang.String CONTENT_TYPE_XCAP_ERROR
protected java.lang.Object errorDocumentLock
protected static final java.util.logging.Logger LOGGER
Constructor Detail |
---|
public XcapException(int statusCode)
statusCode
- HTTP Response Code which should be returned to the
clientpublic XcapException(int statusCode, java.lang.String elementTag)
statusCode
- HTTP Response Code which should be returned to the
clientelementTag
- Element tag namepublic XcapException(java.lang.String namespace, int statusCode, java.lang.String elementTag)
namespace
- The namespace of the elementstatusCode
- HTTP Response Code which should be returned to the
clientelementTag
- Element tag namepublic XcapException(int statusCode, java.lang.String elementTag, java.lang.String attributeName, java.lang.String attributeValue)
statusCode
- HTTP Response Code which should be returned to the
clientelementTag
- Element tag nameattributeName
- Attribute NameattributeValue
- Attribute Valuepublic XcapException(java.lang.String namespace, int statusCode, java.lang.String elementTag, java.lang.String attributeName, java.lang.String attributeValue)
namespace
- The namespace of the elementstatusCode
- HTTP Response Code which should be returned to the
clientelementTag
- Element tag nameattributeName
- Attribute NameattributeValue
- Attribute ValueMethod Detail |
---|
public org.w3c.dom.Document getErrorDocument()
public java.lang.String getErrorDocumentAsString()
protected org.w3c.dom.Document createBaseErrorDocument()
null
if there was an
error creating the docment (should not happen!!!!)public int getStatusCode()
public void setErrorElement(java.lang.String elementTag)
elementTag
- Element tag namepublic void setErrorElement(java.lang.String elementTag, java.lang.String attributeName, java.lang.String attributeValue)
elementTag
- Element tag nameattributeName
- Attribute NameattributeValue
- Attribute Valuepublic void setErrorElementNS(java.lang.String namespace, java.lang.String elementTag)
namespace
- The namespace of the elementelementTag
- Element tag namepublic void setErrorElementNS(java.lang.String namespace, java.lang.String elementTag, java.lang.String attributeName, java.lang.String attributeValue)
namespace
- The namespace of the elementelementTag
- Element tag nameattributeName
- Attribute NameattributeValue
- Attribute Valuepublic java.lang.String getContentType()
public void setupResponse(XcapServerResponse xcapResponse) throws java.io.IOException
setupResponse
in class XdmsException
xcapResponse
- XcapServerResponse
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |