Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.netuix.servlets.controls.page
Class BookPresentationContext

    java.lang.Object
      com.bea.netuix.servlets.controls.ControlContext
          com.bea.netuix.servlets.controls.PresentationContext
              com.bea.netuix.servlets.controls.window.WindowPresentationContext
                  com.bea.netuix.servlets.controls.page.PagePresentationContext
                      com.bea.netuix.servlets.controls.page.BookPresentationContext

All Implemented Interfaces
  Serializable

    public class BookPresentationContext

extends PagePresentationContext

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

See Also
  `getBookPresentationContext(javax.servlet.http.HttpServletRequest)`, Serialized Form

Field Summary
`protected static String` | `CLASS_NAME`

Method Summary
`String` | `getActivePage()` Get the currently active page's label.
`static BookPresentationContext` | `getBookPresentationContext(javax.servlet.http.HttpServletRequest request)` This is a convenience method for returning a reference to the current `BookPresentationContext`.
`BookPresentationContext` | `getBookPresentationContextRecursive(String definitionLabel)` Return a book searching the entire tree recursively.
`String` | `getCurrentPage()` Deprecated Use `getActivePage()` instead
`String` | `getDefaultPage()` The default page's label as specified for the book.
`List` | `getEntitledPagePresentationContexts()` Return the collection of entitled `PagePresentationContext`s (which may be either `BookPresentationContext` or `PagePresentationContext` objects) for this book.``
`String` | `getLabel()` Gets the label for this book.
`MenuPresentationContext` | `getMenuPresentationContext()` Get the presentation context corresponding to the menu for this book.
`int` | `getPageCount()` Return the total number of pages contained in this book.
`PagePresentationContext` | `getPagePresentationContext(String instanceId)` Return a page from the list of pages for this book.
`PagePresentationContext` | `getPagePresentationContextByUniqueId(String uniqueId)` Return a page from the list of pages for this book.
`PagePresentationContext` | `getPagePresentationContextByUnqiueId(String uniqueId)` Deprecated Misspelled method name; use `getPagePresentationContextByUniqueId(String)`
`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.
`ArrayList` | `getPagePresentationContexts()` Deprecated Use `getEntitledPagePresentationContexts()`
`PortletPresentationContext` | `getPortletPresentationContextRecursive(String instanceLabel)` Return the `PortletPresentationContext` matching the supplied instance label.
`PortletPresentationContext[]` | `getPortletsPresentationContextRecursive(String definitionLabel)` Returns `PortletPresentationContext`s matching the supplied definition label.
`boolean` | `isContained()` Returns true if the Book represented by this presentation context is "contained", that is if the the Book's next Book, Window, or Page ancestor is a Book or Window then it is contained and this method will return true.
`boolean` | `isDesktopBook()` Returns true if the Book represented by this presentation context is the desktop Book in otherwords is it the top most Book in the control tree.
`boolean` | `isLikePage()` Indicates whether or not this book is a page in another book.

Methods inherited from class com.bea.netuix.servlets.controls.page.PagePresentationContext
`getActiveImage, getInactiveImage, getPagePresentationContext, getParentBookPresentationContext, getRolloverImage, getWindowPresentationContexts, isActive, isDisplayed, isHidden, isVisible`

Methods inherited from class com.bea.netuix.servlets.controls.window.WindowPresentationContext
`getCapability, getContentAttributeRenderer, getContentPresentationClass, getContentPresentationContextChildren, getContentPresentationStyle, getDefinitionId, getDefinitionLabel, getInstanceId, getLocalInstanceId, getMetaData, getMetaDatas, getOrientation, getParentPagePresentationContext, getPreviousWindowMode, getThemePresentationContext, getTitle, getTitlebarPresentationContext, getWindowMode, getWindowPresentationContext, getWindowState, isCapable, isPacked`

Methods inherited from class com.bea.netuix.servlets.controls.PresentationContext
`getAttributeRenderer, getChildren, getChildren, getFirstChild, getOrderedChildren, getParsedProperties, getPresentationClass, getPresentationId, getPresentationStyle, getProperties, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsInt, getRenderFormat, getResolvedLocale, getTagName, 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

### getLabel

    public String getLabel()

  Gets the label for this book. This is equivalent to calling `WindowPresentationContext.getDefinitionLabel()`.

  Overrides:
    `getLabel` in class `PagePresentationContext`
  Returns
    The page's label

### getDefaultPage

    public String getDefaultPage()

  The default page's label as specified for the book.

  Returns
    The label of the default page

### getCurrentPage

    @Deprecated
    public String getCurrentPage()

  Deprecated Use `getActivePage()` instead

  Get the currently active page's label. This is equivalent to calling `getActivePage()`.

  Returns
    The label of the current page
  See Also
    `getActivePage()`

### getActivePage

    public String getActivePage()

  Get the currently active page's label.

  Returns
    The label of the current page

### getMenuPresentationContext

    public MenuPresentationContext getMenuPresentationContext()

  Get the presentation context corresponding to the menu for this book. Returns null if this book has no menu.

### getPagePresentationContexts

    @Deprecated
    public ArrayList getPagePresentationContexts()

  Deprecated Use `getEntitledPagePresentationContexts()`

  Return the collection of `PagePresentationContext`s (which may be either `BookPresentationContext` or `PagePresentationContext` objects) for this book. If no pages exist returns an empty list.

  Returns
    An ArrayList of PagePresentationContext and/or BookPresentationContext objects
  See Also
    `getEntitledPagePresentationContexts()`

### getEntitledPagePresentationContexts

    public List getEntitledPagePresentationContexts()

  Return the collection of entitled `PagePresentationContext`s (which may be either `BookPresentationContext` or `PagePresentationContext` objects) for this book. If no pages exist returns an empty list.

  ``
  Returns
    A list of PagePresentationContext and/or BookPresentationContext objects

### getPageCount

    public int getPageCount()

  Return the total number of pages contained in this book.

  Returns
    The total number of pages

### isDesktopBook

    public boolean isDesktopBook()

  Returns true if the Book represented by this presentation context is the desktop Book in otherwords is it the top most Book in the control tree.

  Returns
    True, if this is the primary book in the portal

### isContained

    public boolean isContained()

  Returns true if the Book represented by this presentation context is "contained", that is if the the Book's next Book, Window, or Page ancestor is a Book or Window then it is contained and this method will return true. This is useful for formatting the book differently when it is a child of such a component.

  Returns
    True, if this book is directly contained by another book or window

### isLikePage

    public boolean isLikePage()

  Indicates whether or not this book is a page in another book.

  Returns
    True, if this book is a page in another book

### getPagePresentationContext

    public PagePresentationContext getPagePresentationContext(String instanceId)

  Return a page from the list of pages for this book. If the page does not exist, null is returned. Note this method will not search recursively, if you need that functionality call `getPagePresentationContextRecursive(java.lang.String)`.

  Returns
    An immediate page child for the given instanceId, or null if it does not exist

### getPagePresentationContextByUnqiueId

    @Deprecated
    public PagePresentationContext getPagePresentationContextByUnqiueId(String uniqueId)

  Deprecated Misspelled method name; use `getPagePresentationContextByUniqueId(String)`

  Return a page from the list of pages for this book. If the page does not exist, null is returned.

  Returns
    The PagePresentationContext for the unique id, or null if it is not found

### getPagePresentationContextByUniqueId

    public PagePresentationContext getPagePresentationContextByUniqueId(String uniqueId)

  Return a page from the list of pages for this book. If the page does not exist or this is called from a .portal file, null is returned.

  Returns
    The PagePresentationContext for the unique id, or null if it is not found

### getBookPresentationContextRecursive

    public BookPresentationContext getBookPresentationContextRecursive(String definitionLabel)

  Return a book searching the entire tree recursively. If you are interested in both books AND pages use `getPagePresentationContextRecursive(java.lang.String)` as that method returns both.

  Overrides:
    `getBookPresentationContextRecursive` in class `PagePresentationContext`
  Parameters
    `definitionLabel` - The definitionLabel of the desired book
  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.

  Overrides:
    `getPagePresentationContextRecursive` in class `PagePresentationContext`
  Parameters
    `definitionLabel` - The definitionLabel of the desired page or book
  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 `PortletPresentationContext` matching the supplied instance label.

  Overrides:
    `getPortletPresentationContextRecursive` in class `PagePresentationContext`
  Parameters
    `instanceLabel` - The unique instance label for the desired portlet
  Returns
    A reference to the PortletPresentationContext if it exists; null otherwise

### getPortletsPresentationContextRecursive

    public PortletPresentationContext[] getPortletsPresentationContextRecursive(String definitionLabel)

  Returns `PortletPresentationContext`s 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(java.lang.String)`.

  Overrides:
    `getPortletsPresentationContextRecursive` in class `PagePresentationContext`
  Parameters
    `definitionLabel` - The definition label for the desired portlet(s)
  Returns
    A non-null array of PortletPresentationContexts

### getBookPresentationContext

    public static BookPresentationContext getBookPresentationContext(javax.servlet.http.HttpServletRequest request)

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

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

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.