BookPresentationContext Class

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

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

Related Topics

BookPresentationContext.getBookPresentationContext(HttpServletRequest)


Hierarchy
Object
  ControlContext
    PresentationContext
      WindowPresentationContext
        PagePresentationContext
          BookPresentationContext
All Implemented Interfaces

Serializable

Field Summary

protected static final String
CLASS_NAME
String
   
Fields from  com.bea.netuix.servlets.controls.page.PagePresentationContext
CLASS_NAME
 
Fields from  com.bea.netuix.servlets.controls.window.WindowPresentationContext
CLASS_NAME
 
Fields from  com.bea.netuix.servlets.controls.ControlContext
debug
 

Constructor Summary

 

Method Summary

public String
getActivePage()
Get the currently active page's label.
public static BookPresentationContext
getBookPresentationContext(HttpServletRequest request)
This is a convenience method for returning a reference to the current BookPresentationContext.
public BookPresentationContext
getBookPresentationContextRecursive(String definitionLabel)
Return a book searching the entire tree recursively.
public String
getCurrentPage()
Get the currently active page's label.
public String
getDefaultPage()
The default page's label as specified for the book.
public List
getEntitledPagePresentationContexts()
Return the collection of entitled PagePresentationContexts (which may be either BookPresentationContext or PagePresentationContext objects) for this book.
public String
getLabel()
Gets the label for this book.
public int
getPageCount()
Return the total number of pages contained in this book.
public PagePresentationContext
getPagePresentationContext(String instanceId)
Return a page from the list of pages for this book.
public PagePresentationContext
getPagePresentationContextByUniqueId(String uniqueId)
Return a page from the list of pages for this book.
public PagePresentationContext
getPagePresentationContextByUnqiueId(String uniqueId)
Return a page from the list of pages for this book.
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.
public ArrayList
getPagePresentationContexts()
Return the collection of PagePresentationContexts (which may be either BookPresentationContext or PagePresentationContext objects) for this book.
public PortletPresentationContext
getPortletPresentationContextRecursive(String instanceLabel)
Return the PortletPresentationContext matching the supplied instance label.
public PortletPresentationContext[]
getPortletsPresentationContextRecursive(String definitionLabel)
Returns PortletPresentationContexts matching the supplied definition label.
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.
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.
public boolean
isLikePage()
Indicates whether or not this book is a page in another book.
 
Methods from  com.bea.netuix.servlets.controls.page.PagePresentationContext
getActiveImage, getInactiveImage, getPagePresentationContext, getRolloverImage, getWindowPresentationContexts, isActive, isDisplayed, isHidden, isVisible
 
Methods from  com.bea.netuix.servlets.controls.window.WindowPresentationContext
getCapability, getContentPresentationClass, getContentPresentationContextChildren, getContentPresentationStyle, getDefinitionId, getDefinitionLabel, getInstanceId, getLabel, getOrientation, getParentPagePresentationContext, getPreviousWindowMode, getThemePresentationContext, getTitle, getTitlebarPresentationContext, getWindowMode, getWindowPresentationContext, getWindowState, isCapable, 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, getContextKey, getControl, getRequestKey, getUniqueId, removeContextFromRequest, setContextInRequest
 
Methods 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

 

Constructor Detail

 

Method Detail

getActivePage() Method

public String getActivePage()
Get the currently active page's label.

Returns

The label of the current page

getBookPresentationContext(HttpServletRequest) Method

public static BookPresentationContext getBookPresentationContext(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

getBookPresentationContextRecursive(String) Method

public BookPresentationContext getBookPresentationContextRecursive(String definitionLabel)
Return a book searching the entire tree recursively. If you are interested in both books AND pages use BookPresentationContext.getPagePresentationContextRecursive(String) as that method returns both.

Overrides
PagePresentationContext.getBookPresentationContextRecursive(String)

Parameters

definitionLabel
The definitionLabel of the desired book

Returns

The Book of interest or null if it is not found

getCurrentPage() Method

DEPRECATED Use com.bea.netuix.servlets.controls.page.BookPresentationContext.getActivePage() instead

public String getCurrentPage()
Get the currently active page's label. This is equivalent to calling BookPresentationContext.getActivePage().

Returns

The label of the current page

Related Topics

BookPresentationContext.getActivePage()


getDefaultPage() Method

public String getDefaultPage()
The default page's label as specified for the book.

Returns

The label of the default page

getEntitledPagePresentationContexts() Method

public List getEntitledPagePresentationContexts()
Return the collection of entitled PagePresentationContexts (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

getLabel() Method

public String getLabel()
Gets the label for this book. This is equivalent to calling BookPresentationContext.getDefinitionLabel().

Overrides
PagePresentationContext.getLabel()

getPageCount() Method

public int getPageCount()
Return the total number of pages contained in this book.

Returns

The total number of pages

getPagePresentationContext(String) Method

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 BookPresentationContext.getPagePresentationContextRecursive(String).

Returns

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

getPagePresentationContextByUniqueId(String) Method

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

getPagePresentationContextByUnqiueId(String) Method

DEPRECATED Misspelled method name; use com.bea.netuix.servlets.controls.page.BookPresentationContext.getPagePresentationContextByUniqueId(java.lang.String)

public PagePresentationContext getPagePresentationContextByUnqiueId(String uniqueId)
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

getPagePresentationContextRecursive(String) Method

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
PagePresentationContext.getPagePresentationContextRecursive(String)

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

getPagePresentationContexts() Method

DEPRECATED Use com.bea.netuix.servlets.controls.page.BookPresentationContext.getEntitledPagePresentationContexts()

public ArrayList getPagePresentationContexts()
Return the collection of PagePresentationContexts (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

Related Topics

BookPresentationContext.getEntitledPagePresentationContexts()


getPortletPresentationContextRecursive(String) Method

public PortletPresentationContext getPortletPresentationContextRecursive(String instanceLabel)
Return the PortletPresentationContext matching the supplied instance label.

Overrides
PagePresentationContext.getPortletPresentationContextRecursive(String)

Parameters

instanceLabel
The unique instance label for the desired portlet

Returns

A reference to the PortletPresentationContext if it exists; null otherwise

getPortletsPresentationContextRecursive(String) Method

public PortletPresentationContext[] getPortletsPresentationContextRecursive(String definitionLabel)
Returns PortletPresentationContexts 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 BookPresentationContext.getPortletPresentationContextRecursive(String).

Overrides
PagePresentationContext.getPortletsPresentationContextRecursive(String)

Parameters

definitionLabel
The definition label for the desired portlet(s)

Returns

A non-null array of PortletPresentationContexts

isContained() Method

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

isDesktopBook() Method

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

isLikePage() Method

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