weaver 2004/10/29 07:19:38
Modified: portal/src/java/org/apache/jetspeed/tools/pamanager
ApplicationServerPAM.java
PortletApplicationManager.java FileSystemPAM.java
portal/src/java/org/apache/jetspeed/mbeans/registry
RegistryMBeanImpl.java
portal/src/java/org/apache/jetspeed/services/information
StaticInformationProviderImpl.java
Log:
rename of PortletRegsitryComponent to PortletRegistry.
Revision Changes Path
1.10 +3 -3
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/ApplicationServerPAM.java
Index: ApplicationServerPAM.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/ApplicationServerPAM.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ApplicationServerPAM.java 13 Oct 2004 15:53:21 -0000 1.9
+++ ApplicationServerPAM.java 29 Oct 2004 14:19:37 -0000 1.10
@@ -19,7 +19,7 @@
import org.apache.commons.logging.LogFactory;
import org.apache.jetspeed.cache.PortletCache;
import org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent;
-import org.apache.jetspeed.components.portletregistry.PortletRegistryComponent;
+import org.apache.jetspeed.components.portletregistry.PortletRegistry;
import org.apache.jetspeed.container.window.PortletWindowAccessor;
import
org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager;
import org.apache.jetspeed.util.ArgUtil;
@@ -54,7 +54,7 @@
* @param entityAccess
* @param appServerManager
*/
- public ApplicationServerPAM( String webAppsDir, PortletRegistryComponent
registry, PortletEntityAccessComponent entityAccess, PortletWindowAccessor
windowAccess, ApplicationServerManager appServerManager, PortletCache portletCache )
+ public ApplicationServerPAM( String webAppsDir, PortletRegistry registry,
PortletEntityAccessComponent entityAccess, PortletWindowAccessor windowAccess,
ApplicationServerManager appServerManager, PortletCache portletCache )
{
super(webAppsDir, registry, entityAccess, windowAccess, portletCache,
appServerManager);
ArgUtil.assertNotNull(ApplicationServerManager.class, appServerManager,
this);
1.18 +5 -5
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
Index: PortletApplicationManager.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- PortletApplicationManager.java 13 Oct 2004 15:53:21 -0000 1.17
+++ PortletApplicationManager.java 29 Oct 2004 14:19:37 -0000 1.18
@@ -29,7 +29,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.jetspeed.Jetspeed;
-import org.apache.jetspeed.components.portletregistry.PortletRegistryComponent;
+import org.apache.jetspeed.components.portletregistry.PortletRegistry;
import org.apache.jetspeed.deployment.impl.FileNotDeployableException;
import org.apache.jetspeed.deployment.impl.StandardDeploymentObject;
import org.apache.jetspeed.engine.Engine;
@@ -231,8 +231,8 @@
System.out.println("Ready to run PAM implementation: " + className);
System.out.print("Supporting interfaces: Deployment");
// Class clas = Class.forName(className);
- PortletRegistryComponent portletRegistry = (PortletRegistryComponent)
engine.getComponentManager()
- .getComponent(PortletRegistryComponent.class);
+ PortletRegistry portletRegistry = (PortletRegistry)
engine.getComponentManager()
+ .getComponent(PortletRegistry.class);
deployer = (Deployment)
engine.getComponentManager().getComponent("PAM");
if (deployer instanceof Registration)
{
1.45 +24 -26
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/FileSystemPAM.java
Index: FileSystemPAM.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/FileSystemPAM.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- FileSystemPAM.java 6 Oct 2004 21:19:40 -0000 1.44
+++ FileSystemPAM.java 29 Oct 2004 14:19:38 -0000 1.45
@@ -29,9 +29,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.jetspeed.cache.PortletCache;
-import org.apache.jetspeed.components.persistence.store.PersistenceStore;
import org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent;
-import org.apache.jetspeed.components.portletregistry.PortletRegistryComponent;
+import org.apache.jetspeed.components.portletregistry.PortletRegistry;
import org.apache.jetspeed.container.JetspeedPortletContext;
import org.apache.jetspeed.container.window.PortletWindowAccessor;
import org.apache.jetspeed.exception.RegistryException;
@@ -77,7 +76,7 @@
private static final Log log = LogFactory.getLog("deployment");
//private DeployUtilities util;
- protected PortletRegistryComponent registry;
+ protected PortletRegistry registry;
protected String webAppsDir;
protected PortletEntityAccessComponent entityAccess;
protected PortletWindowAccessor windowAccess;
@@ -87,14 +86,14 @@
protected ApplicationServerManager appServerManager;
public FileSystemPAM( String webAppsDir,
- PortletRegistryComponent registry,
+ PortletRegistry registry,
PortletEntityAccessComponent entityAccess,
PortletWindowAccessor windowAccess,
PortletCache portletCache,
ApplicationServerManager appServerManager)
{
super();
- ArgUtil.assertNotNull(PortletRegistryComponent.class, registry, this);
+ ArgUtil.assertNotNull(PortletRegistry.class, registry, this);
ArgUtil.assertNotNull(PortletEntityAccessComponent.class, entityAccess,
this);
ArgUtil.assertNotNull(ApplicationServerManager.class, appServerManager,
this);
this.registry = registry;
@@ -152,11 +151,11 @@
*/
protected void doUnregister( String paName, boolean purgeEntityInfo ) throws
PortletApplicationException
{
- PersistenceStore store = registry.getPersistenceStore();
+
try
{
- store.getTransaction().begin();
+
MutablePortletApplication app = (MutablePortletApplication)
registry.getPortletApplication(paName);
if (app == null)
@@ -196,7 +195,7 @@
}
registry.removeApplication(app);
- store.getTransaction().commit();
+
}
catch (Exception re)
{
@@ -354,7 +353,7 @@
RegistryException
{
MutablePortletApplication app;
- PersistenceStore store = registry.getPersistenceStore();
+
String paName = paWar.getPortletApplicationName();
try
@@ -387,10 +386,10 @@
// save it to the registry
log.info("Saving the portlet.xml in the registry...");
- store.getTransaction().begin();
+
registry.registerPortletApplication(app);
log.info("Committing registry changes...");
- store.getTransaction().commit();
+
if(searchEngine != null)
{
@@ -403,7 +402,7 @@
String msg = "Unable to register portlet application, " + paName + ",
through the portlet registry: "
+ e.toString();
log.error(msg, e);
- store.getTransaction().rollback();
+
throw new RegistryException(msg, e);
}
@@ -465,21 +464,21 @@
*/
protected void rollbackRegistry( MutablePortletApplication app )
{
- PersistenceStore store = registry.getPersistenceStore();
+
try
{
// remove entries from the registry
// registry.processPortletApplicationTree(app, "remove");
- store.getTransaction().begin();
+
log.info("Saving the portlet.xml in the registry...");
registry.removeApplication(app);
- store.getTransaction().commit();
+
}
catch (Exception e1)
{
- store.getTransaction().rollback();
+
log.error("Error processing rollback. Attempting to rollback registry
transaction.", e1);
}
@@ -611,7 +610,7 @@
}
MutablePortletApplication app;
- PersistenceStore store = registry.getPersistenceStore();
+
String paName = paWar.getPortletApplicationName();
try
@@ -637,16 +636,16 @@
// save it to the registry
log.info("Saving the portlet.xml in the registry..."
+ portletApplicationName);
- store.getTransaction().begin();
+
registry.registerPortletApplication(app);
log.info("Committing registry changes..." + portletApplicationName);
- store.getTransaction().commit();
+
} catch (Exception e)
{
String msg = "Unable to register portlet application, " + paName
+ ", through the portlet registry: " + e.toString();
log.error(msg, e);
- store.getTransaction().rollback();
+
throw new RegistryException(msg, e);
}
return true;
@@ -657,8 +656,7 @@
RegistryException
{
MutablePortletApplication app;
- PersistenceStore store = registry.getPersistenceStore();
-
+
try
{
app = createPortletApp(portletApplicationName, context);
@@ -681,17 +679,17 @@
// save it to the registry
log.info("Saving the portlet.xml in the registry..."
+ portletApplicationName);
- store.getTransaction().begin();
+
registry.registerPortletApplication(app);
log.info("Committing registry changes..." + portletApplicationName);
- store.getTransaction().commit();
+
}
catch (Exception e)
{
String msg = "Unable to register portlet application, " +
portletApplicationName
+ ", through the portlet registry: " + e.toString();
log.error(msg, e);
- store.getTransaction().rollback();
+
throw new RegistryException(msg, e);
}
1.7 +4 -4
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/mbeans/registry/RegistryMBeanImpl.java
Index: RegistryMBeanImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/mbeans/registry/RegistryMBeanImpl.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- RegistryMBeanImpl.java 9 Mar 2004 19:35:46 -0000 1.6
+++ RegistryMBeanImpl.java 29 Oct 2004 14:19:38 -0000 1.7
@@ -20,7 +20,7 @@
import java.util.List;
import org.apache.jetspeed.Jetspeed;
-import org.apache.jetspeed.components.portletregistry.PortletRegistryComponent;
+import org.apache.jetspeed.components.portletregistry.PortletRegistry;
import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite;
/**
@@ -58,8 +58,8 @@
*/
public List getPortlets()
{
- PortletRegistryComponent regsitry =
- (PortletRegistryComponent)
Jetspeed.getComponentManager().getComponent(PortletRegistryComponent.class);
+ PortletRegistry regsitry =
+ (PortletRegistry)
Jetspeed.getComponentManager().getComponent(PortletRegistry.class);
List portlets = regsitry.getAllPortletDefinitions();
ArrayList list = new ArrayList(portlets.size());
Iterator itr = portlets.iterator();
1.9 +4 -4
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/services/information/StaticInformationProviderImpl.java
Index: StaticInformationProviderImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/services/information/StaticInformationProviderImpl.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- StaticInformationProviderImpl.java 9 Mar 2004 19:35:46 -0000 1.8
+++ StaticInformationProviderImpl.java 29 Oct 2004 14:19:38 -0000 1.9
@@ -19,7 +19,7 @@
import javax.servlet.ServletContext;
import org.apache.jetspeed.Jetspeed;
-import org.apache.jetspeed.components.portletregistry.PortletRegistryComponent;
+import org.apache.jetspeed.components.portletregistry.PortletRegistry;
import org.apache.jetspeed.engine.core.PortalContextProviderImpl;
import org.apache.pluto.om.common.ObjectID;
import org.apache.pluto.om.portlet.PortletDefinition;
@@ -52,8 +52,8 @@
*/
public PortletDefinition getPortletDefinition(String uniqueId)
{
- PortletRegistryComponent regsitry =
- (PortletRegistryComponent)
Jetspeed.getComponentManager().getComponent(PortletRegistryComponent.class);
+ PortletRegistry regsitry =
+ (PortletRegistry)
Jetspeed.getComponentManager().getComponent(PortletRegistry.class);
return regsitry.getPortletDefinitionByIdentifier(uniqueId);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]