geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r409080 - /geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/PlanExportServlet.java
Date Wed, 24 May 2006 06:23:20 GMT
Author: djencks
Date: Tue May 23 23:23:20 2006
New Revision: 409080

URL: http://svn.apache.org/viewvc?rev=409080&view=rev
Log:
GERONIMO-2006 add missing portlet ommitted from previous commit

Added:
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/PlanExportServlet.java

Added: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/PlanExportServlet.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/PlanExportServlet.java?rev=409080&view=auto
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/PlanExportServlet.java
(added)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/PlanExportServlet.java
Tue May 23 23:23:20 2006
@@ -0,0 +1,41 @@
+/**
+*
+* Copyright 2006 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
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+*  Unless required by applicable law or agreed to in writing, software
+*  distributed under the License is distributed on an "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*  See the License for the specific language governing permissions and
+*  limitations under the License.
+*/
+package org.apache.geronimo.console.configmanager;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+* Servlet that lets you download a migrated plan
+*
+* @version $Rev$ $Date$
+*/
+public class PlanExportServlet extends HttpServlet {
+   protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
+       String migratedPlan = request.getParameter("migratedPlan");
+       if (migratedPlan == null) {
+           response.sendError(HttpServletResponse.SC_BAD_REQUEST);
+       } else {
+           response.setContentType("application/x-unknown");
+           response.addHeader("Content-Disposition", "attachment; filename=migrated-plan.xml");
+           response.getOutputStream().write(migratedPlan.getBytes());
+       }
+   }
+}



Mime
View raw message