org.apache.wsrp4j.producer.provider
Interface DescriptionHandler


public interface DescriptionHandler

This interface provides methods to access portlet descriptions as well as the service description.

Author:
Stefan Behl

Method Summary
 PortletDescription getPortletDescription(java.lang.String portletHandle)
          Returns a complete PortletDescription for the given PortletHandle.
 PortletDescription getPortletDescription(java.lang.String portletHandle, RegistrationContext regContext, UserContext userContext, java.lang.String[] desiredLocales)
          Returns an PortletDescription for the given PortletHandle based on the input arguments.
 PortletDescription[] getProducerOfferedPortletDescriptions(RegistrationContext regContext, java.lang.String[] desiredLocales)
          Returns an array containing all portlet descriptions, i.e.
 ServiceDescription getServiceDescription(RegistrationContext regContext, java.lang.String[] desiredLocales)
          Returns a ServiceDescription, based on the input arguments.
 boolean isRegistrationRequired()
          Indicates whether registration is required (for this Producer) or not.
 

Method Detail

getServiceDescription

public ServiceDescription getServiceDescription(RegistrationContext regContext,
                                                java.lang.String[] desiredLocales)
                                         throws WSRPException
Returns a ServiceDescription, based on the input arguments. See the getProducerOfferedPortletDescriptions() method for more details.

Parameters:
regContext - contains data related to a particular registration (e.g. the registration handle and state)
desiredLocales - array of requested locales, if null request all available locales
Throws:
WSRPException

isRegistrationRequired

public boolean isRegistrationRequired()
                               throws WSRPException
Indicates whether registration is required (for this Producer) or not.

Returns:
Returns true if registration is required, otherwise false.
Throws:
WSRPException

getProducerOfferedPortletDescriptions

public PortletDescription[] getProducerOfferedPortletDescriptions(RegistrationContext regContext,
                                                                  java.lang.String[] desiredLocales)
                                                           throws WSRPException
Returns an array containing all portlet descriptions, i.e. one portlet description per producer offered portlet.

Parameters:
regContext - contains data related to a particular registration (e.g. the registration handle and state)
desiredLocales - array of requested locales, if null request all available locales
Returns:
Array of PortletDescription-objects.
Throws:
WSRPException

getPortletDescription

public PortletDescription getPortletDescription(java.lang.String portletHandle,
                                                RegistrationContext regContext,
                                                UserContext userContext,
                                                java.lang.String[] desiredLocales)
                                         throws WSRPException
Returns an PortletDescription for the given PortletHandle based on the input arguments. On how the desiredLocales and sendAllLocales parameter affects the returned PortletDescription, please see the method getProducerOfferedPortletDescriptions().

Parameters:
portletHandle - the handle of a particular portlet
regContext - contains data related to a particular registration (e.g. the registration handle and state)
userContext - contains the user context
desiredLocales - array of requested locales, if null request all available locales
Returns:
PortletDescription
Throws:
WSRPException

getPortletDescription

public PortletDescription getPortletDescription(java.lang.String portletHandle)
                                         throws WSRPException
Returns a complete PortletDescription for the given PortletHandle.

Parameters:
portletHandle - the handle of a particular portlet
Returns:
PortletDescription
Throws:
WSRPException