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

public interface PlaceholderView
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.

View class for a placeholder. A placeholder will hold a set of placeables, i.e. portlets and/or books.

Related Topics

``View``

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

## Method Summary

`public int` | `getBookCount`() Convenience method to count all books held by this placeholder.
`public `BookView`[]` | `getBookViews`() Get all books held by this placeholder.
`public `LocalizationResourceView`` | `getLocalizationResourceView`() The Localization resource contains the localized title and description for this placeholder.
`public int` | `getLocation`() Return this placeholders layout location.
`public int` | `getPlaceableCount`() Convenience method to count all placeables (books or portlets) held by this placeholder.
`public `PlaceableView`[]` | `getPlaceableViews`() Get all placeables (books or portlets) held by this placeholder.
`public `PlaceholderDefinition`` | `getPlaceholderDefinition`() Retrieve the associated `PlaceholderDefinition` from this Placeholder View.
`public `PlaceholderDefinitionId`` | `getPlaceholderDefinitionId`() Getter for placeholder definition id.
`public int` | `getPortletCount`() Convenience method to count all portlets held by this placeholder.
`public `PortletView`` | `getPortletView`(`PortletInstanceId` portletId) Get the portlet for a given database instance ID.
`public `PortletView`[]` | `getPortletViews`() Get all portlets held by this placeholder.

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

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

## Method Detail

### getBookCount() Method

    public int getBookCount()

Convenience method to count all books held by this placeholder.

### getBookViews() Method

    public BookView[] getBookViews()

Get all books held by this placeholder. Returns an empty array if there are none.

### getLocalizationResourceView() Method

    public LocalizationResourceView getLocalizationResourceView()

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

#### Returns

a non null LocalizationResourceView customized per the request.

### getLocation() Method

    public int getLocation()

Return this placeholders layout location. The location is an integer representing column or location in the layout. example: 0 == first column

#### Returns

the layout location a number >= 0

### getPlaceableCount() Method

    public int getPlaceableCount()

Convenience method to count all placeables (books or portlets) held by this placeholder.

### getPlaceableViews() Method

    public PlaceableView[] getPlaceableViews()

Get all placeables (books or portlets) held by this placeholder. Returns an empty array if there are none.

### getPlaceholderDefinition() Method

    public PlaceholderDefinition getPlaceholderDefinition()

Retrieve the associated `PlaceholderDefinition` from this Placeholder View. Placeholder Views are immutable but Placeholder Instances and Placeholder 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 Placeholder Definition.

### getPlaceholderDefinitionId() Method

    public PlaceholderDefinitionId getPlaceholderDefinitionId()

Getter for placeholder definition id. The placeholder id is the primary key value for the shell definition in the PF_PLACEHOLDER_DEFINITION table. Unlike Book Pages and Portlets, placeholdes do not have instances. The admin or end user can still change his or her palceholder but they are customizing the page not the placeholder.

#### Returns

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

### getPortletCount() Method

    public int getPortletCount()

Convenience method to count all portlets held by this placeholder.

### getPortletView(PortletInstanceId) Method

    public PortletView getPortletView(PortletInstanceId portletId)

Get the portlet for a given database instance ID. Return null if there is no such portlet.

### getPortletViews() Method

    public PortletView[] getPortletViews()

Get all portlets held by this placeholder. Returns an empty array if there are none.