PortletMode class represents the possible modes that a
portlet can assume.
A portlet mode indicates the function a portlet is performing. Normally, portlets perform different tasks and create different content depending on the function they are currently performing. When invoking a portlet, the portlet container provides the current portlet mode to the portlet.
Portlets can programmatically change their portlet mode when processing an action request.
This class defines the default portlet modes EDIT, HELP, VIEW. Additional portlet modes may be defined
by calling the constructor of this class. If a portal/portlet-container does not support a custom portlet mode
defined in the portlet application deployment descriptor, the custom portlet mode will be ignored by the
portal/portlet container.
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| public static final PortletMode | EDIT
Within the |
| public static final PortletMode | HELP
When in |
| public static final PortletMode | UNDEFINED
The portlet mode
UNDEFINED is returned by the
getPortletMode method when the portlet mode is not available. |
| public static final PortletMode | VIEW
The expected functionality for a portlet in |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true, if the specified object is equal with this portlet modethe portlet mode to compare this portlet mode with object)Overrides java. |
| public int | Returns: hash code value for this portlet modeOverrides java. |
| public String | Returns: String representation of this portlet modeOverrides java. |
| _name | back to summary |
|---|---|
| private String _name | |
| EDIT | back to summary |
|---|---|
| public static final PortletMode EDIT Within the
Typically, portlets in This mode is optional.
The string value for this mode is | |
| HELP | back to summary |
|---|---|
| public static final PortletMode HELP When in This mode is optional.
The string value for this mode is | |
| UNDEFINED | back to summary |
|---|---|
| public static final PortletMode UNDEFINED The portlet mode
UNDEFINED is returned by the
getPortletMode method when the portlet mode is not available.
This mode may not be used to set the portlet mode in the
The string value for this mode is
| |
| VIEW | back to summary |
|---|---|
| public static final PortletMode VIEW The expected functionality for a portlet in This mode must be supported by the portlet.
The string value for this mode is | |
| PortletMode | back to summary |
|---|---|
| public PortletMode()
No-arg constructor to make object proxyable
| |
| PortletMode | back to summary |
|---|---|
| public PortletMode(String name) Creates a new portlet mode with the given name. Upper case letters in the name are converted to lower case letters.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Compares the specified object with this portlet mode for equality. Returns
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns the hash code value for this portlet mode. The hash code is constructed by producing the hash value of the String value of this mode.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a String representation of this portlet mode. Portlet mode names are always lower case names.
| |