PageView Interface

com.bea.netuix.application.view
PageView Interface

public interface PageView

    extends NavigableView, ThemedMarkupBasedView

"Views" are deep copy immutable objects. Unlike "Definitions" and "Instances" Views cannot be modified by the developer. A Instance or a Definition however can always be obtained from the view. The persistence APIs provides course grain and fine grain getters but only fine grain setters. If you are interested in an object and all its children then retrieve the View, if you are only interested in the immediate object and don't care about its children then retrieve the Definition.

The page view represents a page and all its contents. Pages are used to display child Portlets and child Books in a specific layout in a browser. A common term/interface used to represent things that can be placed on a page is "Placeable". So both Book and Portlet extend Placeable. There is no theoretical limit to the number of placeables a page may contain.


All Superinterfaces
MarkupBasedView, NavigableView, Serializable, ThemedMarkupBasedView, View

Field Summary

   
Fields from interface com.bea.netuix.application.view.NavigableView
ALIGNMENT_LEFT, ALIGNMENT_RIGHT
 

Method Summary

public int
getBookCount()

A convenience method for retrieving a total count of all the books in all the placeholders on this page.

public BookGroupId
getBookGroupId()

Getter for page's book group id.

public BookView
getBookView(String label)
Retrieve a child BookView matching the supplied label.
public BookView
getBookView(BookInstanceId bookInstanceId)
Retrieve a BookView matching the supplied database instance ID.
public BookView
getBookViewRecursive(BookInstanceId bookInstanceId)
Retrieve a BookView matching the supplied database instance ID, searching the entire tree of nested books.
public BookView
getBookViewRecursive(String bookDefinitionLabel)
Retrieve a BookView matching the supplied database definition label, searching the entire tree of nested books.
public BookView[]
getBookViews()

Retrieves a list of all books in all placeholders on this page.

public LayoutView
getLayoutView()

Retrieve the child layout view associated with this page.

public LocalizationResourceView
getLocalizationResourceView()

The Localization resource contains the localized title and description for this look and feel.

public PageDefinition
getPageDefinition()

Retrieve the associated PageDefinition from this Page View.

public PageDefinitionId
getPageDefinitionId()

Getter for page definition id.

public PageInstance
getPageInstance()

Retrieve the associated PageInstance from this Page View.

public PageInstanceId
getPageInstanceId()

Getter for page instance id.

public PageView
getPageViewRecursive(PageInstanceId pageInstanceId)
Retrieve a PageView matching the supplied database instance ID, searching the entire tree of nested books.
public PageView
getPageViewRecursive(String pageDefinitionLabel)
Retrieve a PageView matching the supplied database definition label, searching the entire tree of nested books.
public int
getPlaceableCount()

A convenience method for retieving a total count of all placeables (Books and Portlets) in all the placeholders on this page.

public PlaceableView
getPlaceableView(String label)

Return a PlaceableView (PortletView or BookView) matching the supplied label.

public PlaceableView[]
getPlaceableViews()

A method for retrieving an ordered list of all the placeables (books and portlets) in all the placeholders on this page.

public int
getPlaceholderCount()

A convenience method for retieving a count of placeholders in the current layout on this page.

public PlaceholderView[]
getPlaceholderViews()

A method for retrieving an ordered list of all the placeholders in this page.

public int
getPortletCount()

A convenience method for retrieving a total count of all the portlets in all the placeholders on this page.

public PortletView
getPortletView(String instanceLabel)
Retrieve a PortletView matching the supplied instance label.
public PortletView
getPortletView(PortletInstanceId portletInstanceId)
Retrieve a PortletView matching the supplied database instance ID.
public PortletView
getPortletViewRecursive(PortletInstanceId portletInstanceId)
Retrieve a PortletView matching the supplied database instance ID, searching the entire tree of nested books.
public PortletView
getPortletViewRecursive(String portletInstanceLabel)

Retrieve a PortletView matching the supplied portlet instance label, searching the entire tree starting at this page and recursing all nested books, pages ...

public PortletView[]
getPortletViews()

Retrieves a list of all portlets in all placeholders on this page.

public PortletView[]
getPortletViews(String definitionLabel)
Retrieve an array of PortletViews matching the supplied definition label.
public String
getWebAppName()

Return the name of the webapp that this page is associated with.

 
Methods from interface com.bea.netuix.application.view.MarkupBasedView
getMarkupView
 
Methods from interface com.bea.netuix.application.view.NavigableView
getAlignment, getDefinitionLabel, getMenuPosition, getNavigableDefinition, getNavigableInstance, isDefaultPage, isHidden
 
Methods from interface com.bea.netuix.application.view.ThemedMarkupBasedView
getThemeView
 
Methods from interface com.bea.netuix.application.view.View
getDescription, getTitle
   

Method Detail

getBookCount() Method

public int getBookCount()

A convenience method for retrieving a total count of all the books in all the placeholders on this page.

This method counts immediate children only.

Returns

a count of all the books in all the placeholders on this page.

getBookGroupId() Method

public BookGroupId getBookGroupId()

Getter for page's book group id. The book group id represents a unique placement of a page on a book. Book may contain Pages just like they may contain Books. If this page is placed on a Book then this book group id represents the primary key value of the PF_BOOK_GROUP.BOOK_GROUP_ID value in the database. If this view was obtained directly and not from a parent view object then this value may be null.

Returns

the book group id if this PageView object was retrieved view a higher level view object (example BookView.getPageViews()).

getBookView(String) Method

public BookView getBookView(String label)
Retrieve a child BookView matching the supplied label. This method returns immediate children only.

Returns

a BookView or null if one was not found.

getBookView(BookInstanceId) Method

public BookView getBookView(BookInstanceId bookInstanceId)
Retrieve a BookView matching the supplied database instance ID. This method returns immediate children only.

Parameters

bookInstanceId
the database instance ID of the book

Returns

a BookView or null if one was not found.

getBookViewRecursive(BookInstanceId) Method

public BookView getBookViewRecursive(BookInstanceId bookInstanceId)
Retrieve a BookView matching the supplied database instance ID, searching the entire tree of nested books.

Parameters

bookInstanceId
the database instance ID of the book

Returns

a BookView or null if one was not found.

getBookViewRecursive(String) Method

public BookView getBookViewRecursive(String bookDefinitionLabel)
Retrieve a BookView matching the supplied database definition label, searching the entire tree of nested books.

Parameters

bookDefinitionLabel
the deifnition label fo rthe book

Returns

a BookView or null if one was not found.

getBookViews() Method

public BookView[] getBookViews()

Retrieves a list of all books in all placeholders on this page. For an ordered list see getPlaceableViews()

. This method returns immediate children only.

Returns

array of BookView object in no particular order.

getLayoutView() Method

public LayoutView getLayoutView()

Retrieve the child layout view associated with this page. It is actually the layout that contains all the child placeables.

Returns

a non null LayoutView associated with this page.

getLocalizationResourceView() Method

public LocalizationResourceView getLocalizationResourceView()

The Localization resource contains the localized title and description for this look and feel.

Returns

a non null LocalizationResourceView customized per the request.

getPageDefinition() Method

public PageDefinition getPageDefinition()

Retrieve the associated PageDefinition from this Page View. Page Views are immutable but Instances and Definitions are not. Therefore it is often necessary to retrieve the definition from the view in order to update its values and then in turn call the persistence API.

Returns

a non null Page Definition.

getPageDefinitionId() Method

public PageDefinitionId getPageDefinitionId()

Getter for page definition id. The definition id is the primary key value for the page definition in the PF_PAGE_DEFINITION table. A Page Definition may have many instance these instance are created when administrators or users customize their portal. A Page Definition always has at least one instance namely the "primary" instance.

Returns

a non null unique definition id. This value should never be null as views are constructed via the persistence API.

getPageInstance() Method

public PageInstance getPageInstance()

Retrieve the associated PageInstance from this Page View. Page Views are immutable but Page Instances and Book Definitions are not. Therefore it is often necessary to retrieve the instance from the view in order to update its values and then in turn call the persistence API.

Returns

a non null Page Instance.

getPageInstanceId() Method

public PageInstanceId getPageInstanceId()

Getter for page instance id. The instance id is the primary key value for the page instance in the PF_PAGE_INSTANCE table. A Page Definition may have many instance these instance are created when administrators or users customize their portal. A Page Definition always has at least one instance namely the "primary" instance.

Returns

a non null unique instance id. This value should never be null as views are constructed via the persistence API.

getPageViewRecursive(PageInstanceId) Method

public PageView getPageViewRecursive(PageInstanceId pageInstanceId)
Retrieve a PageView matching the supplied database instance ID, searching the entire tree of nested books.

Parameters

pageInstanceId
the database instance ID of the page

Returns

a PageView or null if one was not found.

getPageViewRecursive(String) Method

public PageView getPageViewRecursive(String pageDefinitionLabel)
Retrieve a PageView matching the supplied database definition label, searching the entire tree of nested books.

Parameters

pageDefinitionLabel
the definition label of the page we are looking for.

Returns

a PageView or null if one was not found.

getPlaceableCount() Method

public int getPlaceableCount()

A convenience method for retieving a total count of all placeables (Books and Portlets) in all the placeholders on this page.

This method counts immediate children only.

Returns

a count of all the placeables (Books a& Portlets) in all the palceholders on this page.

getPlaceableView(String) Method

public PlaceableView getPlaceableView(String label)

Return a PlaceableView (PortletView or BookView) matching the supplied label. Note: portlets are searched first, so if a book and a portlet have the same label (which is possible) then the portletview would be returned. If you need the BookView or PortletView explicitly then call getBookView(String defintionLabel) or getPortletView(String instanceLabel).

Parameters

label
- instance label for portlets and definition label for books

Returns

A BookView or PortletView.

getPlaceableViews() Method

public PlaceableView[] getPlaceableViews()

A method for retrieving an ordered list of all the placeables (books and portlets) in all the placeholders on this page. For just a list of placeables in a particular placeholder see PlaceholderView.


This method returns immediate children only.

Returns

an in order array of Placeable objects. The order of placeables is determined by the first placeholder and its orders placeables followed by the next placeholder and all it's palceables, and so on...

getPlaceholderCount() Method

public int getPlaceholderCount()

A convenience method for retieving a count of placeholders in the current layout on this page. This method counts immediate children only.

Returns

a count of number of placeholders on this page's layout.

getPlaceholderViews() Method

public PlaceholderView[] getPlaceholderViews()

A method for retrieving an ordered list of all the placeholders in this page. The order of the placeholders is determined by the placeholders getLocation() index.


This method returns immediate children only.

Returns

an ordered array of PlaceholderView objects.

getPortletCount() Method

public int getPortletCount()

A convenience method for retrieving a total count of all the portlets in all the placeholders on this page.

This method counts immediate children only.

Returns

a count of all the portlets in all the palceholders on this page.

getPortletView(String) Method

public PortletView getPortletView(String instanceLabel)
Retrieve a PortletView matching the supplied instance label. This method returns immediate children only.

Parameters

instanceLabel
the instance label of the portlet

Returns

a PortletView or null if one was not found.

getPortletView(PortletInstanceId) Method

public PortletView getPortletView(PortletInstanceId portletInstanceId)
Retrieve a PortletView matching the supplied database instance ID. This method returns immediate children only.

Parameters

portletInstanceId
the database instance ID of the portlet

Returns

a PortletView or null if one was not found.

getPortletViewRecursive(PortletInstanceId) Method

public PortletView getPortletViewRecursive(PortletInstanceId portletInstanceId)
Retrieve a PortletView matching the supplied database instance ID, searching the entire tree of nested books.

Parameters

portletInstanceId
the database instance ID of the portlet

Returns

a PortletView or null if one was not found.

getPortletViewRecursive(String) Method

public PortletView getPortletViewRecursive(String portletInstanceLabel)

Retrieve a PortletView matching the supplied portlet instance label, searching the entire tree starting at this page and recursing all nested books, pages ...

Parameters

portletInstanceLabel
the instance label of the portlet

Returns

a PortletView or null if one was not found.

getPortletViews() Method

public PortletView[] getPortletViews()

Retrieves a list of all portlets in all placeholders on this page. For an ordered list see getPlaceableViews()

. This method returns immediate children only.

Returns

array of PortletView objects in no particular order.

getPortletViews(String) Method

public PortletView[] getPortletViews(String definitionLabel)
Retrieve an array of PortletViews matching the supplied definition label. Since more then one instance can share the same definiiton lable we return an array This method returns immediate children only.

Parameters

definitionLabel
the definition label of the portlets

Returns

a array of portletViews or empty array

getWebAppName() Method

public String getWebAppName()

Return the name of the webapp that this page is associated with. All resources in the portal framework database are scoped to the webapp.

Returns

a non null webapp name.