org.apache.wsrp4j.producer.provider.pluto.driver
Class DescriptionHandlerImpl

java.lang.Object
  extended byorg.apache.wsrp4j.producer.provider.pluto.driver.DescriptionHandlerImpl
All Implemented Interfaces:
DescriptionHandler

public class DescriptionHandlerImpl
extends java.lang.Object
implements DescriptionHandler

Version:
$Id: DescriptionHandlerImpl.java,v 1.9 2005/08/12 12:56:52 cziegeler Exp $
Author:
Peter Fischer, Ralf Altrichter*
See Also:
DescriptionHandler

Field Summary
private  java.lang.Boolean doesUrlTemplateProcessing
           
private  Logger logger
           
private  PersistentDataObject persistentDataObject
           
private  PersistentHandler persistentHandler
           
private  java.util.Map portletDescs
           
private  PlutoPortletPool portletPool
           
private  PlutoProvider provider
           
private  oasis.names.tc.wsrp.v1.types.ServiceDescription serviceDescription
           
 
Constructor Summary
private DescriptionHandlerImpl()
          Default constructor of DescriptionHandler implementation
 
Method Summary
static DescriptionHandler create(Provider provider)
          Creates a new DescriptionHandlerImpl-object.
 oasis.names.tc.wsrp.v1.types.PortletDescription getPortletDescription(java.lang.String portletHandle)
          Returns the portlet description for a given portlet handle
 oasis.names.tc.wsrp.v1.types.PortletDescription getPortletDescription(java.lang.String portletHandle, oasis.names.tc.wsrp.v1.types.RegistrationContext regContext, oasis.names.tc.wsrp.v1.types.UserContext userContext, java.lang.String[] desiredLocales)
          Returns an PortletDescription for the given PortletHandle, only if the registration context allows this action
protected  oasis.names.tc.wsrp.v1.types.PortletDescription getPortletDescription(java.lang.String portletHandle, java.lang.String[] desiredLocales)
          Returns an PortletDescription, constructed from the corresponding portlet entity
 oasis.names.tc.wsrp.v1.types.PortletDescription[] getProducerOfferedPortletDescriptions(oasis.names.tc.wsrp.v1.types.RegistrationContext regContext, java.lang.String[] desiredLocales)
          Returns an array containing portlet descriptions, i.e.
 oasis.names.tc.wsrp.v1.types.ServiceDescription getServiceDescription(oasis.names.tc.wsrp.v1.types.RegistrationContext regContext, java.lang.String[] desiredLocales)
          Returns a ServiceDescription, based on the input arguments.
 boolean isRegistrationRequired()
          Returns true, if registration is required on this producer
 void put(oasis.names.tc.wsrp.v1.types.ServiceDescription newServiceDescription)
          Adds/replaces the ServiceDescription object in the DescriptionHandler and stores the object for persistency.
private  void restore()
          Restores a single ServiceDescritpion
private  void store(PersistentDataObject persistentDataObject)
          Stores the ServiceDescription to persistent store
private  void trace_getPortletDescription_args(java.lang.String portletHandle, java.lang.String[] desiredLocales)
          Trace input arguments for getPortletDescription method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

provider

private PlutoProvider provider

portletPool

private PlutoPortletPool portletPool

persistentDataObject

private PersistentDataObject persistentDataObject

persistentHandler

private PersistentHandler persistentHandler

serviceDescription

private oasis.names.tc.wsrp.v1.types.ServiceDescription serviceDescription

doesUrlTemplateProcessing

private java.lang.Boolean doesUrlTemplateProcessing

portletDescs

private java.util.Map portletDescs

logger

private Logger logger
Constructor Detail

DescriptionHandlerImpl

private DescriptionHandlerImpl()
Default constructor of DescriptionHandler implementation

See Also:
DescriptionHandler
Method Detail

create

public static DescriptionHandler create(Provider provider)
Creates a new DescriptionHandlerImpl-object. To be called within an implementation of the abstract factory PortletPoolFactory.

Parameters:
provider - The provider for this DescriptionHandlerImpl
Returns:
DescriptionHandler

getServiceDescription

public oasis.names.tc.wsrp.v1.types.ServiceDescription getServiceDescription(oasis.names.tc.wsrp.v1.types.RegistrationContext regContext,
                                                                             java.lang.String[] desiredLocales)
                                                                      throws WSRPException
Description copied from interface: DescriptionHandler
Returns a ServiceDescription, based on the input arguments. See the getProducerOfferedPortletDescriptions() method for more details.

Specified by:
getServiceDescription in interface DescriptionHandler
Parameters:
regContext - RegistrationContext
desiredLocales - String[]
Throws:
WSRPException

isRegistrationRequired

public boolean isRegistrationRequired()
                               throws WSRPException
Returns true, if registration is required on this producer

Specified by:
isRegistrationRequired in interface DescriptionHandler
Returns:
true - registration is required false - registration is not required
Throws:
WSRPException

put

public void put(oasis.names.tc.wsrp.v1.types.ServiceDescription newServiceDescription)
         throws WSRPException
Adds/replaces the ServiceDescription object in the DescriptionHandler and stores the object for persistency.

Parameters:
newServiceDescription - ServiceDescription
Throws:
WSRPException

getProducerOfferedPortletDescriptions

public oasis.names.tc.wsrp.v1.types.PortletDescription[] getProducerOfferedPortletDescriptions(oasis.names.tc.wsrp.v1.types.RegistrationContext regContext,
                                                                                               java.lang.String[] desiredLocales)
                                                                                        throws WSRPException
Returns an array containing portlet descriptions, i.e. one portlet description per producer offered portlet. The array will contains only those descriptions, which match the RegistrationContext criteria. In addition, proxy portlets are not part of the list.

Specified by:
getProducerOfferedPortletDescriptions in interface DescriptionHandler
Parameters:
regContext - RegistrationContext
desiredLocales - array of requested locales, if null request all available locales
Returns:
Array of portlet description objects.
Throws:
WSRPException

getPortletDescription

public oasis.names.tc.wsrp.v1.types.PortletDescription getPortletDescription(java.lang.String portletHandle,
                                                                             oasis.names.tc.wsrp.v1.types.RegistrationContext regContext,
                                                                             oasis.names.tc.wsrp.v1.types.UserContext userContext,
                                                                             java.lang.String[] desiredLocales)
                                                                      throws WSRPException
Returns an PortletDescription for the given PortletHandle, only if the registration context allows this action

Specified by:
getPortletDescription in interface DescriptionHandler
Parameters:
portletHandle - PortletHandle
regContext - the registration context
userContext - the user context
desiredLocales - the locales for which the description should be returned
Returns:
PortletDescriptionb
Throws:
WSRPException

getPortletDescription

protected oasis.names.tc.wsrp.v1.types.PortletDescription getPortletDescription(java.lang.String portletHandle,
                                                                                java.lang.String[] desiredLocales)
                                                                         throws WSRPException
Returns an PortletDescription, constructed from the corresponding portlet entity

Parameters:
portletHandle - String portlet handle
desiredLocales - String[] desired locales
Returns:
PortletDescription
Throws:
WSRPException
See Also:
PortletDefinition, PortletEntityRegistry

getPortletDescription

public oasis.names.tc.wsrp.v1.types.PortletDescription getPortletDescription(java.lang.String portletHandle)
                                                                      throws WSRPException
Returns the portlet description for a given portlet handle

Specified by:
getPortletDescription in interface DescriptionHandler
Parameters:
portletHandle - String representing a portlet's handle
Returns:
PortletDescription
Throws:
WSRPException

store

private void store(PersistentDataObject persistentDataObject)
            throws WSRPException
Stores the ServiceDescription to persistent store

Parameters:
persistentDataObject -
Throws:
WSRPException

restore

private void restore()
              throws WSRPException
Restores a single ServiceDescritpion

Throws:
WSRPException

trace_getPortletDescription_args

private void trace_getPortletDescription_args(java.lang.String portletHandle,
                                              java.lang.String[] desiredLocales)
Trace input arguments for getPortletDescription method

Parameters:
portletHandle - as String
desiredLocales - as String[]


--