[jboss-svn-commits] JBL Code SVN: r15003 - labs/jbossrules/trunk/drools-jbrms/src/main/java/org/drools/brms/server/files.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Sep 11 03:13:17 EDT 2007
Author: michael.neale at jboss.com
Date: 2007-09-11 03:13:17 -0400 (Tue, 11 Sep 2007)
New Revision: 15003
Modified:
labs/jbossrules/trunk/drools-jbrms/src/main/java/org/drools/brms/server/files/PackageDeploymentServlet.java
Log:
token change to force a build
Modified: labs/jbossrules/trunk/drools-jbrms/src/main/java/org/drools/brms/server/files/PackageDeploymentServlet.java
===================================================================
--- labs/jbossrules/trunk/drools-jbrms/src/main/java/org/drools/brms/server/files/PackageDeploymentServlet.java 2007-09-11 05:55:38 UTC (rev 15002)
+++ labs/jbossrules/trunk/drools-jbrms/src/main/java/org/drools/brms/server/files/PackageDeploymentServlet.java 2007-09-11 07:13:17 UTC (rev 15003)
@@ -1,13 +1,13 @@
package org.drools.brms.server.files;
/*
* Copyright 2005 JBoss Inc
- *
+ *
* 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.
@@ -30,14 +30,14 @@
/**
* This servlet deals with providing packages in binary form.
- *
+ *
* @author Michael Neale
*/
public class PackageDeploymentServlet extends RepositoryServlet {
private static final long serialVersionUID = 400L;
-
+
@Override
protected void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException,
IOException {
@@ -60,27 +60,27 @@
IOException {
FormData data = FileManagerUtils.getFormData( request );
//System.err.println("Filename: " + data.getFile().getName());
-
+
try {
getFileManager().importClassicDRL( data.getFile().getInputStream() );
response.getWriter().write( "OK" );
- } catch ( DroolsParserException e ) {
- response.getWriter().write( "Unable to process import: " + e.getMessage() );
+ } catch ( DroolsParserException e ) {
+ response.getWriter().write( "Unable to process import: " + e.getMessage() );
} catch ( RulesRepositoryException e) {
response.getWriter().write( "Unable to process import: " + e.getMessage() );
}
-
-
+
+
}
/**
* Get the binary package.
- * This will get the compiled package stuff from either the latest package,
+ * This will get the compiled package stuff from either the latest package,
* or a snapshot.
- *
+ *
* The end of the URI is of the form:
* /<packageName>/(<snapshotVersionName> | LATEST)
- *
+ *
* if you pass in "LATEST" it will get the latest (not a snapshot) if it exists.
* Normally that will only be used when downloading on demand, otherwise you should ONLY
* use a snapshot as they are always "up to date".
@@ -89,23 +89,23 @@
HttpServletResponse response) throws ServletException,
IOException {
PackageDeploymentURIHelper helper = new PackageDeploymentURIHelper(req.getRequestURI());
-
+
System.out.println( "PackageName: " + helper.getPackageName() );
System.out.println( "PackageVersion: " + helper.getVersion() );
System.out.println( "PackageIsLatest: " + helper.isLatest() );
ByteArrayOutputStream out = new ByteArrayOutputStream();
- String fileName = getFileManager().loadBinaryPackage( helper.getPackageName(),
+ String fileName = getFileManager().loadBinaryPackage( helper.getPackageName(),
helper.getVersion(), helper.isLatest(), out );
response.setContentType( "application/x-download" );
response.setHeader( "Content-Disposition",
"attachment; filename=" + fileName + ";");
response.setContentLength( out.size() );
response.getOutputStream().write( out.toByteArray() );
- response.getOutputStream().flush();
-
+ response.getOutputStream().flush();
+
}
-
+
}
\ No newline at end of file
More information about the jboss-svn-commits
mailing list