com.ibm.portal.portletmodel
Interface PortletDefinition

All Superinterfaces:
ActiveFlag, Identifiable, Localized, MarkupCapable, MetaDataProvider, PortletPreferencesProvider, PublicRenderParameterProvider, TimeStamped
All Known Subinterfaces:
ModifiablePortletDefinition

public interface PortletDefinition
extends Identifiable, MarkupCapable, PortletPreferencesProvider, PublicRenderParameterProvider, Localized, TimeStamped, ActiveFlag

Interface that represents administrator settings for a portlet. A portlet definition provides localized titles and descriptions and an administrative level of preferences for portlets. The administrative preferences are used as a fallback for preferences that are not set or overridden by user preferences in a PortletEntity. In CONFIG mode, portlets read and write directly to and from the administrative preferences.

As a result of cloning the portlet, multiple portlet definitions may exist for the same portlet; each of these definitions parametrizes the deployed portlet with different titles and administrative preferences.

Note for IBM Portlets: the PortletPreferencesProvider.getPortletPreferencesLayer() method returns the portlet settings for IBM portlets.

Since:
6.0.1

Method Summary
 CommunicationEndpointProvider getEndpointProvider()
          Returns the CommunicationEndpointProvider which may be used to load the CommunicationEndpoints this portlet offers.
 java.lang.String getKeywords(java.util.Locale locale)
          returns the keywords for the portlet definition for the given locale.
 ListModel<? extends javax.portlet.PortletMode> getPortletModes()
          Returns a ListModel object of PortletMode objects that are contained in the portlet's list of supported portlet modes.
 ListModel<? extends javax.portlet.PortletMode> getPortletModes(java.lang.String markup)
          Returns a ListModel object of PortletMode objects that are contained in the portlet's list of supported portlet modes for a specific markup
 boolean supportsPortletMode(javax.portlet.PortletMode mode)
          Checks if a given portlet mode is in the list of supported portlet modes.
 boolean supportsPortletMode(javax.portlet.PortletMode mode, java.lang.String markup)
          Checks if a given portlet mode is in the list of supported portlet modes for the given markup.
 
Methods inherited from interface com.ibm.portal.Identifiable
getObjectID
 
Methods inherited from interface com.ibm.portal.admin.MarkupCapable
getMarkups, supportsMarkup, supportsMarkup
 
Methods inherited from interface com.ibm.portal.portletmodel.PortletPreferencesProvider
getMetaData, getPortletPreferencesLayer
 
Methods inherited from interface com.ibm.portal.portletmodel.PublicRenderParameterProvider
getPublicRenderParameters
 
Methods inherited from interface com.ibm.portal.Localized
getDescription, getLocales, getTitle
 
Methods inherited from interface com.ibm.portal.TimeStamped
getCreated, getLastModified
 
Methods inherited from interface com.ibm.portal.ActiveFlag
isActive
 

Method Detail

getEndpointProvider

CommunicationEndpointProvider getEndpointProvider()
Returns the CommunicationEndpointProvider which may be used to load the CommunicationEndpoints this portlet offers.

Returns:
a CommunicationEndpointProvider

getPortletModes

ListModel<? extends javax.portlet.PortletMode> getPortletModes()
                                                               throws ModelException
Returns a ListModel object of PortletMode objects that are contained in the portlet's list of supported portlet modes.

Returns:
a list model of PortletMode objects, never null
Throws:
ModelException - in case the portlet modes cannot be obtained

getPortletModes

ListModel<? extends javax.portlet.PortletMode> getPortletModes(java.lang.String markup)
                                                               throws ModelException
Returns a ListModel object of PortletMode objects that are contained in the portlet's list of supported portlet modes for a specific markup

Parameters:
markup - The markup for which the supported modes are requested.
Returns:
a list model of PortletMode objects, never null
Throws:
ModelException - in case the portlet modes cannot be obtained

supportsPortletMode

boolean supportsPortletMode(javax.portlet.PortletMode mode)
                            throws ModelException
Checks if a given portlet mode is in the list of supported portlet modes.
This method checks if the portlet may be invoked in the given mode in any of its supported markups.

Parameters:
mode - The portlet mode that is to be checked.
Returns:
true if the mode is in the list of supported modes for any supported markup, false if not.
Throws:
ModelException - in case the portlet modes cannot be obtained

supportsPortletMode

boolean supportsPortletMode(javax.portlet.PortletMode mode,
                            java.lang.String markup)
                            throws ModelException
Checks if a given portlet mode is in the list of supported portlet modes for the given markup.
This method checks if the portlet may be invoked in the given mode in the given markup, which must be in the list of supported markups for the portlet

Parameters:
mode - The portlet mode that is to be checked.
markup - The markup for which the mode is to be checked.
Returns:
true if the markup is in the list of supported markups and the mode is in the list of supported modes for that markup, false if not.
Throws:
ModelException - in case the portlet modes cannot be obtained

getKeywords

java.lang.String getKeywords(java.util.Locale locale)
returns the keywords for the portlet definition for the given locale. Does not perform any fallback, but will return null, if the keywords not defined

Parameters:
The - locale, must not be null
Returns:
The keywords, can be null
Since:
8.0.0