© 2005 BEA Systems, Inc.

com.bea.netuix.servlets.controls.page
Class BookBackingContext

java.lang.Object
  extended bycom.bea.netuix.servlets.controls.ControlContext
      extended bycom.bea.netuix.servlets.controls.BackingContext
          extended bycom.bea.netuix.servlets.controls.window.backing.WindowBackingContext
              extended bycom.bea.netuix.servlets.controls.page.PageBackingContext
                  extended bycom.bea.netuix.servlets.controls.page.BookBackingContext
All Implemented Interfaces:
Serializable

public class BookBackingContext
extends PageBackingContext

This is the backing context for a book. As such, it is meant to be called from backing files or pageflows. If you want to access this context from a JSP, look at BookPresentationContext instead.

Call getContextFromRequest to obtain the backing context for the active window.

See Also:
Serialized Form

Field Summary
protected static String CLASS_NAME
           
 
Fields inherited from class com.bea.netuix.servlets.controls.ControlContext
debug
 
Method Summary
 PageBackingContext getActivePageBackingContext()
          Return the PageBackingContext of the active page or null if there is none.
static BookBackingContext getBookBackingContext(HttpServletRequest request)
          Obtain a reference to the current BookBackingContext in the request.
 BookBackingContext getBookBackingContextRecursive(String definitionLabel)
          Return a book with a given label searching the entire tree recursively.
 BackingContext getContainerParentBackingContext()
          Returns the next "container" (Window, Page, or Book) ancestor BackingContext.
 String getCurrentPage()
          Returns the instanceId of the current page
 String getDefaultPage()
          Return the value of the underlying object's defaultPage attribute.
 List getEntitledPages()
          Deprecated. use getPageBackingContexts()
 PageBackingContext getPageBackingContextByDefinitionLabel(String definitionLabel)
          Returns the PageBackingContext of the child page specified by definitionLabel.
 PageBackingContext getPageBackingContextByInstanceId(String instanceId)
          Returns the PageBackingContext of the child page specified by instanceId.
 PageBackingContext getPageBackingContextByUnqiueId(String uniqueId)
          Returns the PageBackingContext of the child page specified by uniqueId.
 PageBackingContext getPageBackingContextRecursive(String definitionLabel)
          Return a book or a page with a given label, traversing the entire tree to find it.
 List getPageBackingContexts()
          Return the collection of BackingContexts (BookBackingContexts and PageBackingContexts) for the pages and books contained by the book this BackingContext represents.
 int getPageCount()
          Return the number of pages contained in the book that this BackingContext represents.
 List getPages()
          Deprecated. Use getPageBackingContexts() instead.W
 PortletBackingContext getPortletBackingContextRecursive(String instanceLabel)
          Return the portlet backing context matching the supplied instance label.
 PortletBackingContext[] getPortletsBackingContextRecursive(String definitionLabel)
          Return all portlet backing contexts matching the supplied definition label.
 boolean isContained()
          Returns true if the book represented by this backing context is "contained", that is if the the book's next book, window, or page ancestor is a book or window.
 boolean isDesktopBook()
          Returns true if the book represented by this backing context is the desktop Book (i.e. the top-most book in the portal).
 boolean isLikePage()
          Indicates whether or not the underlying book is a page in another book.
 
Methods inherited from class com.bea.netuix.servlets.controls.page.PageBackingContext
getActiveImage, getInactiveImage, getLabel, getMarkupName, getMarkupType, getPageBackingContext, getParentBookBackingContext, getParentPageBackingContext, getRolloverImage, getWindowBackingContexts, isActive, isDisplayed, isHidden, setActive, setActiveImage, setHidden, setInactiveImage, setRolloverImage
 
Methods inherited from class com.bea.netuix.servlets.controls.window.backing.WindowBackingContext
getCapability, getCapabilityVisible, getDefinitionId, getDefinitionLabel, getDescription, getInstanceId, getOrientation, getParentWindowBackingContext, getPlacementId, getPreviousWindowMode, getPreviousWindowState, getRenderedChildrenWindowBackingContexts, getTitle, getWindowMode, getWindowState, isCapable, isPacked, setCapabilityVisible, setDescription, setTitle, setupModeChangeEvent, setupModeChangeEvent, setupPageChangeEvent, setupStateChangeEvent, setupStateChangeEventFromParent
 
Methods inherited from class com.bea.netuix.servlets.controls.BackingContext
getChildrenBackingContexts, getParentBackingContext, getTopParentBackingContext, isBackingPhase, isVisible, setBackingPhase, setVisible
 
Methods inherited from class com.bea.netuix.servlets.controls.ControlContext
getContextKey, 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

getActivePageBackingContext

public PageBackingContext getActivePageBackingContext()
Return the PageBackingContext of the active page or null if there is none.

Returns:
the PageBackingContext of the active page or null if there is none.
See Also:
Book#getActivePage()

getBookBackingContext

public static BookBackingContext getBookBackingContext(HttpServletRequest request)

Obtain a reference to the current BookBackingContext in the request. Note: the BookBackingContext should only be obtained from a backing file. If you think you need this context from a JSP, look at BookPresentationContext.

Parameters:
request - http servlet request.
Returns:
a reference to the BookBackingContext or null if none exists.

getBookBackingContextRecursive

public BookBackingContext getBookBackingContextRecursive(String definitionLabel)
Return a book with a given label searching the entire tree recursively. If you are interested in both books AND pages use getPageBackingContextRecursive() as that method returns both. Note: this method may return null if called from the init() method of a backing context.

Overrides:
getBookBackingContextRecursive in class PageBackingContext
Parameters:
definitionLabel - of the book
Returns:
the Book of interest or null if not found.

getContainerParentBackingContext

public BackingContext getContainerParentBackingContext()
Returns the next "container" (Window, Page, or Book) ancestor BackingContext.

Returns:
the next "container" (Window, Page, or Book) ancestor BackingContext or null if there is none

getCurrentPage

public String getCurrentPage()
Returns the instanceId of the current page

Returns:
the instanceId of the current page
See Also:
Book#getCurrentPage()

getDefaultPage

public String getDefaultPage()
Return the value of the underlying object's defaultPage attribute.

Returns:
a String, the value of the underlying control's defaultPage attribute.

getEntitledPages

public List getEntitledPages()
Deprecated. use getPageBackingContexts()

Return the collection of entitled BackingContexts (BookBackingContexts and PageBackingContexts) for the pages and books contained by the book this BackingContext represents. This method filters out pages that are hidden or for which entitlements are not sufficient to view.

Returns:
an List of PageBackingContext/BookBackingContext objects. If no pages present, an empty list.

getPageBackingContextByDefinitionLabel

public PageBackingContext getPageBackingContextByDefinitionLabel(String definitionLabel)
Returns the PageBackingContext of the child page specified by definitionLabel. If the page is not found, null is returned. This method does not recursively go down the tree.


getPageBackingContextByInstanceId

public PageBackingContext getPageBackingContextByInstanceId(String instanceId)
Returns the PageBackingContext of the child page specified by instanceId. If the page is not found, null is returned. This method does not recursively go down the tree.


getPageBackingContextByUnqiueId

public PageBackingContext getPageBackingContextByUnqiueId(String uniqueId)
Returns the PageBackingContext of the child page specified by uniqueId. If the page is not found, null is returned. This method does not recursively go down the tree.


getPageBackingContextRecursive

public PageBackingContext getPageBackingContextRecursive(String definitionLabel)
Return a book or a page with a given label, traversing the entire tree to find it. This will go inside books that are on pages too. Note: this method may return null if called from the init() method of a backing context.

Overrides:
getPageBackingContextRecursive in class PageBackingContext
Parameters:
definitionLabel -
Returns:
the backing context of the page or book with the matching definition label.

getPageBackingContexts

public List getPageBackingContexts()
Return the collection of BackingContexts (BookBackingContexts and PageBackingContexts) for the pages and books contained by the book this BackingContext represents. This list is entitled. If no pages or books exist returns an empty list.

Returns:
List of (BookBackingContext and PageBackingContext)

getPageCount

public int getPageCount()
Return the number of pages contained in the book that this BackingContext represents.

Returns:
the number of pages contained in the book that this BackingContext represents.
See Also:
Book#getPageCount()

getPages

public List getPages()
Deprecated. Use getPageBackingContexts() instead.W

Return the collection of BackingContexts (BookBackingContexts and PageBackingContexts) for the pages and books contatined by the book this BackingContext represents. If no windows exist returns an empty list.


getPortletBackingContextRecursive

public PortletBackingContext getPortletBackingContextRecursive(String instanceLabel)
Return the portlet backing context matching the supplied instance label. Note: this method may return null if called from the init() method of a backing context.

Overrides:
getPortletBackingContextRecursive in class PageBackingContext
Parameters:
instanceLabel - unique instance label of the portlet
Returns:
a reference to the portlet's BackingContext if it exists, otherwise null.

getPortletsBackingContextRecursive

public PortletBackingContext[] getPortletsBackingContextRecursive(String definitionLabel)
Return all portlet backing 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 getPortletBackingContextRecursive(String instanceLabel) Note: this method may return null if called from the init() method of a backing context.

Overrides:
getPortletsBackingContextRecursive in class PageBackingContext
Parameters:
definitionLabel - label of the portlet
Returns:
a non-null array of PortletBackingContext.

isContained

public boolean isContained()
Returns true if the book represented by this backing context is "contained", that is if the the book's next book, window, or page ancestor is a book or window.


isDesktopBook

public boolean isDesktopBook()
Returns true if the book represented by this backing context is the desktop Book (i.e. the top-most book in the portal).


isLikePage

public boolean isLikePage()
Indicates whether or not the underlying book is a page in another book.

Returns:
true if underlying book is a page in another book

© 2005 BEA Systems, Inc.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved