com.bea.netuix.application.view
Interface PortletView

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

public interface PortletView
extends PlaceableView, ThemedMarkupBasedView

View class for a portlet.

"Views" are deep copy immutable objects. Unlike "Definitions" and "Instances" Views cannot be modified by the developer. An Instance or a Definition however can always be obtained from the view. The persistence APIs provide coarse 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, but if you are only interested in the immediate object and don't care about its children then retrieve the Definition.

See Also
View
This interface is intended to be implemented only by Oracle Weblogic Portal. Oracle Systems reserves the right to add abstract methods to this interface without notice. Implementations of this interface by other parties must not be expected to compile without change in future versions of Oracle Weblogic Portal.

Field Summary
static String CATEGORY_ID_DELIM
           
static short ORIENTATION_BOTTOM
          Constant for signifying the titlebar orientation.
static short ORIENTATION_LEFT
          Constant for signifying the titlebar orientation.
static short ORIENTATION_RIGHT
          Constant for signifying the titlebar orientation.
static short ORIENTATION_TOP
          Constant for signifying the titlebar orientation.
static String[] WSRP_USER_PROPERTY_NAMES
           
 
Method Summary
 String getBackingFile()
          Get the path to the backing file for the portlet.
 int getCacheExpires()
          Return the time-to-live in seconds for this portlet.
 int[] getCategoryIds()
          Deprecated use getPortletCategoryDefinitionIds();
 String getContentUri()
          Getter for the contentUri attribute in the .portlet file.
 String getEditUri()
          Get the URI to the content that should be displayed when this portlet enters edit mode.
 String[] getEnabledClientClassifications()
          Returns a list of classifications for which the Portlet is enabled, meaning the Portal framework will display it if the current request's client classification is found in this list.
 String getHelpUri()
          Get the URI to the content that should be displayed when this portlet enters help mode.
 String getInstanceLabel()
          Return the unique label for this portlet.
 PlacementId getPlacementId()
          Getter for the portlet's placement id.
 PortletCategoryDefinitionId[] getPortletCategoryDefinitionIds()
          Returns the array of portlet category ids that this portlet has been attached to.
 PortletDefinition getPortletDefinition()
          Retrieve the associated PortletDefinition from this Portlet View.
 PortletDefinitionId getPortletDefinitionId()
          Getter for the portlet definition id.
 String getPortletFile()
          Get the file path to the .portlet definition file.
 String getPortletHandle()
          For proxy portlets, returns the portletHandle assigned by the producer.
 PortletInstance getPortletInstance()
          Retrieve the associated PortletInstance from this Portlet View.
 PortletInstanceId getPortletInstanceId()
          Getter for the portlet instance id.
 byte[] getPortletState()
          For proxy portlets, this method returns binary portletState if allocated by the producer.
 Map<String,com.bea.portlet.prefs.Preference> getPreferences()
          Returns preferences, if any.
 String getProducerHandle()
          For proxy portlets, returns the handle of the producer that this portlet is associated with.
 Collection<String> getSpecifiedWsrpProperties()
          Get the specified properties, only valid when wsrpPropertiesMode == PortletDefinition.WSRP_USER_PROPERTIES_MODE__SPECIFIED
 byte getStateChangeFlag()
          For proxy portlets, returns the state change flag.
 short getTitlebarOrientation()
          Returns the titlebars's orientation.
 String getWebAppName()
          Return the name of the webapp that this layout is associated with.
 int getWsrpPropertiesMode()
          Get the properties mode Will be one of PortletDefinition.WSRP_PROPERTIES_MODE__*
 boolean isDefaultMinimized()
          Has this portlet been set to default minimized state? If so this portlet will be minimized upon the first request to the page.
 boolean isDeleted()
          If isDeleted is true then the portlet has been removed from the file system.
 boolean isForkable()
          Can this portlet run in a separate thread? The developer marks this portlet as "forkable" and then either the developer or admin can mark the portlet as being forked via the "isForkRender" attribute.
 boolean isForkRender()
          Should the framework render this portlet in a separate thread?
 boolean isProducerOfferedPortlet()
           
 boolean isRenderCacheable()
          Does this portlet support caching.
 boolean isRequiresUrlTemplates()
          For proxy portlets, returns whether the remote portlet requires URL templates or not.
 boolean isTemplatesStoredInSession()
          For proxy portlets, returns whether the remote portlet stores URL templates in session or not.
 void setSpecifiedWsrpProperties(Collection<String> specifiedWsrpProperties)
          Set the specified properties, only valid when wsrpPropertiesMode == PortletDefinition.WSRP_USER_PROPERTIES_MODE__SPECIFIED
 void setWsrpPropertiesMode(int wsrpPropertiesMode)
          Set the properties mode Must be one of PortletDefinition.WSRP_PROPERTIES_MODE__*
 
Methods inherited from interface com.bea.netuix.application.view.PlaceableView
getDefinitionLabel, getLabel, getLocalizationResourceView, getPlaceableDefinition, getPlaceableInstance, getPlaceholderDefinitionId, getPlaceholderPosition
 
Methods inherited from interface com.bea.netuix.application.view.View
getDescription, getTitle
 
Methods inherited from interface com.bea.netuix.application.view.ThemedMarkupBasedView
getThemeView
 
Methods inherited from interface com.bea.netuix.application.view.MarkupBasedView
getMarkupView
 
Methods inherited from interface com.bea.netuix.application.view.View
getDescription, getTitle
 

Field Detail

ORIENTATION_TOP

static final short ORIENTATION_TOP
Constant for signifying the titlebar orientation.

See Also
Constants Summary

ORIENTATION_LEFT

static final short ORIENTATION_LEFT
Constant for signifying the titlebar orientation.

See Also
Constants Summary

ORIENTATION_RIGHT

static final short ORIENTATION_RIGHT
Constant for signifying the titlebar orientation.

See Also
Constants Summary

ORIENTATION_BOTTOM

static final short ORIENTATION_BOTTOM
Constant for signifying the titlebar orientation.

See Also
Constants Summary

CATEGORY_ID_DELIM

static final String CATEGORY_ID_DELIM
See Also
Constants Summary

WSRP_USER_PROPERTY_NAMES

static final String[] WSRP_USER_PROPERTY_NAMES
Method Detail

getPortletInstanceId

PortletInstanceId getPortletInstanceId()

Getter for the portlet instance id. The instance id is the primary key value for the portlet instance in the PF_PORTLET_INSTANCE table. A Portlet Definition may have many instances; these instance are created when administrators or users customize their portal. A Portlet 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 obtained via the persistence API.

getPortletDefinitionId

PortletDefinitionId getPortletDefinitionId()

Getter for the portlet definition id. The definition id is the primary key value for the portlet definition in the PF_PORTLET_DEFINITION table. A Portlet Definition may have many instances; these instance are created when administrators or users customize their portal. A Portlet 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 obtained via the persistence API.

getPlacementId

PlacementId getPlacementId()

Getter for the portlet's placement id. The placement id represents a unique placement of a portlet on a page. Pages may contain books and portlets. If this portlet 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 portlet might not have been placed on a page as it may be placed on another portlet or be the main portlet of the desktop. Also, if this view was obtained directly from the database and not from a parent view object then this value may also be null.

Specified by:
getPlacementId in interface PlaceableView
Returns
the placement id if this portlet is placed on a page and this PortletView object was retrieved view a higher-level view object (example DesktopView.getPortletView()).

getPortletInstance

PortletInstance getPortletInstance()

Retrieve the associated PortletInstance from this Portlet View. Portlet 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 Portlet Instance.

getPortletDefinition

PortletDefinition getPortletDefinition()

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

isDefaultMinimized

boolean isDefaultMinimized()
Has this portlet been set to default minimized state? If so this portlet will be minimized upon the first request to the page. This value can be set via the isDefaultMinimized attribute in the .portlet file and can be overridden at the instance level in the .portal file.

Returns
true if this portlet is to be displayed in a minimized state by default. The default value is false.

getTitlebarOrientation

short getTitlebarOrientation()

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

Returns
one of ORIENTATION_TOP, ORIENTATION_LEFT, ORIENTATION_RIGHTT, ORIENTATION_BOTTOM

getContentUri

String getContentUri()
Getter for the contentUri attribute in the .portlet file.

Returns
the path from the webapp to the contents of this portlet.

getBackingFile

String getBackingFile()
Get the path to the backing file for the portlet.


isForkable

boolean isForkable()

Can this portlet run in a separate thread? The developer marks this portlet as "forkable" and then either the developer or admin can mark the portlet as being forked via the "isForkRender" attribute. Note this attribute alone does not fork the portlet; it only enables it to be forked.

Returns
true if this portlet can be forked.

isForkRender

boolean isForkRender()

Should the framework render this portlet in a separate thread?

Returns
true if this portlet to run its preRender phase and render phase on a separate thread.

isRenderCacheable

boolean isRenderCacheable()
Does this portlet support caching. This value is set in the .portlet file by the developer.

Returns
true if caching can be turned on for this portlet.

getCacheExpires

int getCacheExpires()
Return the time-to-live in seconds for this portlet.


getPortletFile

String getPortletFile()
Get the file path to the .portlet definition file.

Returns
a relative path name from the webapp to the .portlet file.

isDeleted

boolean isDeleted()
If isDeleted is true then the portlet has been removed from the file system. It was not outright deleted from the database because it is in use by some page somewhere in the system. Either restore the file and this flag will go back to false or remove/replace this layout via the admin tools. If this flag is set on an object the admin tools will display the object with a different icon to denote that it has been removed from the file system

Returns
true if this file hase been deleted from the file system.

getHelpUri

String getHelpUri()
Get the URI to the content that should be displayed when this portlet enters help mode.

Returns
return the helpUri as defined in the database column: HELP_URI, otherwise null if none has been defined.

getEditUri

String getEditUri()
Get the URI to the content that should be displayed when this portlet enters edit mode.

Returns
return the helpUri as defined in the database column: EDIT_URI, otherwise null if none has been defined.

getInstanceLabel

String getInstanceLabel()
Return the unique label for this portlet. This value comes from the instance label on the portletInstance element in the .portal file.

Returns
non-null instance label for this portlet.

getWebAppName

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

Returns
a non-null webapp name.

getProducerHandle

String getProducerHandle()
For proxy portlets, returns the handle of the producer that this portlet is associated with. Returns null for local portlets. The producerHandle is the handle assigned by the user while adding a producer.

Returns
producer handle

getPortletHandle

String getPortletHandle()
For proxy portlets, returns the portletHandle assigned by the producer. For local portlets, returns null.

Returns
portletHandle offered by the producer

getStateChangeFlag

byte getStateChangeFlag()
For proxy portlets, returns the state change flag. This flag indicates whether the consumer must clone the remote portlet before creating a successor. The possible values for this flag are READ_ONLY, CLONE_BEFORE_WRITE and READ_WRITE. This flag is not relevant for local portlets.

Returns
state change flag

isRequiresUrlTemplates

boolean isRequiresUrlTemplates()
For proxy portlets, returns whether the remote portlet requires URL templates or not. This flag is controlled by the producer, and set at the time of creating a proxy portlet. This flag is not relevant for local portlets.

Returns
true if the remote portlet requires URL templates

isTemplatesStoredInSession

boolean isTemplatesStoredInSession()
For proxy portlets, returns whether the remote portlet stores URL templates in session or not. This flag is controlled by the producer, and set at the time of creating a proxy portlet. This flag is not relevant for local portlets.

Returns
true if the remote portlet stores URL templates in the session

getPortletState

byte[] getPortletState()
For proxy portlets, this method returns binary portletState if allocated by the producer. Returns null otherwise.

Returns
portlet state

getEnabledClientClassifications

String[] getEnabledClientClassifications()
Returns a list of classifications for which the Portlet is enabled, meaning the Portal framework will display it if the current request's client classification is found in this list. The String returned for each classification corresponds to the "description" attribute in client-classifications.xml.

Returns
the description String for each enabled classification.

getPreferences

Map<String,com.bea.portlet.prefs.Preference> getPreferences()

Returns preferences, if any.

Note that an empty return map does not indicate that this portlet does not have preferences.

Currently, this method returns preferences only when this PortletView is returned via the PortletTokenizer. At request time, applications should directly use the PreferencePersistenceManager to retrieve portlet preferences.

Returns
preferences
See Also
PreferencePersistenceManager

getCategoryIds

@Deprecated
int[] getCategoryIds()
Deprecated use getPortletCategoryDefinitionIds();

Returns the array of portlet category ids that this portlet has been attached to.


getPortletCategoryDefinitionIds

PortletCategoryDefinitionId[] getPortletCategoryDefinitionIds()

Returns the array of portlet category ids that this portlet has been attached to.

Returns
a non-null array of PortletCategoryDefinitionIds

isProducerOfferedPortlet

boolean isProducerOfferedPortlet()

getSpecifiedWsrpProperties

Collection<String> getSpecifiedWsrpProperties()
Get the specified properties, only valid when wsrpPropertiesMode == PortletDefinition.WSRP_USER_PROPERTIES_MODE__SPECIFIED

Returns
Returns the specifiedWsrpProperties or null if not set
See Also
PortletDefinition

setSpecifiedWsrpProperties

void setSpecifiedWsrpProperties(Collection<String> specifiedWsrpProperties)
Set the specified properties, only valid when wsrpPropertiesMode == PortletDefinition.WSRP_USER_PROPERTIES_MODE__SPECIFIED

Parameters
specifiedWsrpProperties - The specifiedWsrpProperties to set.
See Also
PortletDefinition

getWsrpPropertiesMode

int getWsrpPropertiesMode()
Get the properties mode Will be one of PortletDefinition.WSRP_PROPERTIES_MODE__*

Returns
Returns the wsrpPropertiesMode.
See Also
PortletDefinition

setWsrpPropertiesMode

void setWsrpPropertiesMode(int wsrpPropertiesMode)
Set the properties mode Must be one of PortletDefinition.WSRP_PROPERTIES_MODE__*

Parameters
wsrpPropertiesMode - The wsrpPropertiesMode to set.
See Also
PortletDefinition


Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.