r106 - in trunk/simexplorer-is-web: . .settings src/main/java/fr/cemagref/simexplorer/is/ui/web src/main/java/fr/cemagref/simexplorer/is/ui/web/pages src/main/java/fr/cemagref/simexplorer/is/ui/web/services src/main/java/fr/cemagref/simexplorer/is/ui/web/tools src/main/webapp/WEB-INF/lib
Author: glandais Date: 2008-01-09 14:14:17 +0000 (Wed, 09 Jan 2008) New Revision: 106 Added: trunk/simexplorer-is-web/.settings/libcopy.prefs trunk/simexplorer-is-web/.settings/org.eclipse.wst.validation.prefs trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/tools/ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/tools/AttachmentStreamResponse.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/tools/XMLAttachment.java trunk/simexplorer-is-web/src/main/webapp/WEB-INF/lib/tapestry5-treegrid-0.0.1-SNAPSHOT.jar Removed: trunk/simexplorer-is-web/.classpath.tmp trunk/simexplorer-is-web/.svn.ok/ Modified: trunk/simexplorer-is-web/.classpath trunk/simexplorer-is-web/.project trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.component trunk/simexplorer-is-web/pom.xml trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/services/StorageServiceFactory.java Log: Re import (changed web path) Modified: trunk/simexplorer-is-web/.classpath =================================================================== --- trunk/simexplorer-is-web/.classpath 2008-01-09 14:13:13 UTC (rev 105) +++ trunk/simexplorer-is-web/.classpath 2008-01-09 14:14:17 UTC (rev 106) @@ -1,17 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src/main/java"/> + <classpathentry kind="src" path="src/main/resources"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5"/> <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> - <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"> - <attributes> - <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> - </attributes> - </classpathentry> + <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> <classpathentry combineaccessrules="false" kind="src" path="/simexplorer-is-entities"/> <classpathentry combineaccessrules="false" kind="src" path="/simexplorer-is-service"/> <classpathentry combineaccessrules="false" kind="src" path="/tapestry5-treegrid"/> - <classpathentry kind="output" path="build/classes"/> + <classpathentry kind="output" path="target/classes"/> </classpath> Deleted: trunk/simexplorer-is-web/.classpath.tmp =================================================================== --- trunk/simexplorer-is-web/.classpath.tmp 2008-01-09 14:13:13 UTC (rev 105) +++ trunk/simexplorer-is-web/.classpath.tmp 2008-01-09 14:14:17 UTC (rev 106) @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src/main/java"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5"/> - <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> - <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> - <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"> - <attributes> - <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> - </attributes> - </classpathentry> - <classpathentry combineaccessrules="false" kind="src" path="/simexplorer-is-entities"/> - <classpathentry combineaccessrules="false" kind="src" path="/simexplorer-is-service"/> - <classpathentry combineaccessrules="false" kind="src" path="/tapestry5-treegrid"/> - <classpathentry kind="output" path="build/classes"/> -</classpath> Modified: trunk/simexplorer-is-web/.project =================================================================== --- trunk/simexplorer-is-web/.project 2008-01-09 14:13:13 UTC (rev 105) +++ trunk/simexplorer-is-web/.project 2008-01-09 14:14:17 UTC (rev 106) @@ -28,6 +28,11 @@ <arguments> </arguments> </buildCommand> + <buildCommand> + <name>libcopy.libcopyBuilder</name> + <arguments> + </arguments> + </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> @@ -35,5 +40,113 @@ <nature>org.eclipse.wst.common.project.facet.core.nature</nature> <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> + <nature>libcopy.libcopyNature</nature> </natures> + <linkedResources> + <link> + <name>src/main/webapp/WEB-INF/lib/jboss-ejb3x-4.2.2.GA.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/jboss/jboss-ejb3x/4.2.2.GA/jboss-ejb3x-4.2.2.GA.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/tapestry-core-5.0.7.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/org/apache/tapestry/tapestry-core/5.0.7/tapestry-core-5.0.7.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/commons-logging-1.1.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/commons-logging/commons-logging/1.1/commons-logging-1.1.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/logkit-1.0.1.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/logkit/logkit/1.0.1/logkit-1.0.1.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/tapestry-upload-5.0.7.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/org/apache/tapestry/tapestry-upload/5.0.7/tapestry-upload-5.0.7.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/servlet-api-2.3.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/commons-fileupload-1.2.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/tapestry-ioc-5.0.7.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/org/apache/tapestry/tapestry-ioc/5.0.7/tapestry-ioc-5.0.7.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/commons-io-1.3.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/commons-io/commons-io/1.3/commons-io-1.3.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/junit-3.8.1.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/log4j-1.2.14.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/jbossall-client-4.2.2.GA.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/jboss/jbossall-client/4.2.2.GA/jbossall-client-4.2.2.GA.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/javassist-3.6.ga.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/jboss/javassist/3.6.ga/javassist-3.6.ga.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/lucene-core-2.2.0.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/org/apache/lucene/lucene-core/2.2.0/lucene-core-2.2.0.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/slf4j-api-1.4.3.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/org/slf4j/slf4j-api/1.4.3/slf4j-api-1.4.3.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/avalon-framework-4.1.3.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/tapestry-annotations-5.0.7.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/org/apache/tapestry/tapestry-annotations/5.0.7/tapestry-annotations-5.0.7.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/rmiio-2.0.0.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/com/healthmarketscience/rmiio/rmiio/2.0.0/rmiio-2.0.0.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/commons-codec-1.3.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/slf4j-log4j12-1.4.3.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/org/slf4j/slf4j-log4j12/1.4.3/slf4j-log4j12-1.4.3.jar</location> + </link> + <link> + <name>src/main/webapp/WEB-INF/lib/testng-5.1-jdk15.jar</name> + <type>1</type> + <location>/home/glandais/.m2/repository/org/testng/testng/5.1/testng-5.1-jdk15.jar</location> + </link> + </linkedResources> </projectDescription> Added: trunk/simexplorer-is-web/.settings/libcopy.prefs =================================================================== --- trunk/simexplorer-is-web/.settings/libcopy.prefs (rev 0) +++ trunk/simexplorer-is-web/.settings/libcopy.prefs 2008-01-09 14:14:17 UTC (rev 106) @@ -0,0 +1 @@ +#Wed Jan 09 11:27:29 CET 2008 Modified: trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.component =================================================================== --- trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.component 2008-01-09 14:13:13 UTC (rev 105) +++ trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.component 2008-01-09 14:14:17 UTC (rev 106) @@ -3,6 +3,7 @@ <wb-module deploy-name="simexplorer-is-web"> <wb-resource deploy-path="/" source-path="/src/main/webapp"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> + <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/tapestry5-treegrid/tapestry5-treegrid"> <dependency-type>uses</dependency-type> </dependent-module> Added: trunk/simexplorer-is-web/.settings/org.eclipse.wst.validation.prefs =================================================================== --- trunk/simexplorer-is-web/.settings/org.eclipse.wst.validation.prefs (rev 0) +++ trunk/simexplorer-is-web/.settings/org.eclipse.wst.validation.prefs 2008-01-09 14:14:17 UTC (rev 106) @@ -0,0 +1,6 @@ +#Wed Jan 09 10:44:58 CET 2008 +DELEGATES_PREFERENCE=delegateValidatorListorg.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator\=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator\=org.eclipse.wst.wsdl.validation.internal.eclipse.Validator; +USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.jsf.validation.internal.JSPSemanticsValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator;org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator;org.eclipse.jst.j2ee.internal.web.validation.UIWarValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator; +USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.jsf.validation.internal.JSPSemanticsValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator;org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator;org.eclipse.jst.j2ee.internal.web.validation.UIWarValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator; +USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationtrueversion1.1.102.v200709122200 +eclipse.preferences.version=1 Modified: trunk/simexplorer-is-web/pom.xml =================================================================== --- trunk/simexplorer-is-web/pom.xml 2008-01-09 14:13:13 UTC (rev 105) +++ trunk/simexplorer-is-web/pom.xml 2008-01-09 14:14:17 UTC (rev 106) @@ -46,14 +46,14 @@ <version>0.0.1-SNAPSHOT</version> </dependency> <dependency> - <groupId>jboss</groupId> - <artifactId>jbossall-client</artifactId> - <version>3.2.3</version> - </dependency> - <dependency> <groupId>org.apache.tapestry</groupId> <artifactId>tapestry-upload</artifactId> <version>5.0.7</version> </dependency> + <dependency> + <groupId>jboss</groupId> + <artifactId>jbossall-client</artifactId> + <version>4.2.2.GA</version> + </dependency> </dependencies> </project> \ No newline at end of file Modified: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.java 2008-01-09 14:13:13 UTC (rev 105) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.java 2008-01-09 14:14:17 UTC (rev 106) @@ -1,5 +1,6 @@ package fr.cemagref.simexplorer.is.ui.web.pages; +import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.util.ArrayList; import java.util.Arrays; @@ -27,7 +28,9 @@ import fr.cemagref.simexplorer.is.entities.data.Library; import fr.cemagref.simexplorer.is.entities.data.Result; import fr.cemagref.simexplorer.is.entities.data.Structure; +import fr.cemagref.simexplorer.is.entities.metadata.MetaDataEntity; import fr.cemagref.simexplorer.is.ui.web.services.StorageServiceFactory; +import fr.cemagref.simexplorer.is.ui.web.tools.XMLAttachment; public class ApplicationDetail extends AbstractApplicationDetail { @@ -65,8 +68,13 @@ bos); StorageServiceFactory.getService().exportElement( xmlRemoteOutputStream.export(), uuid, version); - response = new TextStreamResponse("text/xml", bos.toString()); + MetaDataEntity mde = StorageServiceFactory.getService().getMetadata( + uuid, version); + ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); + response = new XMLAttachment(bis, mde.getType() + "." + mde.getUuid() + ".v" + + mde.getVersion()); + return response; } Modified: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/services/StorageServiceFactory.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/services/StorageServiceFactory.java 2008-01-09 14:13:13 UTC (rev 105) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/services/StorageServiceFactory.java 2008-01-09 14:14:17 UTC (rev 106) @@ -24,7 +24,7 @@ Context context = new InitialContext(properties); serviceProjets = (StorageService) context - .lookup("ejb3/StorageService"); + .lookup("StorageService"); } return serviceProjets; } Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/tools/AttachmentStreamResponse.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/tools/AttachmentStreamResponse.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/tools/AttachmentStreamResponse.java 2008-01-09 14:14:17 UTC (rev 106) @@ -0,0 +1,49 @@ +package fr.cemagref.simexplorer.is.ui.web.tools; + +import java.io.IOException; +import java.io.InputStream; + +import org.apache.tapestry.StreamResponse; +import org.apache.tapestry.services.Response; + +public class AttachmentStreamResponse implements StreamResponse { + private InputStream is = null; + + protected String contentType = "text/plain"; + + protected String extension = "txt"; + + protected String filename = "default"; + + public AttachmentStreamResponse(InputStream is, String filenameIn) { + this.is = is; + if (filenameIn != null) { + this.filename = filenameIn; + } + } + + public AttachmentStreamResponse(InputStream is) { + this.is = is; + } + + public String getContentType() { + return contentType; + } + + public InputStream getStream() throws IOException { + return is; + } + + public void prepareResponse(Response arg0) { + arg0.setHeader("Content-Disposition", "attachment; filename=" + + filename + ((extension == null) ? "" : ("." + extension))); + arg0.setHeader("Expires", "0"); + arg0.setHeader("Cache-Control", + "must-revalidate, post-check=0, pre-check=0"); + arg0.setHeader("Pragma", "public"); + // We can't set the length here because we only have an Input Stream at + // this point. (Although we'd like to.) + // We can only get size from an output stream. + // arg0.setContentLength(.length); + } +} \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/tools/XMLAttachment.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/tools/XMLAttachment.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/tools/XMLAttachment.java 2008-01-09 14:14:17 UTC (rev 106) @@ -0,0 +1,19 @@ +package fr.cemagref.simexplorer.is.ui.web.tools; + +import java.io.InputStream; + +public class XMLAttachment extends AttachmentStreamResponse { + + public XMLAttachment(InputStream is, String filenameIn) { + super(is, filenameIn); + this.contentType = "text/xml"; + this.extension = "xml"; + } + + public XMLAttachment(InputStream is) { + super(is); + this.contentType = "text/xml"; + this.extension = "xml"; + } + +} Added: trunk/simexplorer-is-web/src/main/webapp/WEB-INF/lib/tapestry5-treegrid-0.0.1-SNAPSHOT.jar =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/src/main/webapp/WEB-INF/lib/tapestry5-treegrid-0.0.1-SNAPSHOT.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream
participants (1)
-
glandais@users.labs.libre-entreprise.org