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

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

public class SupportedWindowStateServiceImpl
extends java.lang.Object
implements SupportedWindowStateService


Field Summary
protected static java.util.Set JSR168_WINDOW_STATES
          Window States that are specified in PLT.9
protected  java.util.Set portalSupportedWindowStates
          Contains String objects of window states supported by the portal (obtained from PropertyConfigService).
protected  PortletRegistryService portletRegistry
          PortletRegistry is obtained from the PortletContainer on this service's initialization.
protected  PropertyConfigService propertyService
          PropertyConfigService is injected by Spring.
 
Constructor Summary
SupportedWindowStateServiceImpl(PropertyConfigService propertyService)
           
 
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 isWindowStateSupported(java.lang.String portletId, java.lang.String state)
          Returns true if the portlet and the portal support the supplied window state.
 boolean isWindowStateSupportedByPortal(java.lang.String state)
          Returns true if the portal supports the supplied window state.
 boolean isWindowStateSupportedByPortlet(java.lang.String portletId, java.lang.String state)
          Returns true if the portlet supports the supplied window state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertyService

protected PropertyConfigService propertyService
PropertyConfigService is injected by Spring. We use it to obtain the window states that the portal supports. It is protected only so that the unit tests have access to the field.


portletRegistry

protected PortletRegistryService portletRegistry
PortletRegistry is obtained from the PortletContainer on this service's initialization. It is protected only so that the unit tests have access to the field. Note that it is an optional container service, but this implmentation requires it.


portalSupportedWindowStates

protected java.util.Set portalSupportedWindowStates
Contains String objects of window states supported by the portal (obtained from PropertyConfigService). It is protected only so that the unit tests have access to the field.


JSR168_WINDOW_STATES

protected static final java.util.Set JSR168_WINDOW_STATES
Window States that are specified in PLT.9

Constructor Detail

SupportedWindowStateServiceImpl

public SupportedWindowStateServiceImpl(PropertyConfigService propertyService)
Method Detail

isWindowStateSupported

public boolean isWindowStateSupported(java.lang.String portletId,
                                      java.lang.String state)
Description copied from interface: SupportedWindowStateService
Returns true if the portlet and the portal support the supplied window state.

Specified by:
isWindowStateSupported in interface SupportedWindowStateService
Parameters:
portletId - the id uniquely identifying the portlet
state - the portlet window state
Returns:
true if the portlet and portal both support the supplied window state

isWindowStateSupportedByPortal

public boolean isWindowStateSupportedByPortal(java.lang.String state)
Description copied from interface: SupportedWindowStateService
Returns true if the portal supports the supplied window state.

Specified by:
isWindowStateSupportedByPortal in interface SupportedWindowStateService
Parameters:
state - the portlet window state
Returns:
true if the portal supports the supplied window state

isWindowStateSupportedByPortlet

public boolean isWindowStateSupportedByPortlet(java.lang.String portletId,
                                               java.lang.String state)
Description copied from interface: SupportedWindowStateService
Returns true if the portlet supports the supplied window state.

Specified by:
isWindowStateSupportedByPortlet in interface SupportedWindowStateService
Parameters:
portletId - the id uniquely identifying the portlet
state - the window state
Returns:
true if the portlet support the supplied state

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


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