# com.bea.netuix.application.view
DesktopView Interface

public interface DesktopView
extends `MarkupBasedView`

"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 Desktop View is the highest level View object. When retrieving this object you will get all the child objects contained within the portal.

Related Topics

``View``

All Superinterfaces
  `MarkupBasedView`, `Serializable`, `View`

## Method Summary

`public `BookView`` | `getBookView`() Get the primary book for this desktop.
`public `BookView`` | `getBookViewRecursive`(`BookInstanceId` bookInstanceId) Get the book for a given database instance ID, searching the entire tree of nested books.
`public `BookView`` | `getBookViewRecursive`(`String` bookDefinitionLabel) Get the book for a given definition label, searching the entire tree of nested books.
`public `DesktopDefinition`` | `getDesktopDefinition`() Retrieve the associated `DesktopDefinition` from this Desktop View.
`public `DesktopDefinitionId`` | `getDesktopDefinitionId`() Getter for desktop definition id.
`public `DesktopInstance`` | `getDesktopInstance`() Retrieve the associated `DesktopInstance` from this Desktop View.
`public `DesktopInstanceId`` | `getDesktopInstanceId`() Getter for Desktop instance id.
`public `LocalizationResourceView`` | `getLocalizationResourceView`() The Localization resource contains the localized title and description for this desktop.
`public `LookAndFeelView`` | `getLookAndFeelView`() Get LookAndFeel associated with this desktop.
`public `PageView`` | `getPageViewRecursive`(`PageInstanceId` pageInstanceId) Get the page for a given database instance ID, searching the entire tree of nested books.
`public `PageView`` | `getPageViewRecursive`(`String` pageDefinitionLabel) Get the book for a given definition label, searching the entire tree of nested books.
`public `PortletView`` | `getPortletViewRecursive`(`PortletInstanceId` portletInstanceId) Get the portlet for a given database instance id, searching the entire tree of nested books.
`public `PortletView`` | `getPortletViewRecursive`(`String` instanceLabel) Get the portlet for a given instance label, searching the entire tree of nested books.
`public `ShellView`` | `getShellView`() Retrieve the shell for this desktop.
`public boolean` | `isTreeOptimization`() Is UIControl tree optimizaiton enabled.

Methods from interface `com.bea.netuix.application.view.`MarkupBasedView``
``getMarkupView``

Methods from interface `com.bea.netuix.application.view.`View``
``getDescription`, `getTitle``

## Method Detail

### getBookView() Method

    public BookView getBookView()

Get the primary book for this desktop. This BookView represent the main book view on the desktop.

#### Returns

a null non BookView.

### getBookViewRecursive(BookInstanceId) Method

    public BookView getBookViewRecursive(BookInstanceId bookInstanceId)

Get the book for a given database instance ID, searching the entire tree of nested books. Return null if no such book is found.

### getBookViewRecursive(String) Method

    public BookView getBookViewRecursive(String bookDefinitionLabel)

Get the book for a given definition label, searching the entire tree of nested books. Return null if no such book is found.

### getDesktopDefinition() Method

    public DesktopDefinition getDesktopDefinition()

Retrieve the associated `DesktopDefinition` from this Desktop View. Desktop 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 Desktop Definition.

### getDesktopDefinitionId() Method

    public DesktopDefinitionId getDesktopDefinitionId()

Getter for desktop definition id. The definition id is the primary key value for the desktop definition in the PF_DESKTOP_DEFINITION table. The desktop definition id is a little unique in that it is not an auto generated field. It is a composite primary key derived from three fields: The web app name, the portal path and the desktop path. Desktop Definition always has at least one instance namely the "primary" instance.

#### Returns

a non null unique definition id.

### getDesktopInstance() Method

    public DesktopInstance getDesktopInstance()

Retrieve the associated `DesktopInstance` from this Desktop View. Desktop 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 Desktop Instance.

### getDesktopInstanceId() Method

    public DesktopInstanceId getDesktopInstanceId()

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

### getLocalizationResourceView() Method

    public LocalizationResourceView getLocalizationResourceView()

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

#### Returns

a non null LocalizationResourceView customized per the request.

### getLookAndFeelView() Method

    public LookAndFeelView getLookAndFeelView()

Get LookAndFeel associated with this desktop.

#### Returns

an non null lookAnfFeelView.

### getPageViewRecursive(PageInstanceId) Method

    public PageView getPageViewRecursive(PageInstanceId pageInstanceId)

Get the page for a given database instance ID, searching the entire tree of nested books. Return null if no such page is found.

### getPageViewRecursive(String) Method

    public PageView getPageViewRecursive(String pageDefinitionLabel)

Get the book for a given definition label, searching the entire tree of nested books. Return null if no such page is found.

### getPortletViewRecursive(PortletInstanceId) Method

    public PortletView getPortletViewRecursive(PortletInstanceId portletInstanceId)

Get the portlet for a given database instance id, searching the entire tree of nested books. Return null if no such portlet is found.

#### Parameters

portletInstanceId
  as defined in the database.

#### Returns

a portletView if found otherwise null

### getPortletViewRecursive(String) Method

    public PortletView getPortletViewRecursive(String instanceLabel)

Get the portlet for a given instance label, searching the entire tree of nested books. Return null if no such portlet is found.

#### Parameters

instanceLabel
  the instance label of the portlet.

#### Returns

a portletView if found otherwise null

### getShellView() Method

    public ShellView getShellView()

Retrieve the shell for this desktop. A Shell represents an area on the desktop that is created by the developer and immutable via the persistence API. Shells, however, can be swapped out on a desktop.

#### Returns

a non null ShellView object associated with this desktop.

### isTreeOptimization() Method

    public boolean isTreeOptimization()

Is UIControl tree optimizaiton enabled.

#### Returns

true or false.