org.apache.jetspeed.tools.pamanager
Class PortletApplicationManager

java.lang.Object
  extended by org.apache.jetspeed.tools.pamanager.PortletApplicationManager
All Implemented Interfaces:
org.apache.jetspeed.tools.pamanager.PortletApplicationManagement

public class PortletApplicationManager
extends Object
implements org.apache.jetspeed.tools.pamanager.PortletApplicationManagement

PortletApplicationManager

Version:
$Id: PortletApplicationManager.java,v 1.21 2005/04/09 00:24:44 shinsuke Exp $
Author:
Ate Douma

Nested Class Summary
private static class PortletApplicationManager.DescriptorChangeMonitor
           
 
Field Summary
protected  String appRoot
           
protected  boolean autoCreateRoles
           
private static int DEFAULT_DESCRIPTOR_CHANGE_MONITOR_INTERVAL
           
private static int DEFAULT_MAX_RETRIED_STARTS
           
protected  int descriptorChangeMonitorInterval
           
protected  org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent entityAccess
           
private static org.apache.commons.logging.Log log
           
protected  int maxRetriedStarts
          holds the max number of retries in case of unsuccessful PA start this addresses possible startup errors in clustered environments
protected  PortletApplicationManager.DescriptorChangeMonitor monitor
           
protected  org.apache.jetspeed.cluster.NodeManager nodeManager
           
protected  org.apache.jetspeed.security.PermissionManager permissionManager
           
protected  List permissionRoles
           
protected  org.apache.jetspeed.factory.PortletFactory portletFactory
           
protected  org.apache.jetspeed.components.portletregistry.PortletRegistry registry
           
protected  org.apache.jetspeed.security.RoleManager roleManager
           
protected  org.apache.jetspeed.search.SearchEngine searchEngine
           
protected  boolean started
           
protected  org.apache.jetspeed.container.window.PortletWindowAccessor windowAccess
           
 
Fields inherited from interface org.apache.jetspeed.tools.pamanager.PortletApplicationManagement
LOCAL_PA_PREFIX
 
Constructor Summary
PortletApplicationManager(org.apache.jetspeed.factory.PortletFactory portletFactory, org.apache.jetspeed.components.portletregistry.PortletRegistry registry, org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent entityAccess, org.apache.jetspeed.container.window.PortletWindowAccessor windowAccess, org.apache.jetspeed.security.PermissionManager permissionManager, org.apache.jetspeed.search.SearchEngine searchEngine, org.apache.jetspeed.security.RoleManager roleManager, List permissionRoles, org.apache.jetspeed.cluster.NodeManager nodeManager, String appRoot)
          Creates a new PortletApplicationManager object.
 
Method Summary
private  void checkStarted()
           
protected  void checkValidContextName(String contextName, boolean local)
           
 int getDescriptorChangeMonitorInterval()
           
 int getMaxRetriedStarts()
           
protected  void grantDefaultPermissions(String paName)
           
 boolean isStarted()
           
protected  org.apache.jetspeed.om.common.portlet.MutablePortletApplication registerPortletApplication(PortletApplicationWar paWar, org.apache.jetspeed.om.common.portlet.MutablePortletApplication oldPA, int paType, ClassLoader paClassLoader)
           
protected  void revokeDefaultPermissions(String paName)
           
 void setAutoCreateRoles(boolean autoCreateRoles)
           
 void setDescriptorChangeMonitorInterval(int descriptorChangeMonitorInterval)
           
 void setMaxRetriedStarts(int maxRetriedStarts)
           
 void setRoleManager(org.apache.jetspeed.security.RoleManager roleManager)
           
 void setSearchEngine(org.apache.jetspeed.search.SearchEngine searchEngine)
           
 void start()
           
 void startInternalApplication(String contextName)
           
 void startLocalPortletApplication(String contextName, org.apache.jetspeed.util.FileSystemHelper warStruct, ClassLoader paClassLoader)
           
protected  void startPA(String contextName, String contextPath, org.apache.jetspeed.util.FileSystemHelper warStruct, ClassLoader paClassLoader, int paType)
           
protected  void startPA(String contextName, String contextPath, org.apache.jetspeed.util.FileSystemHelper warStruct, ClassLoader paClassLoader, int paType, long checksum)
           
 void startPortletApplication(String contextName, org.apache.jetspeed.util.FileSystemHelper warStruct, ClassLoader paClassLoader)
           
 void startPortletApplication(String contextName, String contextPath, org.apache.jetspeed.util.FileSystemHelper warStruct, ClassLoader paClassLoader)
           
 void stop()
           
 void stopLocalPortletApplication(String contextName)
           
protected  void stopPA(String contextName, int paType)
           
 void stopPortletApplication(String contextName)
           
protected  void unregisterPortletApplication(org.apache.jetspeed.om.common.portlet.MutablePortletApplication pa, boolean purgeEntityInfo)
           
 void unregisterPortletApplication(String paName)
           
protected  void updateSearchEngine(boolean remove, org.apache.jetspeed.om.common.portlet.MutablePortletApplication pa)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DESCRIPTOR_CHANGE_MONITOR_INTERVAL

private static int DEFAULT_DESCRIPTOR_CHANGE_MONITOR_INTERVAL

DEFAULT_MAX_RETRIED_STARTS

private static int DEFAULT_MAX_RETRIED_STARTS

log

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

entityAccess

protected org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent entityAccess

portletFactory

protected org.apache.jetspeed.factory.PortletFactory portletFactory

registry

protected org.apache.jetspeed.components.portletregistry.PortletRegistry registry

windowAccess

protected org.apache.jetspeed.container.window.PortletWindowAccessor windowAccess

searchEngine

protected org.apache.jetspeed.search.SearchEngine searchEngine

roleManager

protected org.apache.jetspeed.security.RoleManager roleManager

permissionManager

protected org.apache.jetspeed.security.PermissionManager permissionManager

autoCreateRoles

protected boolean autoCreateRoles

permissionRoles

protected List permissionRoles

descriptorChangeMonitorInterval

protected int descriptorChangeMonitorInterval

maxRetriedStarts

protected int maxRetriedStarts
holds the max number of retries in case of unsuccessful PA start this addresses possible startup errors in clustered environments


monitor

protected PortletApplicationManager.DescriptorChangeMonitor monitor

started

protected boolean started

appRoot

protected String appRoot

nodeManager

protected org.apache.jetspeed.cluster.NodeManager nodeManager
Constructor Detail

PortletApplicationManager

public PortletApplicationManager(org.apache.jetspeed.factory.PortletFactory portletFactory,
                                 org.apache.jetspeed.components.portletregistry.PortletRegistry registry,
                                 org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent entityAccess,
                                 org.apache.jetspeed.container.window.PortletWindowAccessor windowAccess,
                                 org.apache.jetspeed.security.PermissionManager permissionManager,
                                 org.apache.jetspeed.search.SearchEngine searchEngine,
                                 org.apache.jetspeed.security.RoleManager roleManager,
                                 List permissionRoles,
                                 org.apache.jetspeed.cluster.NodeManager nodeManager,
                                 String appRoot)
Creates a new PortletApplicationManager object.

Method Detail

start

public void start()

stop

public void stop()

isStarted

public boolean isStarted()
Specified by:
isStarted in interface org.apache.jetspeed.tools.pamanager.PortletApplicationManagement

setRoleManager

public void setRoleManager(org.apache.jetspeed.security.RoleManager roleManager)

setAutoCreateRoles

public void setAutoCreateRoles(boolean autoCreateRoles)

setSearchEngine

public void setSearchEngine(org.apache.jetspeed.search.SearchEngine searchEngine)

checkStarted

private void checkStarted()

startLocalPortletApplication

public void startLocalPortletApplication(String contextName,
                                         org.apache.jetspeed.util.FileSystemHelper warStruct,
                                         ClassLoader paClassLoader)
                                  throws org.apache.jetspeed.components.portletregistry.RegistryException
Specified by:
startLocalPortletApplication in interface org.apache.jetspeed.tools.pamanager.PortletApplicationManagement
Throws:
org.apache.jetspeed.components.portletregistry.RegistryException

startInternalApplication

public void startInternalApplication(String contextName)
                              throws org.apache.jetspeed.components.portletregistry.RegistryException
Specified by:
startInternalApplication in interface org.apache.jetspeed.tools.pamanager.PortletApplicationManagement
Throws:
org.apache.jetspeed.components.portletregistry.RegistryException

startPortletApplication

public void startPortletApplication(String contextName,
                                    org.apache.jetspeed.util.FileSystemHelper warStruct,
                                    ClassLoader paClassLoader)
                             throws org.apache.jetspeed.components.portletregistry.RegistryException
Specified by:
startPortletApplication in interface org.apache.jetspeed.tools.pamanager.PortletApplicationManagement
Throws:
org.apache.jetspeed.components.portletregistry.RegistryException

startPortletApplication

public void startPortletApplication(String contextName,
                                    String contextPath,
                                    org.apache.jetspeed.util.FileSystemHelper warStruct,
                                    ClassLoader paClassLoader)
                             throws org.apache.jetspeed.components.portletregistry.RegistryException
Specified by:
startPortletApplication in interface org.apache.jetspeed.tools.pamanager.PortletApplicationManagement
Throws:
org.apache.jetspeed.components.portletregistry.RegistryException

stopLocalPortletApplication

public void stopLocalPortletApplication(String contextName)
                                 throws org.apache.jetspeed.components.portletregistry.RegistryException
Specified by:
stopLocalPortletApplication in interface org.apache.jetspeed.tools.pamanager.PortletApplicationManagement
Throws:
org.apache.jetspeed.components.portletregistry.RegistryException

stopPortletApplication

public void stopPortletApplication(String contextName)
                            throws org.apache.jetspeed.components.portletregistry.RegistryException
Specified by:
stopPortletApplication in interface org.apache.jetspeed.tools.pamanager.PortletApplicationManagement
Throws:
org.apache.jetspeed.components.portletregistry.RegistryException

unregisterPortletApplication

public void unregisterPortletApplication(String paName)
                                  throws org.apache.jetspeed.components.portletregistry.RegistryException
Specified by:
unregisterPortletApplication in interface org.apache.jetspeed.tools.pamanager.PortletApplicationManagement
Throws:
org.apache.jetspeed.components.portletregistry.RegistryException

checkValidContextName

protected void checkValidContextName(String contextName,
                                     boolean local)
                              throws org.apache.jetspeed.components.portletregistry.RegistryException
Throws:
org.apache.jetspeed.components.portletregistry.RegistryException

registerPortletApplication

protected org.apache.jetspeed.om.common.portlet.MutablePortletApplication registerPortletApplication(PortletApplicationWar paWar,
                                                                                                     org.apache.jetspeed.om.common.portlet.MutablePortletApplication oldPA,
                                                                                                     int paType,
                                                                                                     ClassLoader paClassLoader)
                                                                                              throws org.apache.jetspeed.components.portletregistry.RegistryException
Throws:
org.apache.jetspeed.components.portletregistry.RegistryException

startPA

protected void startPA(String contextName,
                       String contextPath,
                       org.apache.jetspeed.util.FileSystemHelper warStruct,
                       ClassLoader paClassLoader,
                       int paType)
                throws org.apache.jetspeed.components.portletregistry.RegistryException
Throws:
org.apache.jetspeed.components.portletregistry.RegistryException

startPA

protected void startPA(String contextName,
                       String contextPath,
                       org.apache.jetspeed.util.FileSystemHelper warStruct,
                       ClassLoader paClassLoader,
                       int paType,
                       long checksum)
                throws org.apache.jetspeed.components.portletregistry.RegistryException
Throws:
org.apache.jetspeed.components.portletregistry.RegistryException

stopPA

protected void stopPA(String contextName,
                      int paType)
               throws org.apache.jetspeed.components.portletregistry.RegistryException
Throws:
org.apache.jetspeed.components.portletregistry.RegistryException

updateSearchEngine

protected void updateSearchEngine(boolean remove,
                                  org.apache.jetspeed.om.common.portlet.MutablePortletApplication pa)

unregisterPortletApplication

protected void unregisterPortletApplication(org.apache.jetspeed.om.common.portlet.MutablePortletApplication pa,
                                            boolean purgeEntityInfo)
                                     throws org.apache.jetspeed.components.portletregistry.RegistryException
Throws:
org.apache.jetspeed.components.portletregistry.RegistryException

grantDefaultPermissions

protected void grantDefaultPermissions(String paName)

revokeDefaultPermissions

protected void revokeDefaultPermissions(String paName)

getDescriptorChangeMonitorInterval

public int getDescriptorChangeMonitorInterval()

setDescriptorChangeMonitorInterval

public void setDescriptorChangeMonitorInterval(int descriptorChangeMonitorInterval)

setMaxRetriedStarts

public void setMaxRetriedStarts(int maxRetriedStarts)

getMaxRetriedStarts

public int getMaxRetriedStarts()


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