com.ibm.portal.resolver.exceptions
Class LocalizedSAXException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.xml.sax.SAXException
              extended by com.ibm.portal.resolver.exceptions.LocalizedSAXException
All Implemented Interfaces:
Localized, LocalizedStatus, Constants, java.io.Serializable
Direct Known Subclasses:
MessageCodeSAXException

public class LocalizedSAXException
extends org.xml.sax.SAXException
implements LocalizedStatus, Constants

Helper exception to wrap localization information into a SAXException

Since:
7.0
See Also:
Serialized Form

Field Summary
protected  LocalizedStatus delegate
           
protected static int SC_DEFAULT
           
 
Fields inherited from interface com.ibm.portal.resolver.exceptions.Constants
SC_BAD_REQUEST, SC_GONE, SC_INTERNAL_SERVER_ERROR, SC_NOT_FOUND, SC_REQUEST_TIMEOUT, SC_SERVICE_UNAVAILABLE, SC_UNAUTHORIZED
 
Constructor Summary
LocalizedSAXException()
           
LocalizedSAXException(int aStatus, java.lang.Throwable aCause)
           
LocalizedSAXException(Localized aDelegate, int aStatus)
           
LocalizedSAXException(Localized aDelegate, int aStatus, java.lang.Throwable aCause)
           
LocalizedSAXException(LocalizedStatus aDelegate, java.lang.Throwable aCause)
           
LocalizedSAXException(Localized aDelegate, java.lang.Throwable aCause)
           
LocalizedSAXException(java.lang.Throwable aCause)
           
 
Method Summary
protected  LocalizedStatus getDelegate()
          Returns the localized status to delegate the translation to
 java.lang.String getDescription(java.util.Locale aLocale)
          Returns the description of this object in the given locale.
 java.lang.Exception getException()
           
 ListModel<java.util.Locale> getLocales()
          Returns a list model containing the locales that are supported by this object.
 int getStatus()
          Returns a status code that can be evaluated by the handler of the exception implementing LocalizedStatus.
 java.lang.String getTitle(java.util.Locale aLocale)
          Returns the title of this object in the given locale.
 
Methods inherited from class org.xml.sax.SAXException
getMessage, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SC_DEFAULT

protected static final int SC_DEFAULT
See Also:
Constant Field Values

delegate

protected final LocalizedStatus delegate
Constructor Detail

LocalizedSAXException

public LocalizedSAXException()

LocalizedSAXException

public LocalizedSAXException(int aStatus,
                             java.lang.Throwable aCause)

LocalizedSAXException

public LocalizedSAXException(Localized aDelegate,
                             int aStatus)

LocalizedSAXException

public LocalizedSAXException(Localized aDelegate,
                             int aStatus,
                             java.lang.Throwable aCause)

LocalizedSAXException

public LocalizedSAXException(Localized aDelegate,
                             java.lang.Throwable aCause)

LocalizedSAXException

public LocalizedSAXException(LocalizedStatus aDelegate,
                             java.lang.Throwable aCause)

LocalizedSAXException

public LocalizedSAXException(java.lang.Throwable aCause)
Method Detail

getDelegate

protected LocalizedStatus getDelegate()
Returns the localized status to delegate the translation to

Returns:
the localized status, not null

getDescription

public java.lang.String getDescription(java.util.Locale aLocale)
Description copied from interface: Localized
Returns the description of this object in the given locale.

Specified by:
getDescription in interface Localized
Parameters:
aLocale - the locale for which to retrieve the description, must not be null.
Returns:
the description of this node in the given locale. If a description is not available in the given locale, this method will return null. It is up to the invoker of the method to implement an appropriate fallback mechanism

getException

public java.lang.Exception getException()
Overrides:
getException in class org.xml.sax.SAXException

getLocales

public ListModel<java.util.Locale> getLocales()
Description copied from interface: Localized
Returns a list model containing the locales that are supported by this object. The presence of a locale in this list does not mean that a title and description is available, but rather that either one or both are available in that locale.

Specified by:
getLocales in interface Localized
Returns:
a list of locales defined for this object, returns an empty ListModel if no locales are supported.

getStatus

public int getStatus()
Description copied from interface: LocalizedStatus
Returns a status code that can be evaluated by the handler of the exception implementing LocalizedStatus. It is up to the handler of the exception how to interpret the status code.

Specified by:
getStatus in interface LocalizedStatus
Returns:
a status code

getTitle

public java.lang.String getTitle(java.util.Locale aLocale)
Description copied from interface: Localized
Returns the title of this object in the given locale.

Specified by:
getTitle in interface Localized
Parameters:
aLocale - the locale for which to retrieve the title, must not be null.
Returns:
the title of this node in the given locale. If a title is not available in the given locale, this method will return null. It is up to the invoker of the method to implement an appropriate fallback mechanism.