org.apache.jetspeed.factory
Class JetspeedPortletFactory

java.lang.Object
  extended by org.apache.jetspeed.factory.JetspeedPortletFactory
All Implemented Interfaces:
org.apache.jetspeed.factory.PortletFactory

public class JetspeedPortletFactory
extends Object
implements org.apache.jetspeed.factory.PortletFactory

JetspeedPortletFactory

Version:
$Id: JetspeedPortletFactory.java 593513 2007-11-09 12:48:34Z woonsan $
Author:
Scott T. Weaver

Field Summary
private  boolean autoSwitchConfigMode
          Flag whether the instantiated proxy will switch config mode to built-in config edit page or not.
private  boolean autoSwitchEditDefaultsModeToEditMode
          Flag whether the instantiated proxy will switch edit_defaults mode to edit mode automatically or not.
private  Map classLoaderMap
           
private  String customConfigModePortletUniqueName
           
private static org.apache.commons.logging.Log log
           
private  Map portletCache
           
private  boolean portletProxyUsed
          Flag whether this factory will create proxy instances for actual portlet instances or not.
private  Map validatorCache
           
 
Constructor Summary
JetspeedPortletFactory()
           
JetspeedPortletFactory(boolean autoSwitchConfigMode, boolean autoSwitchEditDefaultsModeToEditMode)
           
 
Method Summary
 String getCustomConfigModePortletUniqueName()
           
 ClassLoader getPortletApplicationClassLoader(org.apache.jetspeed.om.common.portlet.PortletApplication pa)
           
 org.apache.jetspeed.factory.PortletInstance getPortletInstance(javax.servlet.ServletContext servletContext, org.apache.pluto.om.portlet.PortletDefinition pd)
          Gets a portlet by either creating it or returning a handle to it from the portlet 'cache'
 boolean getPortletProxyUsed()
           
 javax.portlet.PreferencesValidator getPreferencesValidator(org.apache.pluto.om.portlet.PortletDefinition pd)
           
 boolean isPortletApplicationRegistered(org.apache.jetspeed.om.common.portlet.PortletApplication pa)
           
 void registerPortletApplication(org.apache.jetspeed.om.common.portlet.PortletApplication pa, ClassLoader cl)
           
 void setCustomConfigModePortletUniqueName(String customConfigModePortletUniqueName)
           
 void setPortletProxyUsed(boolean portletProxyUsed)
           
 void unregisterPortletApplication(org.apache.jetspeed.om.common.portlet.PortletApplication pa)
           
 void updatePortletConfig(org.apache.pluto.om.portlet.PortletDefinition pd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

portletCache

private Map portletCache

validatorCache

private Map validatorCache

log

private static final org.apache.commons.logging.Log log

classLoaderMap

private final Map classLoaderMap

portletProxyUsed

private boolean portletProxyUsed
Flag whether this factory will create proxy instances for actual portlet instances or not.


autoSwitchEditDefaultsModeToEditMode

private boolean autoSwitchEditDefaultsModeToEditMode
Flag whether the instantiated proxy will switch edit_defaults mode to edit mode automatically or not.


autoSwitchConfigMode

private boolean autoSwitchConfigMode
Flag whether the instantiated proxy will switch config mode to built-in config edit page or not.


customConfigModePortletUniqueName

private String customConfigModePortletUniqueName
Constructor Detail

JetspeedPortletFactory

public JetspeedPortletFactory()

JetspeedPortletFactory

public JetspeedPortletFactory(boolean autoSwitchConfigMode,
                              boolean autoSwitchEditDefaultsModeToEditMode)
Method Detail

setPortletProxyUsed

public void setPortletProxyUsed(boolean portletProxyUsed)

getPortletProxyUsed

public boolean getPortletProxyUsed()

setCustomConfigModePortletUniqueName

public void setCustomConfigModePortletUniqueName(String customConfigModePortletUniqueName)

getCustomConfigModePortletUniqueName

public String getCustomConfigModePortletUniqueName()

registerPortletApplication

public void registerPortletApplication(org.apache.jetspeed.om.common.portlet.PortletApplication pa,
                                       ClassLoader cl)
Specified by:
registerPortletApplication in interface org.apache.jetspeed.factory.PortletFactory

unregisterPortletApplication

public void unregisterPortletApplication(org.apache.jetspeed.om.common.portlet.PortletApplication pa)
Specified by:
unregisterPortletApplication in interface org.apache.jetspeed.factory.PortletFactory

getPreferencesValidator

public javax.portlet.PreferencesValidator getPreferencesValidator(org.apache.pluto.om.portlet.PortletDefinition pd)
Specified by:
getPreferencesValidator in interface org.apache.jetspeed.factory.PortletFactory

getPortletInstance

public org.apache.jetspeed.factory.PortletInstance getPortletInstance(javax.servlet.ServletContext servletContext,
                                                                      org.apache.pluto.om.portlet.PortletDefinition pd)
                                                               throws javax.portlet.PortletException
Gets a portlet by either creating it or returning a handle to it from the portlet 'cache'

Specified by:
getPortletInstance in interface org.apache.jetspeed.factory.PortletFactory
Parameters:
portletDefinition - The definition of the portlet
Returns:
PortletInstance
Throws:
javax.portlet.PortletException

updatePortletConfig

public void updatePortletConfig(org.apache.pluto.om.portlet.PortletDefinition pd)
Specified by:
updatePortletConfig in interface org.apache.jetspeed.factory.PortletFactory

getPortletApplicationClassLoader

public ClassLoader getPortletApplicationClassLoader(org.apache.jetspeed.om.common.portlet.PortletApplication pa)
Specified by:
getPortletApplicationClassLoader in interface org.apache.jetspeed.factory.PortletFactory

isPortletApplicationRegistered

public boolean isPortletApplicationRegistered(org.apache.jetspeed.om.common.portlet.PortletApplication pa)
Specified by:
isPortletApplicationRegistered in interface org.apache.jetspeed.factory.PortletFactory


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.