BookView Interface

com.bea.netuix.application.view
BookView Interface

public interface BookView

    extends NavigableView, PlaceableView, 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 book view represents a book and all its contents. Books aggregate a set of navigables. A navigable is either a book or a page, so books can contain pages but may also contain other books. There is no theoretical limit to the number of navigables a book may contain.

Related Topics

View


All Superinterfaces
MarkupBasedView, NavigableView, PlaceableView, Serializable, ThemedMarkupBasedView, View

Field Summary

public static final short
ORIENTATION_BOTTOM
Constant enum to represent a book's menu location.
public static final short
ORIENTATION_LEFT
Constant enum to represent a book's menu location.
public static final short
ORIENTATION_RIGHT
Constant enum to represent a book's menu location.
public static final short
ORIENTATION_TOP
Constant enum to represent a book's menu location.
   
Fields from interface com.bea.netuix.application.view.NavigableView
ALIGNMENT_LEFT, ALIGNMENT_RIGHT
 

Method Summary

public int
getBookCount()

Get the number of child books of this book.

public BookDefinition
getBookDefinition()

Retrieve the associated BookDefinition from this Book View.

public BookDefinitionId
getBookDefinitionId()

Getter for book definition id.

public BookGroupId
getBookGroupId()

Getter for book's book group id.

public BookInstance
getBookInstance()

Retrieve the associated BookInstance from this Book View.

public BookInstanceId
getBookInstanceId()

Getter for book instance id.

public BookView
getBookView(String definitionLabel)
Gets an immediate child book with a given label.
public BookView
getBookView(BookInstanceId bookInstanceId)
Gets an immediate child book with a given instance ID.
public BookView
getBookView(BookDefinitionId bookDefinitionId)
Gets an immediate child book with a given definition Id.
public BookView
getBookViewRecursive(BookInstanceId bookInstanceId)
Gets any child book with a given instance ID, searching the entire tree of nested books.
public BookView
getBookViewRecursive(String bookDefinitionLabel)
Gets any child book with a given label, searching the entire tree of nested books.
public BookView[]
getBookViews()

Get the child books of this book.

public String
getDefaultPage()

Retrieve the definition label of the default page for this book.

public short
getMenuOrientation()

Returns the menu's orientation.

public MenuView
getMenuView()

Get the child menu View class for this book.

public int
getNavigableCount()
Get the number of child navigables (books or pages) of this book.
public NavigableView
getNavigableView(String definitionLabel)
Gets the child navigable (book or page) with a given label, searching only the immediate children.
public NavigableView
getNavigableView(NavigableDefinitionId navigableDefinitionId)
Gets the child navigable (book or page) with a given label, searching only the immediate children.
public NavigableView
getNavigableView(NavigableInstanceId navigableInstanceId)
Gets the child navigable (book or page) with a given label, searching only the immediate children.
public NavigableView[]
getNavigableViews()
Get the child navigables (books or pages) of this book.
public int
getPageCount()
Get the number of child pages of this book.
public PageView
getPageView(String definitionLabel)
Gets an immediate child page with a given label.
public PageView
getPageView(PageInstanceId pageInstanceId)
Gets an immediate child page with a given instance ID.
public PageView
getPageView(PageDefinitionId pageDefinitionId)
Gets an immediate child page with a given definition ID.
public PageView
getPageViewRecursive(PageInstanceId pageInstanceId)
Gets the PageView with a given instance id, searching the entire tree of nested books.
public PageView
getPageViewRecursive(String pageDefinitionLabel)
Gets the PageView with a given label, searching the entire tree of nested books.
public PageView[]
getPageViews()

Get the child pages of this book.

public PlacementId
getPlacementId()

Getter for book's placement id.

public PortletView
getPortletViewRecursive(PortletInstanceId portletInstanceId)
Gets the PortletView with a given instance ID, searching the entire tree of nested books, pages, ....
public PortletView
getPortletViewRecursive(String portletInstanceLabel)
Gets the PortletView with a given instance label, searching the entire tree of nested books.
public String
getWebAppName()
Return the name of the webapp that this book is associated with.
 
Methods from interface com.bea.netuix.application.view.MarkupBasedView
getMarkupView
 
Methods from interface com.bea.netuix.application.view.NavigableView
getAlignment, getDefinitionLabel, getLocalizationResourceView, getMenuPosition, getNavigableDefinition, getNavigableInstance, isDefaultPage, isHidden
 
Methods from interface com.bea.netuix.application.view.PlaceableView
getDefinitionLabel, getLocalizationResourceView, getPlaceableInstance, getPlaceholderPosition
 
Methods from interface com.bea.netuix.application.view.ThemedMarkupBasedView
getThemeView
 
Methods from interface com.bea.netuix.application.view.View
getDescription, getTitle
   

Field Detail

ORIENTATION_BOTTOM

public static final short ORIENTATION_BOTTOM
Constant enum to represent a book's menu location.


ORIENTATION_LEFT

public static final short ORIENTATION_LEFT
Constant enum to represent a book's menu location.


ORIENTATION_RIGHT

public static final short ORIENTATION_RIGHT
Constant enum to represent a book's menu location.


ORIENTATION_TOP

public static final short ORIENTATION_TOP
Constant enum to represent a book's menu location.

 

Method Detail

getBookCount() Method

public int getBookCount()

Get the number of child books of this book. This method counts immediate children only.

Returns

if there are no child books then this return 0.

getBookDefinition() Method

public BookDefinition getBookDefinition()

Retrieve the associated BookDefinition from this Book View. Book 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 Book Definition.

getBookDefinitionId() Method

public BookDefinitionId getBookDefinitionId()

Getter for book definition id. The definition id is the primary key value for the book definition in the PF_BOOK_DEFINITION table. A Book Definition may have many instance these instance are created when administrators or users customize their portal. A Book 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.

getBookGroupId() Method

public BookGroupId getBookGroupId()

Getter for book's book group id. The book group id represents a unique placement of a book on a book. Books may contain Books just like they may contain Pages. If this book 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. Note: this book may not be placed on a book as it may be place on a page. Also, if this view was obtained directly and not from a parent view object then this value may also be null.

Returns

the book group id if this book is placed on a page and this BookView object was retrieved view a higher level view object (example BookView.getBookViews()).

getBookInstance() Method

public BookInstance getBookInstance()

Retrieve the associated BookInstance from this Book View. Book Views are immutable but Instances and 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 Book Instance.

getBookInstanceId() Method

public BookInstanceId getBookInstanceId()

Getter for book instance id. The instance id is the primary key value for the book instance in the PF_BOOK_INSTANCE table. A Book Definition may have many instance these instance are created when administrators or users customize their portal. A Book 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.

getBookView(String) Method

public BookView getBookView(String definitionLabel)
Gets an immediate child book with a given label.

Parameters

definitionLabel
of the child we are looking for.

Returns

the book view if it exists otherwise null.

getBookView(BookInstanceId) Method

public BookView getBookView(BookInstanceId bookInstanceId)
Gets an immediate child book with a given instance ID.

Parameters

bookInstanceId
of the child we are looking for.

Returns

the child book view or null if none are found.

getBookView(BookDefinitionId) Method

public BookView getBookView(BookDefinitionId bookDefinitionId)
Gets an immediate child book with a given definition Id.

Parameters

bookDefinitionId
of the child book we are looking for.

Returns

the child book view or null if none are found.

getBookViewRecursive(BookInstanceId) Method

public BookView getBookViewRecursive(BookInstanceId bookInstanceId)
Gets any child book with a given instance ID, searching the entire tree of nested books.

Parameters

bookInstanceId
of the child book we are looking for.

Returns

the child book view or null if none are found.

getBookViewRecursive(String) Method

public BookView getBookViewRecursive(String bookDefinitionLabel)
Gets any child book with a given label, searching the entire tree of nested books.

Parameters

bookDefinitionLabel
of the child we are looking for.

Returns

the child book view or null if none are found.

getBookViews() Method

public BookView[] getBookViews()

Get the child books of this book. Books can contain Books just like they can contain Pages. If this Book has child books then this method returns them. This method returns immediate children only.

Returns

returns the immediate list of child books if there are any otherwise null.

getDefaultPage() Method

public String getDefaultPage()

Retrieve the definition label of the default page for this book. It is important to note that Book can act like pages on a parent book so this method may retrieve the definition label of a book even though this methods say get default Page.

Returns

the definition label of the page or book that is the default for this parent book.

getMenuOrientation() Method

public short getMenuOrientation()

Returns the menu's orientation. The orientation is a hint to the book and menu skeleton to render the menu at the top, left, right or bottom of the book. Since this is only a hint to the book/menu skeleton, if the skeleton does not support it, it will have no effect.

Returns

ORIENTATION_TOP, ORIENTATION_LEFT, ORIENTATION_RIGHTT, ORIENTATION_BOTTOM

getMenuView() Method

public MenuView getMenuView()

Get the child menu View class for this book. Menus are optional on a book so this may return null.

Returns

the child menu view if this book has a menu, otherwise null.

getNavigableCount() Method

public int getNavigableCount()
Get the number of child navigables (books or pages) of this book. This method counts immediate children only.

Returns

the number of immediate navigables. This method has the same effect as getBookCount() + getPageCount();

getNavigableView(String) Method

public NavigableView getNavigableView(String definitionLabel)
Gets the child navigable (book or page) with a given label, searching only the immediate children.

Parameters

definitionLabel
of the child book or page.

Returns

the child navigable view or null if none are found.

getNavigableView(NavigableDefinitionId) Method

public NavigableView getNavigableView(NavigableDefinitionId navigableDefinitionId)
Gets the child navigable (book or page) with a given label, searching only the immediate children.

Parameters

navigableDefinitionId
(BookDefinitionId or PageDefinitionId) of the child book or page.

Returns

the child navigable view or null if none are found.

getNavigableView(NavigableInstanceId) Method

public NavigableView getNavigableView(NavigableInstanceId navigableInstanceId)
Gets the child navigable (book or page) with a given label, searching only the immediate children.

Parameters

navigableInstanceId
(BookInstanceId or PageInstanceId) of the child book or page.

Returns

the child navigable view or null if none are found.

getNavigableViews() Method

public NavigableView[] getNavigableViews()
Get the child navigables (books or pages) of this book. This method returns immediate children only. The return array is sorted based on menu position.

Returns

a sorted array of child books and pages.

getPageCount() Method

public int getPageCount()
Get the number of child pages of this book. This method counts immediate children only.


getPageView(String) Method

public PageView getPageView(String definitionLabel)
Gets an immediate child page with a given label.

Parameters

definitionLabel
of the child we are looking for.

Returns

the page view if it exists otherwise null.

getPageView(PageInstanceId) Method

public PageView getPageView(PageInstanceId pageInstanceId)
Gets an immediate child page with a given instance ID. Returns null if no such page is found.

Parameters

pageInstanceId
of the child page we are looking for.

Returns

the child page view or null if none are found.

getPageView(PageDefinitionId) Method

public PageView getPageView(PageDefinitionId pageDefinitionId)
Gets an immediate child page with a given definition ID.

Parameters

pageDefinitionId
of the child page we are looking for.

Returns

the child page view or null if none are found.

getPageViewRecursive(PageInstanceId) Method

public PageView getPageViewRecursive(PageInstanceId pageInstanceId)
Gets the PageView with a given instance id, searching the entire tree of nested books.

Parameters

pageInstanceId
of the child page we are looking for.

Returns

the child page view or null if none are found.

getPageViewRecursive(String) Method

public PageView getPageViewRecursive(String pageDefinitionLabel)
Gets the PageView with a given label, searching the entire tree of nested books.

Parameters

pageDefinitionLabel
of the child page we are looking for.

Returns

the child page view or null if none are found.

getPageViews() Method

public PageView[] getPageViews()

Get the child pages of this book. Books can contain Pages just like they can contain Books. If this Book has child pages then this method returns them. This method returns immediate children only.

Returns

returns the immediate list of child pages if there are any otherwise null.

getPlacementId() Method

public PlacementId getPlacementId()

Getter for book's placement id. The placement id represents a unique placement of a book on a page. Pages may contain Books just like they may contain Portlets. If this book is placed on a Page then this placement id represents the primary key value of the PF_PLACEMENT.PLACEMENT_ID value in the database. Note: this book may not be placed on a page as it may be place on another book or be the main book of the desktop. Also, if this view was obtained directly and not from a parent view object then this value may also be null.

Returns

the placement id if this book is placed on a page and this BookView object was retrieved view a higher level view object (example DesktopView.getBookView()).

getPortletViewRecursive(PortletInstanceId) Method

public PortletView getPortletViewRecursive(PortletInstanceId portletInstanceId)
Gets the PortletView with a given instance ID, searching the entire tree of nested books, pages, ....

Parameters

portletInstanceId
of the child portlet we are looking for.

Returns

the child portlet view or null if none are found.

getPortletViewRecursive(String) Method

public PortletView getPortletViewRecursive(String portletInstanceLabel)
Gets the PortletView with a given instance label, searching the entire tree of nested books.

Parameters

portletInstanceLabel
of the child portlet we are looking for.

Returns

the child portlet view or null if none are found.

getWebAppName() Method

public String getWebAppName()
Return the name of the webapp that this book is associated with. All resources in the portal framework database are scoped to the webapp.

Returns

a non null webapp name.