# com.bea.netuix.application.instance
PortletInstance Class

public class PortletInstance
extends `Object`
implements `PlaceableInstance`, `Serializable`

Represents a customized version of a `PortletDefinition`.

Hierarchy
  `Object`
  `PortletInstance`

All Implemented Interfaces
  `PlaceableInstance`, `Serializable`

## Field Summary

`protected `LocalizationResource`` | `localizationResource` LocalizationResource

## Constructor Summary

PortletInstance(`LocalizationResource` localizationResource, `ThemeDefinitionId` themeDefinitionId, short titlebarOrientation, boolean defaultMinimized, `String` instanceLabel, `String` producerHandle, `String` portletHandle, byte stateChangeFlag, boolean requiresUrlTemplates, boolean templatesStoredInSession, byte portletState, boolean producerOfferedPortlet) Overloaded constructor to create a WSRP remote portlet.
PortletInstance(`LocalizationResource` localizationResource, `ThemeDefinitionId` themeDefinitionId, short titlebarOrientation, boolean defaultMinimized, `String` instanceLabel) Constructor to create a new `PortletInstance` object.

## Method Summary

`public `String`` | `getDescription`() Retrieves this portlet's localized description from it's `LocalizationResource`.
`public `String`` | `getInstanceLabel`() Returns the instance label for this portlet.
`public `LocalizationIntersectionId`` | `getLocalizationIntersectionId`() Returns the `LocalizationIntersectionId` for this portlet.
`public `LocalizationResource`` | `getLocalizationResource`() Returns the `LocalizationResource` associated with this `PortletDefinition` based on the locale of the request used for retrieving the `PortletInstance`.
`public `PlaceableDefinition`` | `getPlaceableDefinition`() Returns the `PlaceableDefinition` associated with this portlet.
`public `PlaceableInstanceId`` | `getPlaceableInstanceId`() Returns the `PlaceableInstanceId` for the `PlaceableInstance`associated with this portlet.
`public `PlacementId`` | `getPlacementId`() Returns the `PlacementId` for this portlet.
`public `PortletDefinition`` | `getPortletDefinition`() Returns the `PortletDefinition` that this portlet was created from.
`public `PortletDefinitionId`` | `getPortletDefinitionId`() Returns the `PortletDefinitionId` for the `PortletDefinition` that this portlet was created from.
`public `String`` | `getPortletHandle`() Returns the portlet handle associated with this portlet if it is a WSRP remote portlet, `NULL` otherwise.
`public `PortletInstanceId`` | `getPortletInstanceId`() Returns the `PortletInstanceId` for this portlet.
`public byte[]` | `getPortletState`() Returns the portlet state for a WSRP remote portlet
`public `String`` | `getProducerHandle`() Returns the producer handle associated with this portlet if it is a WSRP remote portlet, `NULL` otherwise.
`public byte` | `getStateChangeFlag`() Returns state change flag associated with this portlet if it is a WSRP remote portlet.
`public `ThemeDefinitionId`` | `getThemeDefinitionId`() Returns the `ThemeDefinitionId` of theme associated with this `PortletInstance`.
`public `String`` | `getTitle`() Retrieves this portlet's localized title from it's `LocalizationResource`.
`public short` | `getTitlebarOrientation`() Returns the titlebar orientation for this `PortletInstance`
`public boolean` | `isDefaultMinimized`() Returns if this portlet is minimized by default.
`public boolean` | `isProducerOfferedPortlet`() Returns whether a WSRP remote portlet has not been customized by a WSRP consumer
`public boolean` | `isRequiresUrlTemplates`() Returns whether a WSRP remote portlet requires url templates
`public boolean` | `isTemplatesStoredInSession`() Returns whether url templates are stored in the HttpSession for a WSRP remote portlet
`public void` | `setDefaultMinimized`(boolean defaultMinimized) Sets whether this portlet is default minimized.
`public void` | `setDescription`(`String` description) Update the description for the current locale.
`public void` | `setInstanceLabel`(`String` instanceLabel) Sets the instance label for this portlet.
`public void` | `setLocalizationResource`(`LocalizationResource` localizationResource) Sets the `LocalizationResource` for this portlet.
`public void` | `setPortletHandle`(`String` portletHandle) Sets the portlet handle for this portlet
`public void` | `setPortletState`(byte[] portletState) Sets the portlet state for a WSRP remote portlet
`public void` | `setProducerHandle`(`String` producerHandle) Sets the producer handle for this portlet
`public void` | `setProducerOfferedPortlet`(boolean producerOfferedPortlet) Sets whether a WSRP remote portlet is customized by a WSRP consumer
`public void` | `setRequiresUrlTemplates`(boolean requiresUrlTemplates) Sets whether a WSRP remote portlet requires url templates
`public void` | `setStateChangeFlag`(byte stateChangeFlag) Sets state change flag
`public void` | `setTemplatesStoredInSession`(boolean templatesStoredInSession) Sets whether url templates are stored in the HttpSession for a WSRP remote portlet
`public void` | `setThemeDefinitionId`(`ThemeDefinitionId` themeDefinitionId) Associates a theme with this portlet.
`public void` | `setTitle`(`String` title) Update the title for the current locale.
`public void` | `setTitlebarOrientation`(short titlebarOrientation) Sets the titlebar orientation for this portlet

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods from interface `com.bea.netuix.application.instance.`PlaceableInstance``
``getPlaceableDefinition`, `getPlaceableInstanceId`, `getPlacementId``

## Field Detail

### localizationResource

    protected LocalizationResource localizationResource

## Constructor Detail

### PortletInstance

    public PortletInstance(LocalizationResource localizationResource,
                           ThemeDefinitionId themeDefinitionId,
                           short titlebarOrientation,
                           boolean defaultMinimized,
                           String instanceLabel,
                           String producerHandle,
                           String portletHandle,
                           byte stateChangeFlag,
                           boolean requiresUrlTemplates,
                           boolean templatesStoredInSession,
                           byte[] portletState,
                           boolean producerOfferedPortlet)

  Overloaded constructor to create a WSRP remote portlet.

### PortletInstance

    public PortletInstance(LocalizationResource localizationResource,
                           ThemeDefinitionId themeDefinitionId,
                           short titlebarOrientation,
                           boolean defaultMinimized,
                           String instanceLabel)

  Constructor to create a new `PortletInstance` object.

## Method Detail

### getDescription() Method

    public String getDescription()

Retrieves this portlet's localized description from it's `LocalizationResource`.

#### Returns

localized description for this portlet

### getInstanceLabel() Method

    public String getInstanceLabel()

Returns the instance label for this portlet.

#### Returns

instance label

### getLocalizationIntersectionId() Method

    public LocalizationIntersectionId getLocalizationIntersectionId()

Returns the `LocalizationIntersectionId` for this portlet. Returns `NULL` if no LocalizationResource is associated with this portlet. A `LocalizationIntersectionId` is a reference to all localized versions of title and description for an entity.

#### Returns

`LocalizationIntersectionId` for this portlet

### getLocalizationResource() Method

    public LocalizationResource getLocalizationResource()

Returns the `LocalizationResource` associated with this `PortletDefinition` based on the locale of the request used for retrieving the `PortletInstance`.

#### Returns

`LocalizationResource` associated with this portlet

### getPlaceableDefinition() Method

    public PlaceableDefinition getPlaceableDefinition()

Returns the `PlaceableDefinition` associated with this portlet. Returns `NULL` when the PortletInstance has not been retrieved by using the persistence API.

#### Returns

`PlaceableDefinition` associated with this portlet

Related Topics

``PlaceableDefinition``

### getPlaceableInstanceId() Method

    public PlaceableInstanceId getPlaceableInstanceId()

Returns the `PlaceableInstanceId` for the `PlaceableInstance`associated with this portlet. Returns `NULL` when the PortletInstance has not been retrieved by using the persistence API.

#### Returns

`PlaceableInstanceId` associated with this portlet

Related Topics

``PlaceableInstance``

### getPlacementId() Method

    public PlacementId getPlacementId()

Returns the `PlacementId` for this portlet. May be `NULL` if this portlet is not placed or if it has not been retrieved using the persistence API.

#### Returns

`PlacementId` for this portlet

### getPortletDefinition() Method

    public PortletDefinition getPortletDefinition()

Returns the `PortletDefinition` that this portlet was created from. Returns `NULL` when the PortletInstance has not been retrieved by using the persistence API.

#### Returns

`PortletDefinition` for this portlet

### getPortletDefinitionId() Method

    public PortletDefinitionId getPortletDefinitionId()

Returns the `PortletDefinitionId` for the `PortletDefinition` that this portlet was created from. Returns `NULL` when the PortletInstance has not been retrieved by using the persistence API.

#### Returns

`PortletDefinitionId` for this portlet

### getPortletHandle() Method

    public String getPortletHandle()

Returns the portlet handle associated with this portlet if it is a WSRP remote portlet, `NULL` otherwise.

#### Returns

portlet handle

### getPortletInstanceId() Method

    public PortletInstanceId getPortletInstanceId()

Returns the `PortletInstanceId` for this portlet. Returns `NULL` when the PortletInstance has not been retrieved by using the persistence API.

#### Returns

`PortletInstanceId` for this portlet

### getPortletState() Method

    public byte[] getPortletState()

Returns the portlet state for a WSRP remote portlet

#### Returns

portlet state

### getProducerHandle() Method

    public String getProducerHandle()

Returns the producer handle associated with this portlet if it is a WSRP remote portlet, `NULL` otherwise.

#### Returns

producer handle

### getStateChangeFlag() Method

    public byte getStateChangeFlag()

Returns state change flag associated with this portlet if it is a WSRP remote portlet.

#### Returns

state change flag

### getThemeDefinitionId() Method

    public ThemeDefinitionId getThemeDefinitionId()

Returns the `ThemeDefinitionId` of theme associated with this `PortletInstance`.

#### Returns

`ThemeDefinitionId`

### getTitle() Method

    public String getTitle()

Retrieves this portlet's localized title from it's `LocalizationResource`.

#### Returns

localized title for this portlet

### getTitlebarOrientation() Method

    public short getTitlebarOrientation()

Returns the titlebar orientation for this `PortletInstance`

#### Returns

menu orientation

### isDefaultMinimized() Method

    public boolean isDefaultMinimized()

Returns if this portlet is minimized by default.

#### Returns

true if this portlet is minimized by default

### isProducerOfferedPortlet() Method

    public boolean isProducerOfferedPortlet()

Returns whether a WSRP remote portlet has not been customized by a WSRP consumer

#### Returns

true if a WSRP remote portlet has not been customized by a WSRP consumer

### isRequiresUrlTemplates() Method

    public boolean isRequiresUrlTemplates()

Returns whether a WSRP remote portlet requires url templates

#### Returns

true if portlet requires url templates

### isTemplatesStoredInSession() Method

    public boolean isTemplatesStoredInSession()

Returns whether url templates are stored in the HttpSession for a WSRP remote portlet

#### Returns

true if url templates are stored in the HttpSession

### setDefaultMinimized(boolean) Method

    public void setDefaultMinimized(boolean defaultMinimized)

Sets whether this portlet is default minimized.

#### Parameters

defaultMinimized
  true to set the portlet to minimized by default

### setDescription(String) Method

    public void setDescription(String description)

Update the description for the current locale.

### setInstanceLabel(String) Method

    public void setInstanceLabel(String instanceLabel)

Sets the instance label for this portlet.

### setLocalizationResource(LocalizationResource) Method

    public void setLocalizationResource(LocalizationResource localizationResource)

Sets the `LocalizationResource` for this portlet.

### setPortletHandle(String) Method

    public void setPortletHandle(String portletHandle)

Sets the portlet handle for this portlet

### setPortletState(byte[]) Method

    public void setPortletState(byte[] portletState)

Sets the portlet state for a WSRP remote portlet

### setProducerHandle(String) Method

    public void setProducerHandle(String producerHandle)

Sets the producer handle for this portlet

### setProducerOfferedPortlet(boolean) Method

    public void setProducerOfferedPortlet(boolean producerOfferedPortlet)

Sets whether a WSRP remote portlet is customized by a WSRP consumer

### setRequiresUrlTemplates(boolean) Method

    public void setRequiresUrlTemplates(boolean requiresUrlTemplates)

Sets whether a WSRP remote portlet requires url templates

### setStateChangeFlag(byte) Method

    public void setStateChangeFlag(byte stateChangeFlag)

Sets state change flag

### setTemplatesStoredInSession(boolean) Method

    public void setTemplatesStoredInSession(boolean templatesStoredInSession)

Sets whether url templates are stored in the HttpSession for a WSRP remote portlet

### setThemeDefinitionId(ThemeDefinitionId) Method

    public void setThemeDefinitionId(ThemeDefinitionId themeDefinitionId)

Associates a theme with this portlet.

#### Parameters

themeDefinitionId
  of theme associated with this portlet

### setTitle(String) Method

    public void setTitle(String title)

Update the title for the current locale.

### setTitlebarOrientation(short) Method

    public void setTitlebarOrientation(short titlebarOrientation)

Sets the titlebar orientation for this portlet