PortletPresentationContext Class

com.bea.netuix.servlets.controls.portlet
PortletPresentationContext Class

public class PortletPresentationContext

    extends WindowPresentationContext

This class represents a portal portlet component. All presentation-related attributes of a portlet component are available from instances of this class. Such instances are typically used during portal rendering via look and feel skeleton files (e.g. window.jsp).

Depending on the context of invocation of this classes methods, some may throw UnsupportedOperationException. Such contexts include within remote WSRP portlets. All methods should function normally for locally rendered portlets.

Related Topics

PortletPresentationContext.getPortletPresentationContext(HttpServletRequest)


Hierarchy
Object
  ControlContext
    PresentationContext
      WindowPresentationContext
        PortletPresentationContext
All Implemented Interfaces

Serializable
Direct Known Subclasses

WebflowPresentationContext

Field Summary

   
Fields from  com.bea.netuix.servlets.controls.window.WindowPresentationContext
CLASS_NAME
 
Fields from  com.bea.netuix.servlets.controls.ControlContext
debug
 

Constructor Summary

PortletPresentationContext()

 

Method Summary

public String
getInstanceLabel()
Return the instance label for the portlet.
public String
getLabel()
Return the unique label for the portlet.
public PagePresentationContext
getPagePresentationContext()
Return the portlets parent PagePresentationContext.
public static PortletPresentationContext
getPortletPresentationContext(HttpServletRequest request)
This is a convenience method for returning a reference to the current PortletPresentationContext.
public String
getPortletUri()
Getter for the portlet's URI.
public PortletPreferences
getPreferences(HttpServletRequest request)
Returns a read-only copy of preferences for this portlet.
public boolean
isCapable(Capability capability)
Returns true if this control has the specified capability.
public boolean
isDefaultMinimized()
Returns the value for defaultMinimized.
 
Methods from  com.bea.netuix.servlets.controls.window.WindowPresentationContext
getCapability, getContentPresentationClass, getContentPresentationContextChildren, getContentPresentationStyle, getDefinitionId, getDefinitionLabel, getInstanceId, getOrientation, getParentPagePresentationContext, getPreviousWindowMode, getThemePresentationContext, getTitle, getTitlebarPresentationContext, getWindowMode, getWindowPresentationContext, getWindowState, isPacked
 
Methods from  com.bea.netuix.servlets.controls.PresentationContext
getChildren, getChildren, getFirstChild, getParsedProperties, getPresentationClass, getPresentationId, getPresentationStyle, getProperties, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsInt, getResolvedLocale, getTagName, isVisible, setVisible
 
Methods from  com.bea.netuix.servlets.controls.ControlContext
getContextFromRequest, getControl, getRequestKey, getUniqueId, removeContextFromRequest, setContextInRequest
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   

Constructor Detail

PortletPresentationContext

protected PortletPresentationContext()

 

Method Detail

getInstanceLabel() Method

public String getInstanceLabel()
Return the instance label for the portlet. This is a unique identifier for the portlet.

Returns

The portlet's instance label

getLabel() Method

public String getLabel()
Return the unique label for the portlet. For portlets this is the same as calling PortletPresentationContext.getInstanceLabel().

Overrides
WindowPresentationContext.getLabel()

Returns

The portlet's unique label

getPagePresentationContext() Method

public PagePresentationContext getPagePresentationContext()
Return the portlets parent PagePresentationContext.

Returns

If this portlet is placed on a page then a reference to the parent page's backing context, otherwise null.

getPortletPresentationContext(HttpServletRequest) Method

public static PortletPresentationContext getPortletPresentationContext(HttpServletRequest request)
This is a convenience method for returning a reference to the current PortletPresentationContext. Note this method will only work if called from within a portal (typically, from the window.jsp skeleton). This method may return null if called when no appropriate context exists, but such a context should safely exist when being fetched from the associated skeleton JSP during normal portal rendering.

Parameters

request
The current HTTPServletRequest instance

Returns

A reference to the current PortletPresentationContext, if any

getPortletUri() Method

public String getPortletUri()
Getter for the portlet's URI. Example: /portlets/myportlet/myportlet.portlet

Returns

A String containing the portlets uri.

getPreferences(HttpServletRequest) Method

public PortletPreferences getPreferences(HttpServletRequest request)
Returns a read-only copy of preferences for this portlet.

Parameters

request
The current HTTPServletRequest instance

Returns

The read-only preferences instance

isCapable(Capability) Method

public boolean isCapable(Capability capability)
Returns true if this control has the specified capability.

Overrides
WindowPresentationContext.isCapable(Capability)

Parameters

capability
A window mode or state

Related Topics

WindowCapabilities


isDefaultMinimized() Method

public boolean isDefaultMinimized()
Returns the value for defaultMinimized.