org.apache.pluto.internal.impl
Class PortletEntityImpl

java.lang.Object
  extended by org.apache.pluto.internal.impl.PortletEntityImpl
All Implemented Interfaces:
PortletEntity

public class PortletEntityImpl
extends java.lang.Object
implements PortletEntity

The PortletEntity encapsulates all data pertaining to a single portlet instance. This instance may appear zero or more times per user. The PortletEntity consists of two primary peices of information, the Portlet Definition as defined by the PortletDD and the Wrapping Servlet information as defined by theServletDD


Method Summary
 java.lang.String getControllerServletUri()
          Deprecated.  
 InternalPortletPreference[] getDefaultPreferences()
          Returns an array of default preferences of this portlet.
 PortletDD getPortletDefinition()
          Returns the portlet description.
 PreferencesValidator getPreferencesValidator()
          Returns the preferences validator instance for this portlet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getControllerServletUri

public java.lang.String getControllerServletUri()
Deprecated. 

Returns the URI to the controller servlet that wraps this portlet.

Specified by:
getControllerServletUri in interface PortletEntity
Returns:
the URI to the controller servlet that wraps this portlet.

getDefaultPreferences

public InternalPortletPreference[] getDefaultPreferences()
Returns an array of default preferences of this portlet. The default preferences are retrieved from the portlet application descriptor.

Data retrieved from portlet.xml are injected into the domain object PortletPreferenceDD. This method converts the domain objects into PortletPreference objects.

Note that if no value is bound to a given preference key, PortletPreferenceDD.getValues() will return an empty string list, but the value array of PortletPreference should be set to null (instead of an empty array).

This method never returns null, but the values held by PortletPreference may be null.

Specified by:
getDefaultPreferences in interface PortletEntity
Returns:
the preference set
See Also:
PortletPreferenceDD

getPortletDefinition

public PortletDD getPortletDefinition()
Returns the portlet description. The return value cannot be NULL.

Specified by:
getPortletDefinition in interface PortletEntity
Returns:
the portlet description.

getPreferencesValidator

public PreferencesValidator getPreferencesValidator()
                                             throws ValidatorException
Returns the preferences validator instance for this portlet. One validator instance is created per portlet definition.

Specified by:
getPreferencesValidator in interface PortletEntity
Returns:
the preferences validator instance for this portlet.
Throws:
ValidatorException - if fail to instantiate the validator.


Copyright © 2003-2010 Apache Software Foundation. All Rights Reserved.