com.ibm.portal.portlet.service
Class PortletServiceUnavailableException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.portlet.PortletException
              extended by com.ibm.portal.portlet.service.PortletServiceUnavailableException
All Implemented Interfaces:
Localized, java.io.Serializable
Direct Known Subclasses:
PortletServiceInstantiationException, PortletServiceInvalidInterfaceException

public abstract class PortletServiceUnavailableException
extends javax.portlet.PortletException
implements Localized

Exception that indicates that a requested portlet service is not available. Possible reasons may be that the service was not configured or that the service failed during intialization.

Note that a service configuration problem may also be indicated by a failing JNDI lookup for the portlet service home.

All exceptions of this type indicate permanent unavailability, unless a subclass specifies explicitly that the unavailability is only temporary. If a portlet service is permanently unavailable, any further requests to retrieve the same service interface using the same JNDI name for the service home will also fail.

This exception derives from PortletException so that portlets are not required to implement special error handling if they have no way of operating without the requested service. In this case, the exception can simply be propagated to the portal, so that the portlet becomes unavailable for the request.

This exception is an abstract class. Services that need to indicate errors in their initialization process must throw service-specific subclasses of this exception.

Since:
5.1
See Also:
Serialized Form

Constructor Summary
protected PortletServiceUnavailableException()
           
protected PortletServiceUnavailableException(java.lang.Throwable cause)
           
 
Method Summary
abstract  java.lang.String getDescription(java.util.Locale aLocale)
          Return a language-specific detailed explanation of this exception.
abstract  ListModel getLocales()
          Return the languages for which language-specific exception messages and explanations are provided.
abstract  java.lang.String getTitle(java.util.Locale aLocale)
          Return a language-specific exception message for this exception.
 
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
 

Constructor Detail

PortletServiceUnavailableException

protected PortletServiceUnavailableException()

PortletServiceUnavailableException

protected PortletServiceUnavailableException(java.lang.Throwable cause)
Method Detail

getTitle

public abstract java.lang.String getTitle(java.util.Locale aLocale)
Return a language-specific exception message for this exception. Returns null if no message is available for the requested 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.

getDescription

public abstract java.lang.String getDescription(java.util.Locale aLocale)
Return a language-specific detailed explanation of this exception. Returns null if no explanation is available for the requested 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

getLocales

public abstract ListModel getLocales()
Return the languages for which language-specific exception messages and explanations are provided. Returns a ListModel with an empty iterator if no language-specific information is provided; never returns null.

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