org.apache.pluto.driver.services.impl.resource
Class SupportedModesServiceImpl

java.lang.Object
  extended by org.apache.pluto.driver.services.impl.resource.SupportedModesServiceImpl
All Implemented Interfaces:
DriverConfigurationService, SupportedModesService

public class SupportedModesServiceImpl
extends java.lang.Object
implements SupportedModesService

Allows clients to determine if a particular PortletMode is supported by the portal, a particular portlet, or both. This implementation depends on PropertyConfigService. The service implementations are injected by Spring.

Since:
September 9, 2006
Version:
$Id: SupportedModesServiceImpl.java 593823 2007-11-10 23:48:32Z cdoremus $

Constructor Summary
SupportedModesServiceImpl(PropertyConfigService propertyService)
          Constructs a SupportedModesService with its dependencies.
 
Method Summary
 void destroy()
          Destroy the service, notifying it of shutdown.
 void init(javax.servlet.ServletContext ctx)
          Initialize the service for use by the driver.
 boolean isPortletManagedMode(java.lang.String portletId, java.lang.String mode)
          For PTL.8.4 implementation of portlet-managed modes, defined in portlet.xml where portlet child element custom-portlet-mode/portal-managed value is false.
 boolean isPortletModeSupported(java.lang.String portletId, java.lang.String mode)
          Returns true if the portlet and the portal support the supplied mode.
 boolean isPortletModeSupportedByPortal(java.lang.String mode)
          Returns true if the portal supports the supplied mode.
 boolean isPortletModeSupportedByPortlet(java.lang.String portletId, java.lang.String mode)
          Returns true if the portlet supports the supplied mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SupportedModesServiceImpl

public SupportedModesServiceImpl(PropertyConfigService propertyService)
Constructs a SupportedModesService with its dependencies.

Parameters:
propertyService - the PropertyConfigService
Method Detail

isPortletModeSupported

public boolean isPortletModeSupported(java.lang.String portletId,
                                      java.lang.String mode)
Description copied from interface: SupportedModesService
Returns true if the portlet and the portal support the supplied mode.

Specified by:
isPortletModeSupported in interface SupportedModesService
Parameters:
portletId - the id uniquely identifiying the portlet
mode - the portlet mode
Returns:
true if the portlet and portal both support the supplied mode

isPortletModeSupportedByPortal

public boolean isPortletModeSupportedByPortal(java.lang.String mode)
Description copied from interface: SupportedModesService
Returns true if the portal supports the supplied mode.

Specified by:
isPortletModeSupportedByPortal in interface SupportedModesService
Parameters:
mode - the portlet mode
Returns:
true if the portal supports the supplied mode

isPortletModeSupportedByPortlet

public boolean isPortletModeSupportedByPortlet(java.lang.String portletId,
                                               java.lang.String mode)
Description copied from interface: SupportedModesService
Returns true if the portlet supports the supplied mode.

Specified by:
isPortletModeSupportedByPortlet in interface SupportedModesService
Parameters:
portletId - the id uniquely identifying the portlet
mode - the portlet mode
Returns:
true if the portlet supports the supplied mode.

destroy

public void destroy()
             throws DriverConfigurationException
Description copied from interface: DriverConfigurationService
Destroy the service, notifying it of shutdown.

Specified by:
destroy in interface DriverConfigurationService
Throws:
DriverConfigurationException

init

public void init(javax.servlet.ServletContext ctx)
          throws DriverConfigurationException
Description copied from interface: DriverConfigurationService
Initialize the service for use by the driver. This method allows the service to retrieve required resources from the context and instantiate any required services.

Specified by:
init in interface DriverConfigurationService
Parameters:
ctx - the Portal's servlet context in which the service will be executing.
Throws:
DriverConfigurationException

isPortletManagedMode

public boolean isPortletManagedMode(java.lang.String portletId,
                                    java.lang.String mode)
Description copied from interface: SupportedModesService
For PTL.8.4 implementation of portlet-managed modes, defined in portlet.xml where portlet child element custom-portlet-mode/portal-managed value is false.

Specified by:
isPortletManagedMode in interface SupportedModesService
Parameters:
portletId - the ID of the portlet
mode - the portlet mode as defined in the custom-portlet-mode/portlet-mode and supports/portlet-mode elements.
Returns:


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