com.ibm.portal.portletmodel.admin
Interface PortletDefinitionLocator<T extends PortletDefinition>

All Superinterfaces:
LocalizedLocator<T>, Locator<T>, TimeStampedResourceLocator<T>, UniqueNameLocator<T>

public interface PortletDefinitionLocator<T extends PortletDefinition>
extends Locator<T>, LocalizedLocator<T>, UniqueNameLocator<T>, TimeStampedResourceLocator<T>

A locator the can be provided by PortletDefinitionList implementations. The locator is optionally implemented by a portlet definition list.

Code example:

 final PortletDefinitionList list = ...;
 final Locator loc = list.getLocator();
 if (loc instanceof PortletDefinitionLocator) {
     final PortletDefinitionLocator locator = (PortletDefinitionLocator) loc;
     final ListModel portletDefinitions = locator.getAllForPortlet(aPortlet);
 }
 

Since:
6.0.1

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ibm.portal.content.LocalizedLocator
LocalizedLocator.SearchPattern
 
Method Summary
 ListModel<PortletDefinition> findAllProvided()
          Returns all portlet definitions that are provided as a web service (WSRP)
 ListModel<PortletDefinition> findAllRemote()
          Returns all portlet definitions that are consumed as remote portlet definitions (e.
 java.util.Map<PortletDefinition,java.lang.Iterable<java.util.Locale>> findByKeyword(LocalizedLocator.SearchPattern pattern, java.lang.String term, java.lang.Iterable<java.util.Locale> locales)
          Performs a search for all portlet definitions whose keywords match the given term and pattern in any of the given locales
 ListModel<? extends T> getAllForPortlet(Portlet aPortlet)
          Returns all portlet definitions that are associated with the given portlet
 
Methods inherited from interface com.ibm.portal.content.LocalizedLocator
findByDescription, findByTitle
 
Methods inherited from interface com.ibm.portal.UniqueNameLocator
findByUniqueNamePattern
 
Methods inherited from interface com.ibm.portal.TimeStampedResourceLocator
findAllCreatedAfter, findAllCreatedBefore, findAllModifiedAfter, findAllModifiedBefore
 
Methods inherited from interface com.ibm.portal.Locator
findByID, findByUniqueName
 

Method Detail

getAllForPortlet

ListModel<? extends T> getAllForPortlet(Portlet aPortlet)
                                                                  throws ModelException,
                                                                         DataException
Returns all portlet definitions that are associated with the given portlet

Returns:
a list model with all portlet defintions for the given portlet; never returns null.
Throws:
DataException - if a database error occurs while accessing the data backend
ModelException - if an error occured while accessing model information

findAllProvided

ListModel<PortletDefinition> findAllProvided()
                                             throws ModelException,
                                                    DataException
Returns all portlet definitions that are provided as a web service (WSRP)

Returns:
a list model with all portlet defintions which are provided as a web service never returns null.
Throws:
DataException - if a database error occurs while accessing the data backend
ModelException - if an error occured while accessing model information
Since:
8.0.0

findAllRemote

ListModel<PortletDefinition> findAllRemote()
                                           throws ModelException,
                                                  DataException
Returns all portlet definitions that are consumed as remote portlet definitions (e. g. through WSRP)

Returns:
a list model with all portlet defintions which are consumed as a web service never returns null.
Throws:
DataException - if a database error occurs while accessing the data backend
ModelException - if an error occured while accessing model information
Since:
8.0.0

findByKeyword

java.util.Map<PortletDefinition,java.lang.Iterable<java.util.Locale>> findByKeyword(LocalizedLocator.SearchPattern pattern,
                                                                                    java.lang.String term,
                                                                                    java.lang.Iterable<java.util.Locale> locales)
                                                                                    throws ModelException
Performs a search for all portlet definitions whose keywords match the given term and pattern in any of the given locales

Parameters:
pattern - The pattern, must not be null
term - The term to search, must not be null
locales - The locales, must not be null and must not be empty.
Returns:
An unmodifiable map holding all found nodes as keys. The associated value represents the set of locales in which the keyword was found. The implementation of this locator is free to choose if all given locales are processed or if the title matches in one locale the processing of further locales is skipped, e. g. due to performance reasons.
Throws:
ModelException
Since:
8.0.0