Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.netuix.servlets.controls.application
Class DesktopPresentationContext

    java.lang.Object
      ControlContext
          com.bea.netuix.servlets.controls.PresentationContext
              com.bea.netuix.servlets.controls.application.DesktopPresentationContext

    public class DesktopPresentationContext

extends PresentationContext

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

See Also
  `getDesktopPresentationContext(HttpServletRequest)`

Field Summary
`protected static String` | `CLASS_NAME`

Method Summary
`BookPresentationContext` | `getBookPresentationContext()` Retrieve the main book (top level) presentation context.
`BookPresentationContext` | `getBookPresentationContextRecursive(String definitionLabel)` Returns a book's presentation context, searching the entire tree recursively.
`String` | `getDefinitionLabel()` Returns the definitionLabel of this desktop.
`static DesktopPresentationContext` | `getDesktopPresentationContext(HttpServletRequest request)` This is a convenience method for returning a reference to the one and only `DesktopPresentationContext`.
`PagePresentationContext` | `getDisplayedPagePresentationContext()` Return the last displayed page (not book).
`HeaderPresentationContext` | `getHeaderPresentationContext()` Get the header context for this desktop.
`LookAndFeelDefinitionId` | `getLookAndFeelDefinitionId()` Return the look and feel definition id.
`String` | `getLookAndFeelDefinitionLabel()` Return the look and feel definition label.
`PagePresentationContext` | `getPagePresentationContextRecursive(String definitionLabel)` Return a book or a page but traverse the entire tree; this will go inside books that are on pages too.
`PortletPresentationContext` | `getPortletPresentationContextRecursive(String instanceLabel)` Return the portlet presentation context matching the supplied instance label.
`PortletPresentationContext[]` | `getPortletsPresentationContextRecursive(String definitionLabel)` Return all portlet presentation contexts matching the supplied definition label.
`ShellPresentationContext` | `getShellPresentationContext()` Return a reference to the shell presentation context.
`String` | `getTitle()` Returns the title of this desktop instance.

Methods inherited from class com.bea.netuix.servlets.controls.PresentationContext
`getAttributeRenderer, getChildren, getChildren, getFirstChild, getParsedProperties, getPresentationClass, getPresentationId, getPresentationStyle, getProperties, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsInt, getRenderFormat, getResolvedLocale, getTagName, isVisible, setVisible`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CLASS_NAME

    protected static final String CLASS_NAME

Method Detail

### getDesktopPresentationContext

    public static DesktopPresentationContext getDesktopPresentationContext(HttpServletRequest request)

  This is a convenience method for returning a reference to the one and only `DesktopPresentationContext`. Note this method will only work if called from within a portal (typically, from the desktop.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 DesktopPresentationContext, if any

### getShellPresentationContext

    public ShellPresentationContext getShellPresentationContext()

  Return a reference to the shell presentation context. This is a convenience method for returning the presentation context for the solitary, required child shell. This is equivalent to calling `getFirstChild("application:shell")`.

  Returns
    The child ShellPresentationContext instance or null if it does not exist
  See Also
    `#getChildren(String)`

### getLookAndFeelDefinitionId

    public LookAndFeelDefinitionId getLookAndFeelDefinitionId()

  Return the look and feel definition id. This method will only work for stremed portals.

  Returns
    look and feel definition id or null if portal file.

### getLookAndFeelDefinitionLabel

    public String getLookAndFeelDefinitionLabel()

  Return the look and feel definition label.

  Returns
    look and feel definition label as defined by the developer.

### getBookPresentationContext

    public BookPresentationContext getBookPresentationContext()

  Retrieve the main book (top level) presentation context. This is a convenience method for returning the solitary, primary book for the portal. This is especially useful since the primary book is not an immediate child of the desktop or shell.

  Returns
    A reference to the main book presentation context or null if it does not exist

### getBookPresentationContextRecursive

    public BookPresentationContext getBookPresentationContextRecursive(String definitionLabel)

  Returns a book's presentation context, searching the entire tree recursively. If you are interested in both books AND pages use `getPagePresentationContextRecursive()` as that method returns both.

  Parameters
    `definitionLabel` - The definition label of the book of interest
  Returns
    The book of interest or null if it is not found

### getPagePresentationContextRecursive

    public PagePresentationContext getPagePresentationContextRecursive(String definitionLabel)

  Return a book or a page but traverse the entire tree; this will go inside books that are on pages too.

  Parameters
    `definitionLabel` - The definition label of the page or book of interest
  Returns
    A PagePresentationContext (or BookPresentationContext if a book) of the page or book with a matching definition label

### getPortletPresentationContextRecursive

    public PortletPresentationContext getPortletPresentationContextRecursive(String instanceLabel)

  Return the portlet presentation context matching the supplied instance label.

  Parameters
    `instanceLabel` - The unique instance label of the desired portlet
  Returns
    A reference to the portlet's PresentationContext if it exists; null otherwise

### getPortletsPresentationContextRecursive

    public PortletPresentationContext[] getPortletsPresentationContextRecursive(String definitionLabel)

  Return all portlet presentation contexts matching the supplied definition label. Since many portlets can share the same definition label, more than one portlet can be returned. If you are interested in just one portlet then try `getPortletPresentationContextRecursive(String instanceLabel)`.

  Parameters
    `definitionLabel` - The label of the desired portlet
  Returns
    A non-null array of PortletPresentationContexts

### getDisplayedPagePresentationContext

    public PagePresentationContext getDisplayedPagePresentationContext()

  Return the last displayed page (not book). This method listens to Page Change events and remembers the last page that was activated in the Desktop. If no page changes have occurred then the first default page found will be returned.

  Returns
    Last displayed PagePresentationContext

### getTitle

    public String getTitle()

  Returns the title of this desktop instance. This value may be localized if localized values exist.

  Returns
    The desktop's localized title

### getDefinitionLabel

    public String getDefinitionLabel()

  Returns the definitionLabel of this desktop. This value should not be null.

  Returns
    The non-null definitionLabel for the desktop

### getHeaderPresentationContext

    public HeaderPresentationContext getHeaderPresentationContext()

  Get the header context for this desktop. Return null if there is no header.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 BEA Systems, Inc. All Rights Reserved