Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
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
      com.bea.netuix.servlets.controls.ControlContext
          com.bea.netuix.servlets.controls.PresentationContext
              com.bea.netuix.servlets.controls.application.DesktopPresentationContext

All Implemented Interfaces:
  Serializable

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(javax.servlet.http.HttpServletRequest)`, Serialized Form

Field Summary
`protected static String` | `CLASS_NAME`

Fields inherited from class com.bea.netuix.servlets.controls.ControlContext
`debug`

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`.
`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
`getChildren, getChildren, getFirstChild, getParsedProperties, getPresentationClass, getPresentationId, getPresentationStyle, getProperties, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsInt, getResolvedLocale, getTagName, isVisible, setVisible`

Methods inherited from class com.bea.netuix.servlets.controls.ControlContext
`getContextFromRequest, getContextFromRequest, getControl, getRequestKey, getUniqueId, removeContextFromRequest, setContextInRequest`

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

### 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

### getDefinitionLabel

    public String getDefinitionLabel()

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

  Returns:
    The non-null definitionLabel for the desktop

### 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

### 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.

### 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

### 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)`

### 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

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

Copyright © 2004 BEA Systems, Inc. All Rights Reserved