1. Kevin Archie
  2. UploadAssistant

Commits

Rick Herrick  committed 6c69cf2

Changed display message at upload completion. Fixed weirdness with date display.

  • Participants
  • Parent commits 6a8ddae
  • Branches default

Comments (0)

Files changed (6)

File UploadAssistant.iml

View file
       <excludeFolder url="file://$MODULE_DIR$/target/classes" />
       <excludeFolder url="file://$MODULE_DIR$/target/dependency" />
       <excludeFolder url="file://$MODULE_DIR$/target/javadoc-bundle-options" />
+      <excludeFolder url="file://$MODULE_DIR$/target/jnlp" />
       <excludeFolder url="file://$MODULE_DIR$/target/maven-archiver" />
       <excludeFolder url="file://$MODULE_DIR$/target/test-classes" />
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="framework" />
+    <orderEntry type="library" name="Maven: org.nrg:DicomEdit:2.3.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi:3.8" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.8" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.8" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.5.0" level="project" />
+    <orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
+    <orderEntry type="library" name="Maven: org.nrg:framework:1.6" level="project" />
     <orderEntry type="library" name="Maven: org.springframework:spring-web:3.0.5.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
     <orderEntry type="library" name="Maven: org.springframework:spring-beans:3.0.5.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.8.5" level="project" />
     <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.8.5" level="project" />
     <orderEntry type="library" name="Maven: org.restlet:org.restlet:1.1.10" level="project" />
-    <orderEntry type="library" name="Maven: org.nrg:DicomEdit:2.3.0" level="project" />
+    <orderEntry type="library" name="Maven: org.nrg:DicomEdit:2.2.1" level="project" />
     <orderEntry type="library" name="Maven: dcm4che:dcm4che-core:2.0.25" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.6.4" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.6.6" level="project" />
     <orderEntry type="library" name="Maven: org.json:json:20080701" level="project" />
     <orderEntry type="library" name="Maven: org.antlr:antlr-runtime:3.4" level="project" />
     <orderEntry type="library" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" />
     <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
     <orderEntry type="library" name="Maven: com.google.guava:guava:12.0.1" level="project" />
     <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
-    <orderEntry type="module" module-name="DicomUtils" />
+    <orderEntry type="library" name="Maven: org.nrg:DicomUtils:1.2.0" level="project" />
     <orderEntry type="library" name="Maven: com.fasterxml.uuid:java-uuid-generator:3.1.3" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.poi:poi:3.8" level="project" />
-    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.5" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.8" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.8" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.5.0" level="project" />
-    <orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
-    <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
-    <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" />
     <orderEntry type="library" name="Maven: org.nrg:ecat-io:0.1.0" level="project" />
     <orderEntry type="library" name="Maven: org.nrg:ecat-edit:0.1.2" level="project" />
     <orderEntry type="library" name="Maven: org.nrg:dicom-xnat-sop:1.6.0" level="project" />
     <orderEntry type="library" name="Maven: com.jgoodies:common:1.2.0" level="project" />
     <orderEntry type="library" name="Maven: com.jgoodies:looks:2.4.1" level="project" />
     <orderEntry type="library" name="Maven: org.swinglabs:wizard:1.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.5" level="project" />
     <orderEntry type="library" name="Maven: netscape:javascript:1.5.0" level="project" />
-    <orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-log4j12:1.6.4" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-log4j12:1.6.6" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.8.1" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.mortbay.jetty:jetty:6.1.25" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.mortbay.jetty:jetty-util:6.1.25" level="project" />

File pom.xml

View file
                 <artifactId>maven-javadoc-plugin</artifactId>
             </plugin>
             <plugin>
-                <artifactId>maven-jarsigner-plugin</artifactId>
-                <version>1.2</version>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>webstart-maven-plugin</artifactId>
+                <version>1.0-beta-3</version>
                 <executions>
                     <execution>
-                        <id>sign</id>
+                       <phase>package</phase>
                         <goals>
-                            <goal>sign</goal>
+                           <goal>jnlp-inline</goal>
                         </goals>
                     </execution>
                 </executions>
                 <configuration>
+                    <outputJarVersions>true</outputJarVersions>
+                    <jnlp>
+                        <outputFile>UploadAssistantApplet.jnlp</outputFile> <!-- defaults to launch.jnlp -->
+                        <mainClass>org.nrg.upload.ui.UploadAssistantApplet</mainClass>
+                    </jnlp>
+                    <sign>
                     <keystore>${signing.keystore}</keystore>
                     <alias>${signing.alias}</alias>
                     <storepass>${signing.storepass}</storepass>
                     <keypass>${signing.keypass}</keypass>
-                    <archiveDirectory>target/dependency</archiveDirectory>
-                </configuration>
-            </plugin>
+                        <verify>true</verify>
+                        <keystoreConfig>
+                            <delete>false</delete>
+                            <gen>false</gen>
+                        </keystoreConfig>
+                    </sign>
+
+                    <pack200>true</pack200>
+                    <gzip>true</gzip>
+                 </configuration>
+             </plugin>
             <plugin>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <version>2.9</version>
         <dependency>
             <groupId>org.nrg</groupId>
             <artifactId>DicomEdit</artifactId>
-            <version>2.3.0</version>
+            <version>2.2.1</version>
             <exclusions>
                 <exclusion>
                     <artifactId>dcm4che-net</artifactId>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
-            <version>[1.6.1,)</version>
+            <version>1.6.6</version>
         </dependency>
         <dependency>
             <groupId>commons-codec</groupId>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-log4j12</artifactId>
-            <version>[1.6.1,)</version>
+            <version>1.6.6</version>
             <scope>runtime</scope>
         </dependency>
 
 
     </dependencies>
 </project>
+

File src/main/java/org/nrg/upload/ui/AssignSessionVariablesPage.java

View file
     @Override
     protected String validateContents(final Component component, final Object event) {
         if (!DateUtils.isSameDay(confirmedDate, sessionDate)) {
-            return "Click the Previous button and select a session with scan date of " +  FORMATTER.format(confirmedDate);
+            // We have to go through this whole rigamarole to deal with the Java Date class's inadequacies and general crappiness.
+            // The year being set by dcm4che seems to absolute, i.e. setting 2012 when it really means 2012. The nerve. Instead,
+            // according to Java, it should be setting the offset from 1900, i.e. 112, when it means 2012. But we get what we get.
+            // So, check for a year greater than 1900 and, if found, offset by -1900 and hope like crazy that that's the right thing.
+            Calendar calendar = Calendar.getInstance();
+            calendar.setTime(confirmedDate);
+//            int year = calendar.get(Calendar.YEAR);
+//            if (year > 1900) {
+//                calendar.set(Calendar.YEAR, year - 1900);
+//            }
+            return "Click the Previous button and select a session with scan date of " +  FORMATTER.format(calendar.getTime());
         }
 
         // If verifyDate is empty, we won't allow user to proceed, but we won't do any other validation.

File src/main/java/org/nrg/upload/ui/UploadResultPanel.java

View file
         box.add(new JLabel(Messages.getMessage(Messages.UPLOADRESULTPANEL_SUCCESS, Messages.getMessage(isArchived ? Messages.VOCABULARY_ARCHIVE : Messages.VOCABULARY_PREARCHIVE))));
         box.add(Box.createVerticalStrut(SPACING));
         box.add(link);
-        box.add(Box.createVerticalStrut(SPACING));
-        box.add(new JLabel(Messages.getMessage(isArchived ? Messages.UPLOADRESULTPANEL_DEST_ARCHIVE : Messages.UPLOADRESULTPANEL_DEST_PREARCHIVE)));
     }
 
     private JLabel getLinkForResource(String label, URL url) {

File src/main/java/org/nrg/util/Messages.java

View file
     public static final String VOCABULARY_PREARCHIVE = "vocabulary.prearchive";
     public static final String UPLOADRESULTPANEL_SUCCESS = "uploadresultpanel.success";
     public static final String UPLOADRESULTPANEL_DEST_LINK = "uploadresultpanel.dest.link";
-    public static final String UPLOADRESULTPANEL_DEST_ARCHIVE = "uploadresultpanel.dest.archive";
-    public static final String UPLOADRESULTPANEL_DEST_PREARCHIVE = "uploadresultpanel.dest.prearchive";
     public static final String ERROR_TITLE_NOURLSUPPORT = "error.title.nourlsupport";
     public static final String ERROR_MSG_NOURLSUPPORT = "error.msg.nourlsupport";
 

File src/main/resources/org/nrg/upload/Messages.properties

View file
 default.title.input=Enter a value
 vocabulary.archive=archive
 vocabulary.prearchive=prearchive
-uploadresultpanel.success=<html><p>The scan session was successfully uploaded to the system</p><p>%s and assigned the ID:</p></html>
-uploadresultpanel.dest.link=<html><p>&nbsp;&nbsp;&nbsp;<a href="%s">%s</a></p></html>
-uploadresultpanel.dest.archive=<html><p>Click the link above to continue reviewing the scan session.</p></html>
-uploadresultpanel.dest.prearchive=<html><p>Click the link above to continue reviewing the scan session.</p></html>
+uploadresultpanel.success=<html><p>The scan session was successfully uploaded to the system %s.</p></html>
+uploadresultpanel.dest.link=<html><p><a href="%s">Click here to continue reviewing %s.</a></p></html>
 error.title.nourlsupport=No URL Support
 error.msg.nourlsupport=Your system has no support for opening a URL in a web browser from a Java applet. You can copy and paste the URL below directly into a browser to view the uploaded session.