You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by dd...@apache.org on 2006/12/04 04:33:23 UTC
svn commit: r482029 - in /portals/pluto/trunk: ./
pluto-container/src/test/java/org/apache/pluto/core/
pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/
pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/i...
Author: ddewolf
Date: Sun Dec 3 19:33:19 2006
New Revision: 482029
URL: http://svn.apache.org/viewvc?view=rev&rev=482029
Log:
rolling back admin portlets which caused conflicts. craig and i agreed to work on this in the branch we just created; This commit completes the work on auto-publishing and adding portlets to pages
Removed:
portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminDeploymentPortlet.java
portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/AdminDeploymentException.java
portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/DeployWarAdminService.java
portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/ReassembleWarAdminService.java
portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/WarUploadAdminService.java
portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/admin/impl/
portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/tags/PortletUiMessageTag.java
portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/AdminDeploymentPortlet.properties
portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/deploy/
portals/pluto/trunk/pluto-portal/src/main/webapp/portlet-spec-1.0.css
portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/ReassemblerConfig.java
portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/WarReassembler.java
portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/assemble/file/WarFileReassembler.java
portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/HttpDeploymentConfig.java
portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/Undeployer.java
portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/TomcatDeploymentConfig.java
portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/http/
portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/fileupload/
portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/ui/
Modified:
portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/PortletContextManagerTest.java
portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java
portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java
portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/SupportedModesServiceImpl.java
portals/pluto/trunk/pluto-portal-driver/pom.xml
portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/AttributeKeys.java
portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/AdminConfiguration.java
portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminPortlet.java
portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/PageAdminPortlet.java
portals/pluto/trunk/pluto-portal-driver/src/main/resources/pluto-portal-driver-config.xsd
portals/pluto/trunk/pluto-portal/pom.xml
portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/page/view.jsp
portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-config.xml
portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-services-config.xml
portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/portlet.xml
portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/tld/pluto.tld
portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/web.xml
portals/pluto/trunk/pluto-util/pom.xml
portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/Deployer.java
portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/DeploymentConfig.java
portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/FileSystemDeployer.java
portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/FileSystemInstaller.java
portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/jetty/Jetty5FileSystemInstaller.java
portals/pluto/trunk/pom.xml
Modified: portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/PortletContextManagerTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/PortletContextManagerTest.java?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/PortletContextManagerTest.java (original)
+++ portals/pluto/trunk/pluto-container/src/test/java/org/apache/pluto/core/PortletContextManagerTest.java Sun Dec 3 19:33:19 2006
@@ -4,7 +4,7 @@
import javax.servlet.ServletContext;
-//import org.easymock.EasyMock;
+import org.easymock.EasyMock;
import java.net.MalformedURLException;
import java.net.URL;
Modified: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java (original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/config/impl/AdminConfigurationImpl.java Sun Dec 3 19:33:19 2006
@@ -15,11 +15,8 @@
*/
package org.apache.pluto.driver.config.impl;
-import org.apache.pluto.driver.services.portal.admin.DeployWarAdminService;
-import org.apache.pluto.driver.services.portal.admin.ReassembleWarAdminService;
import org.apache.pluto.driver.services.portal.admin.RenderConfigAdminService;
import org.apache.pluto.driver.services.portal.admin.PortletRegistryAdminService;
-import org.apache.pluto.driver.services.portal.admin.WarUploadAdminService;
import org.apache.pluto.driver.config.AdminConfiguration;
import javax.servlet.ServletContext;
@@ -34,10 +31,7 @@
private PortletRegistryAdminService portletRegistryAdminService;
private RenderConfigAdminService renderConfigAdminService;
- private WarUploadAdminService warUploadAdminService;
- private ReassembleWarAdminService reassembleWarAdminService;
- private DeployWarAdminService deployWarAdminService;
-
+
public void init(ServletContext context) {
}
@@ -61,31 +55,6 @@
public void setRenderConfigAdminService(RenderConfigAdminService renderConfigAdminService) {
this.renderConfigAdminService = renderConfigAdminService;
}
-
- public DeployWarAdminService getDeployWarAdminService() {
- return deployWarAdminService;
- }
-
- public ReassembleWarAdminService getReassembleWarAdminService() {
- return reassembleWarAdminService;
- }
-
- public WarUploadAdminService getWarUploadAdminService() {
- return warUploadAdminService;
- }
-
- public void setDeployWarAdminService(DeployWarAdminService deployWarAdminService) {
- this.deployWarAdminService = deployWarAdminService;
- }
-
- public void setReassembleWarAdminService(
- ReassembleWarAdminService reassembleWarAdminService) {
- this.reassembleWarAdminService = reassembleWarAdminService;
- }
-
- public void setWarUploadAdminService(WarUploadAdminService warUploadAdminService) {
- this.warUploadAdminService = warUploadAdminService;
- }
}
Modified: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java (original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java Sun Dec 3 19:33:19 2006
@@ -19,7 +19,6 @@
import org.apache.pluto.driver.services.portal.*;
import org.apache.pluto.driver.services.portal.admin.RenderConfigAdminService;
-import javax.portlet.PortletContext;
import javax.servlet.ServletContext;
import java.util.List;
import java.util.Set;
@@ -49,36 +48,13 @@
public void init(ServletContext ctx) {
try {
InputStream in = ctx.getResourceAsStream(ResourceConfigReader.CONFIG_FILE);
- initializeConfig(in);
- }
- catch(Exception e) {
- throw new DriverConfigurationException(e);
- }
- }
-
- /**
- * Used by the admin portlet
- * @param ctx
- */
- public void init(PortletContext ctx) {
- try {
- InputStream in = ctx.getResourceAsStream(ResourceConfigReader.CONFIG_FILE);
- initializeConfig(in);
- }
- catch(Exception e) {
- throw new DriverConfigurationException(e);
- }
- }
-
- private void initializeConfig(InputStream in) {
- try {
config = ResourceConfigReader.getFactory().parse(in);
}
catch(Exception e) {
throw new DriverConfigurationException(e);
}
-
}
+
/**
* Shutdown the ResourceService.
*/
Modified: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/SupportedModesServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/SupportedModesServiceImpl.java?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/SupportedModesServiceImpl.java (original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/SupportedModesServiceImpl.java Sun Dec 3 19:33:19 2006
@@ -5,6 +5,7 @@
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
+import java.util.List;
import javax.portlet.PortletMode;
import javax.servlet.ServletContext;
@@ -12,24 +13,25 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.pluto.PortletContainer;
+import org.apache.pluto.OptionalContainerServices;
import org.apache.pluto.PortletContainerException;
import org.apache.pluto.descriptors.portlet.PortletAppDD;
import org.apache.pluto.descriptors.portlet.PortletDD;
import org.apache.pluto.descriptors.portlet.SupportsDD;
+import org.apache.pluto.internal.InternalPortletContext;
+import org.apache.pluto.spi.optional.PortletRegistryService;
import org.apache.pluto.driver.AttributeKeys;
import org.apache.pluto.driver.config.DriverConfigurationException;
-import org.apache.pluto.driver.services.portal.PortletApplicationConfig;
-import org.apache.pluto.driver.services.portal.PortletRegistryService;
-import org.apache.pluto.driver.services.portal.PortletWindowConfig;
import org.apache.pluto.driver.services.portal.PropertyConfigService;
import org.apache.pluto.driver.services.portal.SupportedModesService;
+import org.apache.pluto.driver.services.portal.PortletWindowConfig;
/**
* Allows clients to determine if a particular PortletMode is supported
* by the portal, a particular portlet, or both.
*
* This implementation depends on {@link PropertyConfigService},
- * {@link PortletRegistryService}, and {@link PortletContainer}.
+ * {@link org.apache.pluto.spi.optional.PortletRegistryService}, and {@link PortletContainer}.
* The two services are injected by Spring, and the container is obtained
* from the <code>ServletContext</code>.
*
@@ -43,12 +45,6 @@
/** Logger */
private static final Log LOG = LogFactory.getLog(SupportedModesServiceImpl.class);
- /** PortletApplicationConfig objects keyed by their String context path */
- private Map portletApps = new HashMap();
-
- /** Sets containing PortletMode objects keyed by String portlet Id */
- private Map supportedPortletModesByPortlet = new HashMap();
-
/** PortletMode objects supported by the portal */
private Set supportedPortletModesByPortal = new HashSet();
@@ -57,7 +53,7 @@
/** PortletRegistryService used to obtain PortletApplicationConfig objects */
private PortletRegistryService portletRegistry = null;
-
+
/** PropertyConfig Service used to obtain supported portal modes */
private PropertyConfigService propertySvc = null;
@@ -68,42 +64,50 @@
* @param portletRegistry the PortletRegistryService
* @param propertySvc the PropertyConfigService
*/
- public SupportedModesServiceImpl(PortletRegistryService portletRegistry, PropertyConfigService propertySvc)
- {
- this.portletRegistry = portletRegistry;
- this.propertySvc = propertySvc;
+ public SupportedModesServiceImpl(PropertyConfigService propertySvc) {
+ this.propertySvc = propertySvc;
}
// SupportedModesService Implementation -----------------
public boolean isPortletModeSupported(String portletId, String mode)
{
- return isPortletModeSupportedByPortal(mode) && isPortletModeSupportedByPortlet(portletId, mode);
+
+ return isPortletModeSupportedByPortal(mode) &&
+ isPortletModeSupportedByPortlet(portletId, mode);
}
- public boolean isPortletModeSupportedByPortal(String mode)
- {
- LOG.debug("Is mode [" + mode + "] supported by the portal?");
+ public boolean isPortletModeSupportedByPortal(String mode) {
return supportedPortletModesByPortal.contains(new PortletMode(mode));
}
- public boolean isPortletModeSupportedByPortlet(String portletId, String mode)
- {
- LOG.debug("Is mode [" + mode + "] for portlet [" + portletId + "] supported by the portlet?");
+ public boolean isPortletModeSupportedByPortlet(String portletId, String mode) {
+ String applicationId = PortletWindowConfig.parseContextPath(portletId);
+ String portletName = PortletWindowConfig.parsePortletName(portletId);
+
+ try {
+ PortletAppDD ctx = portletRegistry.getPortletApplicationDescriptor(applicationId);
+ Iterator i = ctx.getPortlets().iterator();
+ while(i.hasNext()) {
+ PortletDD dd = (PortletDD)i.next();
+ if(portletName.equals(dd.getPortletName())) {
+ Iterator i2 = dd.getSupports().iterator();
+ while(i2.hasNext()) {
+ SupportsDD sd = (SupportsDD)i2.next();
+ Iterator pd = sd.getPortletModes().iterator();
+ while(pd.hasNext()) {
+ if(mode.equalsIgnoreCase((String)pd.next())) {
+ return true;
+ }
+ }
+ }
+ }
+ }
- // hack? or required, can't remember?
- if(PortletMode.EDIT.toString().equalsIgnoreCase(mode)
- || PortletMode.HELP.toString().equalsIgnoreCase(mode)
- || PortletMode.VIEW.toString().equalsIgnoreCase(mode)) {
- return true;
+ } catch (PortletContainerException e) {
+ LOG.error("Error determining mode support.", e);
}
-
- Set supportedModes = (Set)supportedPortletModesByPortlet.get(portletId);
- if (supportedModes == null)
- {
- return false;
- }
- return supportedModes.contains(new PortletMode(mode));
+ return false;
}
// DriverConfiguration Lifecycle Implementation ---------
@@ -111,149 +115,19 @@
public void destroy() throws DriverConfigurationException
{
LOG.debug("Destroying Supported Modes Service...");
- supportedPortletModesByPortlet = null;
supportedPortletModesByPortal = null;
container = null;
portletRegistry = null;
- portletApps = null;
propertySvc = null;
LOG.debug("Supported Modes Service destroyed.");
}
- public void init(ServletContext ctx) throws DriverConfigurationException
- {
- LOG.debug("Initializing Supported Modes Service...");
- // Obtain the Portlet Container
- this.container = (PortletContainer)ctx.getAttribute(AttributeKeys.PORTLET_CONTAINER);
- initInternal();
- LOG.debug("Supported Modes Service initalized.");
- }
-
- // Private Methods --------------------------------------
-
- /**
- * Initialize the data structures for supportedPortletModesByPortal,
- * supportedPortletModesByPortlet, and portletApps.
- *
- * Note that the order of initalization matters.
- */
- private void initInternal()
- {
- // portlet applications should be loaded first
- loadPortletApplications();
- loadPortalModes();
- loadPortletModes();
- }
-
- /**
- * Populates the portletApps map with PortletApplicationConfig objects
- * keyed by their context path.
- */
- private void loadPortletApplications()
- {
- LOG.debug("Loading Portlet Applications...");
- Iterator apps = portletRegistry.getPortletApplications().iterator();
- while (apps.hasNext())
- {
- PortletApplicationConfig app = (PortletApplicationConfig)apps.next();
- LOG.debug("Loading [" + app.getContextPath() + "]");
- portletApps.put(app.getContextPath(), app);
- }
- LOG.debug("Loaded [" + portletApps.size() + "] Portlet Applications.");
- }
-
- /** Populates the supportedPortletModesByPortal set. */
- private void loadPortalModes()
- {
- // Add the PortletModes supported by the portal to the
- // supportedPortletModesByPortal set.
- LOG.debug("Loading supported portal modes...");
- Iterator modes = propertySvc.getSupportedPortletModes().iterator();
- while (modes.hasNext()) {
- String mode = (String) modes.next();
- LOG.debug("Loading mode [" + mode + "]");
- supportedPortletModesByPortal.add(new PortletMode(mode));
- }
- LOG.debug("Loaded [" + supportedPortletModesByPortal.size() + "] supported portal modes");
- }
-
- /**
- * Populates the supportedPortletModesByPortlet map, which contains
- * Sets of PortletMode objects keyed by String portlet Ids.
- */
- private void loadPortletModes()
- {
- // Add the PortletModes supported by each portlet to
- // the supportedPortletModesByPortlet map.
- LOG.debug("Loading modes supported by each Portlet...");
- Iterator apps = portletApps.values().iterator();
- while (apps.hasNext())
- {
- PortletApplicationConfig app = (PortletApplicationConfig)apps.next();
- PortletAppDD portletAppDD;
- try {
- portletAppDD = container
- .getOptionalContainerServices()
- .getPortletRegistryService()
- .getPortletApplicationDescriptor(app.getContextPath());
- } catch (PortletContainerException e) {
- LOG.warn(e);
- continue;
- }
-
- if(portletAppDD == null) {
- continue;
- }
-
- // for each portletAppDD, retrieve the portletDD and the supported modes
- Iterator portlets = portletAppDD.getPortlets().iterator();
- while (portlets.hasNext()) {
- PortletDD portlet = (PortletDD)portlets.next();
- LOG.debug("Loading modes supported by portlet [" + app.getContextPath() + "]." +
- "[" + portlet.getPortletName() + "]");
- Iterator supports = portlet.getSupports().iterator();
- Set pModes = new HashSet();
- while (supports.hasNext())
- {
- SupportsDD supportsDD = (SupportsDD)supports.next();
- Iterator portletModes = supportsDD.getPortletModes().iterator();
-
- while (portletModes.hasNext())
- {
- PortletMode pMode = new PortletMode((String)portletModes.next());
- LOG.debug("Adding mode [" + pMode + "]");
- pModes.add(pMode);
- }
- }
-
- supportedPortletModesByPortlet.put(
- PortletWindowConfig.createPortletId(app.getContextPath(), portlet.getPortletName()),
- pModes);
- }
- }
+ public void init(ServletContext ctx) throws DriverConfigurationException {
+ container = (PortletContainer)ctx.getAttribute(AttributeKeys.PORTLET_CONTAINER);
+ OptionalContainerServices services = container.getOptionalContainerServices();
+ portletRegistry = services.getPortletRegistryService();
}
-
- /**
- * Retrieve the PortletApplicationConfig by its context path.
- *
- * @param contextPath the context
- * @return the PortletApplicationConfig, or null if it wasn't found.
- */
- private PortletApplicationConfig getPortletApplication(String contextPath)
- {
- PortletApplicationConfig app = null;
- // attempt to retrieve the PortletApplicationConfig from the map
- app = (PortletApplicationConfig)portletApps.get(contextPath);
-
- // if it wasn't in the map, perhaps it has been added since
- // the container was started
- if (app == null)
- {
- loadPortletApplications();
- }
- app = (PortletApplicationConfig)portletApps.get(contextPath);
- return app;
- }
+
}
Modified: portals/pluto/trunk/pluto-portal-driver/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/pom.xml?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/pom.xml (original)
+++ portals/pluto/trunk/pluto-portal-driver/pom.xml Sun Dec 3 19:33:19 2006
@@ -37,12 +37,6 @@
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.apache.pluto</groupId>
- <artifactId>pluto-util</artifactId>
- <version>${pom.version}</version>
- <scope>compile</scope>
- </dependency>
<dependency>
@@ -63,12 +57,6 @@
<version>${commons-digester.version}</version>
<scope>compile</scope>
</dependency>
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
- <scope>runtime</scope>
- </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/AttributeKeys.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/AttributeKeys.java?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/AttributeKeys.java (original)
+++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/AttributeKeys.java Sun Dec 3 19:33:19 2006
@@ -53,9 +53,6 @@
public static final String PORTAL_URL_PARSER = "PORTAL_URL_PARSER";
- /** Attribute to hold a message to be displayed by the portlet */
- public static final String PORTLET_MSG = "portlet_msg";
-
// Constructor -------------------------------------------------------------
/**
Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/AdminConfiguration.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/AdminConfiguration.java?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/AdminConfiguration.java (original)
+++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/config/AdminConfiguration.java Sun Dec 3 19:33:19 2006
@@ -15,11 +15,8 @@
*/
package org.apache.pluto.driver.config;
-import org.apache.pluto.driver.services.portal.admin.DeployWarAdminService;
import org.apache.pluto.driver.services.portal.admin.PortletRegistryAdminService;
-import org.apache.pluto.driver.services.portal.admin.ReassembleWarAdminService;
import org.apache.pluto.driver.services.portal.admin.RenderConfigAdminService;
-import org.apache.pluto.driver.services.portal.admin.WarUploadAdminService;
import javax.servlet.ServletContext;
@@ -63,10 +60,5 @@
*/
RenderConfigAdminService getRenderConfigAdminService();
- public WarUploadAdminService getWarUploadAdminService();
-
- public ReassembleWarAdminService getReassembleWarAdminService();
-
- public DeployWarAdminService getDeployWarAdminService();
}
Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminPortlet.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminPortlet.java?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminPortlet.java (original)
+++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/AdminPortlet.java Sun Dec 3 19:33:19 2006
@@ -29,7 +29,7 @@
private static final String VIEW_PAGE = "/WEB-INF/fragments/admin/view.jsp";
private static final String EDIT_PAGE = "/WEB-INF/fragments/admin/edit.jsp";
private static final String HELP_PAGE = "/WEB-INF/fragments/admin/help.jsp";
-
+
// GenericPortlet Impl -----------------------------------------------------
Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/PageAdminPortlet.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/PageAdminPortlet.java?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/PageAdminPortlet.java (original)
+++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/portlets/PageAdminPortlet.java Sun Dec 3 19:33:19 2006
@@ -15,12 +15,42 @@
*/
package org.apache.pluto.driver.portlets;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.pluto.driver.config.DriverConfiguration;
+import org.apache.pluto.driver.AttributeKeys;
+import org.apache.pluto.driver.services.portal.PageConfig;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import java.util.Map;
+
public class PageAdminPortlet extends GenericPlutoPortlet {
+ private static final Log LOG = LogFactory.getLog(PageAdminPortlet.class);
+
private static final String VIEW_PAGE = "/WEB-INF/fragments/admin/page/view.jsp";
private static final String EDIT_PAGE = "/WEB-INF/fragments/admin/page/edit.jsp";
private static final String HELP_PAGE = "/WEB-INF/fragments/admin/page/help.jsp";
+
+
+ public void processAction(ActionRequest request, ActionResponse response) {
+ String page = request.getParameter("page");
+ String applicationId = request.getParameter("applications");
+ String portletId = request.getParameter("portlets");
+
+ LOG.info("Request: Add [applicationId="+applicationId+":portletId="+portletId+"] to page '"+page+"'");
+
+ DriverConfiguration driverConfig = (DriverConfiguration)getPortletContext()
+ .getAttribute(AttributeKeys.DRIVER_CONFIG);
+
+ PageConfig config = driverConfig.getPageConfig(page);
+ config.addPortlet(applicationId, portletId);
+
+ response.setRenderParameter("portlets", portletId);
+ }
+
public String getViewPage() {
Modified: portals/pluto/trunk/pluto-portal-driver/src/main/resources/pluto-portal-driver-config.xsd
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/src/main/resources/pluto-portal-driver-config.xsd?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/src/main/resources/pluto-portal-driver-config.xsd (original)
+++ portals/pluto/trunk/pluto-portal-driver/src/main/resources/pluto-portal-driver-config.xsd Sun Dec 3 19:33:19 2006
@@ -37,7 +37,8 @@
</xs:complexType>
</xs:element>
- <xs:element name="portlet-app" minOccurs="1"
+ <!-- Deprecated? Not needed any more -->
+ <xs:element name="portlet-app" minOccurs="0"
maxOccurs="unbounded">
<xs:complexType>
Modified: portals/pluto/trunk/pluto-portal/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal/pom.xml?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal/pom.xml (original)
+++ portals/pluto/trunk/pluto-portal/pom.xml Sun Dec 3 19:33:19 2006
@@ -79,14 +79,7 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
-
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <version>${commons-fileupload.version}</version>
- <scope>runtime</scope>
- </dependency>
-
+
</dependencies>
Modified: portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/page/view.jsp
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/page/view.jsp?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/page/view.jsp (original)
+++ portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/admin/page/view.jsp Sun Dec 3 19:33:19 2006
@@ -15,7 +15,10 @@
limitations under the License.
--%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
+<portlet:actionURL var="formActionUrl"/>
+<form name="adminForm" action="<c:out value="${formActionUrl}"/>" method="POST">
<div>
<h2>Portal Pages</h2>
<p>
@@ -31,7 +34,6 @@
<h2>Portlet Applications</h2>
<p>
<!-- TODO: Should be namespaced! -->
- <form name="adminForm" action="#">
<script type="text/javascript">
var portlets = new Array();
@@ -66,7 +68,7 @@
<select name="applications" onChange="doSwitch(this)">
<option value='-'>Select. . .</option>
<c:forEach items="${portletContainer.optionalContainerServices.portletRegistryService.registeredPortletApplications}" var="app">
- <option value="<c:out value="${app.applicationId}"/>"><c:out value="${app.applicationName}"/></option>
+ <option value="<c:out value="${app.applicationId}"/>"><c:out value="${app.applicationName}"/></option>
</c:forEach>
</select>
@@ -74,9 +76,9 @@
</select>
- <button onClick="alert('Sorry, this feature has not yet been implemented'); return false;" name="submitButton" disabled="true">
+ <button name="submitButton" disabled="true">
Add Portlet
</button>
- </form>
</p>
</div>
+</form>
Modified: portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-config.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-config.xml?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-config.xml (original)
+++ portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-config.xml Sun Dec 3 19:33:19 2006
@@ -40,22 +40,20 @@
<!--
-
NOTE: Once all of the services are re-implemented correctly, we will
remove this registry from the config. This is because it is no longer
necessary, as each portlet registers itself as it starts up!
-->
-
+
<portlet-app>
<context-path>/pluto</context-path>
<portlets>
<portlet name="AboutPortlet"/>
<portlet name="AdminPortlet"/>
- <portlet name="AdminDeploymentPortlet"/>
<portlet name="PlutoPageAdmin"/>
</portlets>
</portlet-app>
-
+
<portlet-app>
<context-path>/testsuite</context-path>
<portlets>
@@ -78,7 +76,6 @@
<portlet context="/pluto" name="AboutPortlet"/>
</page>
<page name="Pluto Admin" uri="/WEB-INF/themes/pluto-default-theme.jsp">
- <portlet context="/pluto" name="AdminDeploymentPortlet"/>
<portlet context="/pluto" name="AdminPortlet"/>
<portlet context="/pluto" name="PlutoPageAdmin"/>
</page>
Modified: portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-services-config.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-services-config.xml?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-services-config.xml (original)
+++ portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/pluto-portal-driver-services-config.xml Sun Dec 3 19:33:19 2006
@@ -84,50 +84,11 @@
<!-- The single top element of the administration tree -->
<!-- ================================================ -->
<bean id="AdminConfiguration" class="org.apache.pluto.driver.config.impl.AdminConfigurationImpl">
- <!-- Upload the war -->
- <property name="warUploadAdminService"><ref bean="WarUploadAdminService"/></property>
- <!-- Modify web.xml and reassemble the war in its proper deployment location -->
- <property name="reassembleWarAdminService"><ref bean="ReassemblerWarAdminService"/></property>
- <!-- Create the deployment descriptor and deploy it -->
- <property name="deployWarAdminService"><ref bean="DeployWarAdminService"/></property>
- <!-- Register the war in pluto-portal-driver-config file by adding a portlet-app element -->
- <!-- property name="portletRegistryAdminService"><ref bean="PortletRegistryConfig"/></property -->
- <!-- Add the war in pluto-portal-driver-config file to render-config section -->
- <!-- property name="renderConfigAdminService"><ref bean="RenderConfigService"/></property -->
+ <property name="portletRegistryAdminService"><ref bean="PortletRegistryConfig"/></property>
+ <property name="renderConfigAdminService"><ref bean="RenderConfigService"/></property>
</bean>
- <bean id="WarUploadAdminService" class="org.apache.pluto.driver.services.portal.admin.impl.WarUploadAdminServiceImpl">
- <property name="fileUploader"><ref bean="FileUploader"/></property>
- <property name="maxUploadSize"><value>10</value></property>
- <property name="uploadDir"><value>${user.home}/.pluto</value></property>
- </bean>
-
- <bean id="ReassemblerWarAdminService" class="org.apache.pluto.driver.services.portal.admin.impl.ReassembleWarAdminServiceImpl">
- <property name="reassembler"><ref bean="WarReassembler"/></property>
- <property name="unzipBaseDir"><value>${user.home}/.pluto</value></property>
- <property name="destination"><value>${catalina.home}/PlutoDomain</value></property>
- </bean>
- <bean id="DeployWarAdminService" class="org.apache.pluto.driver.services.portal.admin.impl.Tomcat5DeployWarAdminServiceImpl">
- <property name="deployer"><ref bean="FileSystemDeployer"/></property>
- <property name="undeployer"><ref bean="HttpTomcatDeployer"/></property>
- <property name="tomcatService"><value>Catalina</value></property>
- <property name="host"><value>localhost</value></property>
- <property name="port"><value>8080</value></property>
- <property name="protocol"><value>http</value></property>
- </bean>
-
- <bean id="FileUploader" class="org.apache.pluto.util.fileupload.http.PortletFileUploader">
- </bean>
-
- <bean id="WarReassembler" class="org.apache.pluto.util.assemble.file.WarFileReassembler">
- </bean>
-
- <bean id="FileSystemDeployer" class="org.apache.pluto.util.deploy.file.Tomcat5FileSystemDeployer">
- </bean>
-
- <bean id="HttpTomcatDeployer" class="org.apache.pluto.util.deploy.http.HttpTomcatDeployer">
- </bean>
<!-- ================================================ -->
<!-- Portal Services injected into the Configuration -->
<!-- ================================================ -->
@@ -155,8 +116,7 @@
<bean id="SupportedModesService"
class="org.apache.pluto.driver.services.impl.resource.SupportedModesServiceImpl"
singleton="true">
- <constructor-arg><ref bean="PortletRegistryConfig"/></constructor-arg>
- <constructor-arg><ref bean="PropertyConfigService"/></constructor-arg>
+ <constructor-arg><ref bean="PropertyConfigService"/></constructor-arg>
</bean>
<!-- ================================================ -->
Modified: portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/portlet.xml?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/portlet.xml (original)
+++ portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/portlet.xml Sun Dec 3 19:33:19 2006
@@ -21,7 +21,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
-
+
<portlet>
<description>AboutPortletDescription</description>
<portlet-name>AboutPortlet</portlet-name>
@@ -54,24 +54,6 @@
</portlet-info>
</portlet>
- <portlet>
- <description>Admin portlet to deploy admin war files</description>
- <portlet-name>AdminDeploymentPortlet</portlet-name>
- <display-name>Admin Deploy Portlet</display-name>
- <portlet-class>org.apache.pluto.driver.portlets.AdminDeploymentPortlet</portlet-class>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>VIEW</portlet-mode>
- <portlet-mode>EDIT</portlet-mode>
- <portlet-mode>HELP</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <resource-bundle>AdminDeploymentPortlet</resource-bundle>
- <portlet-info>
- <title>Admin Deploy Portlet</title>
- </portlet-info>
- </portlet>
-
<portlet>
<description>Used to administer pluto pages</description>
<portlet-name>PlutoPageAdmin</portlet-name>
@@ -87,7 +69,6 @@
<title>Pluto Page Administrator</title>
</portlet-info>
</portlet>
->>>>>>> .r481784
</portlet-app>
Modified: portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/tld/pluto.tld
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/tld/pluto.tld?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/tld/pluto.tld (original)
+++ portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/tld/pluto.tld Sun Dec 3 19:33:19 2006
@@ -4,7 +4,7 @@
"-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<!--
-Copyright 2004-2006 The Apache Software Foundation.
+Copyright 2004 The Apache Software Foundation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@@ -88,40 +88,6 @@
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
-
- <tag>
- <name>message</name>
- <tagclass>org.apache.pluto.driver.tags.PortletUiMessageTag</tagclass>
- <bodycontent>empty</bodycontent>
- <info>
- Displays a message or one in a resource bundle (properties file) or a message
- encapsulated into the PortletUiMessage class and held in a portlet session attribute
- called 'portlet_msg' (org.apache.pluto.driver.AttributeKeys.PORTLET_MSG).
- Attributes include:
- 1. message: the message.
- 2. cssClass: the Cascading Stylesheet class name
- 3. bundle: the resource bundle as defined in the java.util.ResourceBundle class
- The message and cssClass attributes should not be used if the message is in
- the portlet_msg portlet session attribute.
- </info>
- <attribute>
- <!-- Message can be a ResourceBundle key, but specify the bundle attribute value too -->
- <name>message</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- </attribute>
- <attribute>
- <name>cssClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <!-- ResourceBundle name -->
- <name>bundle</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- </tag>
</taglib>
Modified: portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/web.xml?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/web.xml (original)
+++ portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/web.xml Sun Dec 3 19:33:19 2006
@@ -86,16 +86,6 @@
</servlet>
<servlet>
- <servlet-name>AdminDeploymentPortlet</servlet-name>
- <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
- <init-param>
- <param-name>portlet-name</param-name>
- <param-value>AdminDeploymentPortlet</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet>
<servlet-name>PlutoPageAdmin</servlet-name>
<servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
<init-param>
@@ -136,15 +126,9 @@
</servlet-mapping>
<servlet-mapping>
- <servlet-name>AdminDeploymentPortlet</servlet-name>
- <url-pattern>/PlutoInvoker/AdminDeploymentPortlet</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
<servlet-name>PlutoPageAdmin</servlet-name>
<url-pattern>/PlutoInvoker/PlutoPageAdmin</url-pattern>
</servlet-mapping>
-
<taglib>
<taglib-uri>http://java.sun.com/portlet</taglib-uri>
<taglib-location>/WEB-INF/tld/portlet.tld</taglib-location>
Modified: portals/pluto/trunk/pluto-util/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-util/pom.xml?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-util/pom.xml (original)
+++ portals/pluto/trunk/pluto-util/pom.xml Sun Dec 3 19:33:19 2006
@@ -46,6 +46,12 @@
</dependency>
<dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>${plexus.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>${commons-cli.version}</version>
@@ -70,30 +76,6 @@
<artifactId>commons-logging</artifactId>
<version>${commons-logging.version}</version>
</dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>${commons-io.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <version>${commons-fileupload.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>javax.portlet</groupId>
- <artifactId>portlet-api</artifactId>
- <version>${portlet-api.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>${servlet-api.version}</version>
- <scope>compile</scope>
- </dependency>
-
</dependencies>
Modified: portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/Deployer.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/Deployer.java?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/Deployer.java (original)
+++ portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/Deployer.java Sun Dec 3 19:33:19 2006
@@ -15,7 +15,6 @@
*/
package org.apache.pluto.util.deploy;
-import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -36,9 +35,8 @@
* @throws IOException if an IO error occurs.
* @throws DeploymentException if a deployment error occurs.
*/
-// public void deploy(DeploymentConfig config, InputStream webappInputStream)
- public void deploy(DeploymentConfig config, File webappFile)
- throws IOException, DeploymentException;
+ public void deploy(DeploymentConfig config, InputStream webappInputStream)
+ throws IOException, DeploymentException;
}
Modified: portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/DeploymentConfig.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/DeploymentConfig.java?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/DeploymentConfig.java (original)
+++ portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/DeploymentConfig.java Sun Dec 3 19:33:19 2006
@@ -27,11 +27,7 @@
/** The deployment name. */
private String deploymentName = null;
- /**
- * Is the war already configured?
- */
- private boolean isConfigured = false;
-
+
/**
* Default Constructor.
* @param deploymentName the name of the deployment.
@@ -62,17 +58,5 @@
* @return
*/
public abstract String getDeploymentProperty(String key);
-
- /**
- * Is the war already configured?
- * @return
- */
- public boolean isConfigured() {
- return isConfigured;
- }
-
- public void setConfigured(boolean isConfigured) {
- this.isConfigured = isConfigured;
- }
}
Modified: portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/FileSystemDeployer.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/FileSystemDeployer.java?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/FileSystemDeployer.java (original)
+++ portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/deploy/file/FileSystemDeployer.java Sun Dec 3 19:33:19 2006
@@ -20,7 +20,6 @@
import org.apache.pluto.util.deploy.DeploymentException;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -44,36 +43,21 @@
// Deployer Impl -----------------------------------------------------------
- public void deploy(DeploymentConfig config, File webappFile)
+ public void deploy(DeploymentConfig config, InputStream webappInputStream)
throws IOException, DeploymentException {
File dir = getWebApplicationDirectory(config);
File file = new File(dir, config.getDeploymentName() + ".war");
- FileOutputStream out = null;
- FileInputStream webappInputStream = null;
- try {
- out = new FileOutputStream(file);
- webappInputStream = new FileInputStream(webappFile);
-
- int read = -1;
- byte[] bits = new byte[256];
- while ((read = webappInputStream.read(bits)) != -1) {
- out.write(bits, 0, read);
- }
- } finally {
- if (out != null) {
- out.flush();
- out.close();
- }
-
- if (webappInputStream != null) {
- webappInputStream.close();
- }
- }
-
- if (!config.isConfigured()) {
- configure(config);
+ FileOutputStream out = new FileOutputStream(file);
+
+ int read = -1;
+ byte[] bits = new byte[256];
+ while ((read = webappInputStream.read(bits)) != -1) {
+ out.write(bits, 0, read);
}
+ out.flush();
+ out.close();
+ configure(config);
}
Modified: portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/FileSystemInstaller.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/FileSystemInstaller.java?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/FileSystemInstaller.java (original)
+++ portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/FileSystemInstaller.java Sun Dec 3 19:33:19 2006
@@ -18,7 +18,7 @@
import org.apache.pluto.util.install.InstallationConfig;
import org.apache.pluto.util.install.PortalInstaller;
import org.apache.pluto.util.UtilityException;
-import org.apache.commons.io.FileUtils;
+import org.codehaus.plexus.util.FileUtils;
import java.io.File;
import java.io.IOException;
Modified: portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/jetty/Jetty5FileSystemInstaller.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/jetty/Jetty5FileSystemInstaller.java?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/jetty/Jetty5FileSystemInstaller.java (original)
+++ portals/pluto/trunk/pluto-util/src/main/java/org/apache/pluto/util/install/file/jetty/Jetty5FileSystemInstaller.java Sun Dec 3 19:33:19 2006
@@ -15,11 +15,10 @@
*/
package org.apache.pluto.util.install.file.jetty;
-import org.apache.commons.io.FileUtils;
-
import org.apache.pluto.util.install.InstallationConfig;
import org.apache.pluto.util.install.file.FileSystemInstaller;
import org.apache.pluto.util.UtilityException;
+import org.codehaus.plexus.util.FileUtils;
import java.io.File;
import java.io.IOException;
Modified: portals/pluto/trunk/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pom.xml?view=diff&rev=482029&r1=482028&r2=482029
==============================================================================
--- portals/pluto/trunk/pom.xml (original)
+++ portals/pluto/trunk/pom.xml Sun Dec 3 19:33:19 2006
@@ -236,9 +236,7 @@
<commons-digester.version>1.7</commons-digester.version>
<commons-collections.version>3.2</commons-collections.version>
<commons-cli.version>1.0</commons-cli.version>
- <commons-fileupload.version>1.1</commons-fileupload.version>
<commons-httpclient.version>3.0</commons-httpclient.version>
- <commons-io.version>1.1</commons-io.version>
<commons-beanutils.version>1.7.0</commons-beanutils.version>
<commons-logging.version>1.0.4</commons-logging.version>
<log4j.version>1.2.9</log4j.version>