Top Description Fields Constructors Methods
javax.portlet

public Class PortletModeException

extends PortletException
Class Inheritance

The PortletModeException is thrown when a portlet tries to use or set a portlet mode that is not supported by the current runtime environment or the portlet.

Field Summary

Modifier and TypeField and Description
private transient PortletMode
private static final long

Constructor Summary

AccessConstructor and Description
public
PortletModeException(String
the exception text
text
,
PortletMode
the mode causing the exception
mode
)

Constructs a new portlet mode exception with the given text and the portlet mode that caused this exception.

public
PortletModeException(String
the exception text
text
,
Throwable
the root cause
cause
,
PortletMode
the mode causing the exception
mode
)

Constructs a new portlet mode exception when the portlet needs to do the following:

  • throw an exception
  • include a message about the "root cause" that interfered with its normal operation
  • include a description message
  • include the portlet mode that caused this exception
public
PortletModeException(Throwable
the root cause
cause
,
PortletMode
the mode causing the exception
mode
)

Constructs a new portlet mode exception when the portlet needs to throw an exception.

Method Summary

Modifier and TypeMethod and Description
public PortletMode

Returns:

the portlet mode that caused this exception
getMode
()

Returns the unsupported portlet mode causing this exception.

Field Detail

_modeback to summary
private transient PortletMode _mode
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.portlet.PortletException.serialVersionUID.

Constructor Detail

PortletModeExceptionback to summary
public PortletModeException(String text, PortletMode mode)

Constructs a new portlet mode exception with the given text and the portlet mode that caused this exception. The portlet container may use the text and portlet mode write it to a log.

Parameters
text:String

the exception text

mode:PortletMode

the mode causing the exception

PortletModeExceptionback to summary
public PortletModeException(String text, Throwable cause, PortletMode mode)

Constructs a new portlet mode exception when the portlet needs to do the following:

  • throw an exception
  • include a message about the "root cause" that interfered with its normal operation
  • include a description message
  • include the portlet mode that caused this exception
Parameters
text:String

the exception text

cause:Throwable

the root cause

mode:PortletMode

the mode causing the exception

PortletModeExceptionback to summary
public PortletModeException(Throwable cause, PortletMode mode)

Constructs a new portlet mode exception when the portlet needs to throw an exception. The exception message is based on the localized message of the underlying exception and the portlet mode that caused this exception.

Parameters
cause:Throwable

the root cause

mode:PortletMode

the mode causing the exception

Method Detail

getModeback to summary
public PortletMode getMode()

Returns the unsupported portlet mode causing this exception.

Returns:PortletMode

the portlet mode that caused this exception