org.jasig.portal.channels.error.error2xml
Class ResourceMissingExceptionToElement
java.lang.Object
org.jasig.portal.channels.error.error2xml.ResourceMissingExceptionToElement
- All Implemented Interfaces:
- IThrowableToElement
public class ResourceMissingExceptionToElement
- extends java.lang.Object
- implements IThrowableToElement
Translates ResourceMissingException instances to XML Elements.
- Since:
- uPortal 2.5
- Version:
- $Revision: 1.2 $ $Date: 2005/04/17 20:54:07 $
- Author:
- andrew.petro@yale.edu
Method Summary |
boolean |
supports(java.lang.Class c)
Returns true if the implementation knows how to translate an instance
of the given class into an Element (throwableToElement() will return non-null)
for instances of the class, which must extend Throwable). |
org.w3c.dom.Element |
throwableToElement(java.lang.Throwable t,
org.w3c.dom.Document parentDoc)
Obtain an Element representing the throwable. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
throwableToElement
private ThrowableToElement throwableToElement
ResourceMissingExceptionToElement
public ResourceMissingExceptionToElement()
throwableToElement
public org.w3c.dom.Element throwableToElement(java.lang.Throwable t,
org.w3c.dom.Document parentDoc)
throws java.lang.IllegalArgumentException
- Description copied from interface:
IThrowableToElement
- Obtain an Element representing the throwable.
Throws IllegalArgumentException if t is null.
Throws IllegalArgumentException if t is not supported, as indicated by
the supports() method.
- Specified by:
throwableToElement
in interface IThrowableToElement
- Parameters:
t
- a supported throwableparentDoc
- document into which the element is to go
- Returns:
- an Element representing the Element
- Throws:
java.lang.IllegalArgumentException
- if t is null.
supports
public boolean supports(java.lang.Class c)
throws java.lang.IllegalArgumentException
- Description copied from interface:
IThrowableToElement
- Returns true if the implementation knows how to translate an instance
of the given class into an Element (throwableToElement() will return non-null)
for instances of the class, which must extend Throwable). Returns false
if the implementation will return null for throwableToNode() on an instance
of the class. Throws IllegalArgumentException if c is not a class which
extends Throwable. Throws IllegalArgumentException if c is null.
- Specified by:
supports
in interface IThrowableToElement
- Parameters:
c
- a Class extending Throwable
- Returns:
- true if handles instances of c, false otherwise
- Throws:
java.lang.IllegalArgumentException
- if c is null or does not extend Throwable