summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-11-09 17:05:57 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-11-09 17:05:57 +0000
commit5bb4d11327fcfe0fdc4234eeb02f4b09d108109e (patch)
treeded41c095b85fb11a171718a170bcaeb202d5a1e
parent83e8c95ea7d257166d350a59bfd81e9833ec14fd (diff)
downloadmocca-5bb4d11327fcfe0fdc4234eeb02f4b09d108109e.tar.gz
mocca-5bb4d11327fcfe0fdc4234eeb02f4b09d108109e.tar.bz2
mocca-5bb4d11327fcfe0fdc4234eeb02f4b09d108109e.zip
applet version
BKUFonts .project git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@536 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
-rw-r--r--BKUApplet/pom.xml19
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java35
-rw-r--r--BKUApplet/src/test/resources/appletTest.html5
-rw-r--r--BKUApplet/src/test/resources/appletviewer.policy3
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SecureViewerDialog.java4
-rw-r--r--BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java1
-rw-r--r--BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java6
-rw-r--r--BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/DummyFontLoader.java6
-rw-r--r--BKUFonts/.classpath8
-rw-r--r--BKUFonts/.project36
-rw-r--r--BKUFonts/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--BKUFonts/.settings/org.eclipse.wst.common.component6
-rw-r--r--BKUFonts/.settings/org.eclipse.wst.common.project.facet.core.xml5
-rw-r--r--BKUFonts/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--bkucommon/pom.xml5
15 files changed, 134 insertions, 21 deletions
diff --git a/BKUApplet/pom.xml b/BKUApplet/pom.xml
index 4172517b..8f72b7d0 100644
--- a/BKUApplet/pom.xml
+++ b/BKUApplet/pom.xml
@@ -45,6 +45,22 @@
</executions>
</plugin>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>maven-buildnumber-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <doCheck>false</doCheck>
+ <doUpdate>false</doUpdate>
+ </configuration>
+ </plugin>
+ <plugin>
<artifactId>maven-jar-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<executions>
@@ -62,6 +78,9 @@
<addClasspath>false</addClasspath>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
+ <manifestEntries>
+ <Implementation-Build>${project.version}-r${buildNumber}</Implementation-Build>
+ </manifestEntries>
</archive>
<alias>test-applet signer</alias>
<keystore>./keystore.ks</keystore>
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
index 7a15f7a5..2094e55c 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
@@ -22,12 +22,14 @@ import at.gv.egiz.bku.gui.DefaultHelpListener;
import at.gv.egiz.bku.gui.AbstractHelpListener;
import at.gv.egiz.bku.gui.SwitchFocusListener;
import at.gv.egiz.stal.service.translator.STALTranslator;
+
+import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Locale;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
import javax.net.ssl.HttpsURLConnection;
import javax.swing.JApplet;
import javax.swing.JPanel;
@@ -79,14 +81,30 @@ public class BKUApplet extends JApplet {
*/
protected static final String TEST_SESSION_ID = "TestSession";
+ public static final String VERSION;
+ public static final String UNKNOWN_VERSION = "UNKNOWN";
+
static {
- if (log.isTraceEnabled()) {
- log.trace("enabling webservice communication dump");
- System.setProperty(
- "com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump",
- "true");
+ String tmp = UNKNOWN_VERSION;
+ try {
+ String BKUAppletJar = BKUApplet.class.getProtectionDomain().getCodeSource().getLocation().toString();
+ URL manifestURL = new URL("jar:" + BKUAppletJar + "!/META-INF/MANIFEST.MF");
+ if (log.isTraceEnabled()) {
+ log.trace("read version information from " + manifestURL);
+ }
+ Manifest manifest = new Manifest(manifestURL.openStream());
+ Attributes atts = manifest.getMainAttributes();
+ if (atts != null) {
+ tmp = atts.getValue("Implementation-Build");
+ }
+ } catch (IOException ex) {
+ log.error("failed to read version", ex);
+ } finally {
+ VERSION = tmp;
+ log.debug("BKU Applet " + VERSION);
}
}
+
/**
* STAL
*/
@@ -119,13 +137,14 @@ public class BKUApplet extends JApplet {
"URL for locating help files, e.g. '../help/' (no help provided if missing)"}};
}
+
/**
* Factory method to create and wire HelpListener, GUI and BKUWorker.
* (Config via applet parameters, see BKUApplet.* constants)
*/
@Override
public void init() {
- log.info("Welcome to MOCCA");
+ log.info("Welcome to MOCCA " + VERSION);
log.trace("Called init()");
showStatus("Initializing MOCCA applet");
diff --git a/BKUApplet/src/test/resources/appletTest.html b/BKUApplet/src/test/resources/appletTest.html
index d1a0f6e2..85834763 100644
--- a/BKUApplet/src/test/resources/appletTest.html
+++ b/BKUApplet/src/test/resources/appletTest.html
@@ -21,6 +21,7 @@
<link rel="shortcut icon" href="img/chip16.ico" type="image/x-icon">
</head>
<body>
+ <p>Run applet test with appletviewer -J-Djava.security.policy=appletviewer.policy appletTest.html</p>
<applet code="at.gv.egiz.bku.online.applet.BKUApplet.class"
archive="../BKUApplet-1.2.8-SNAPSHOT.jar, commons-logging.jar , iaik_jce_me4se.jar"
width=190 height=130 name="moccaapplet" id="moccaapplet">
@@ -29,10 +30,10 @@
<!--param name="Background" value="jar:file:/home/clemens/workspace/mocca/BKUApplet/target/BKUApplet-1.0-SNAPSHOT.jar!/images/help.png"/-->
<!--param name="Background" value="http://localhost:3495/img/BackgroundChipperling.png"/-->
<param name="BackgroundColor" value="#ff0000"/>
- <param name="WSDL_URL" value="https://danu.gv.at:3496/stal?wsdl"/>
+ <param name="WSDL_URL" value="https://localhost:8080/stal?wsdl"/>
<param name="HelpURL" value="http://apps.egiz.gv.at/bkuonline/help/"/>
<param name="SessionId" value="TestSession"/>
- <param name="RedirectURL" value="http://localhost:3495/bkuResult"/>
+ <param name="RedirectURL" value="http://www.google.com/bkuResult"/>
<param name="RedirectTarget" value="_parent"/>
</applet>
</body>
diff --git a/BKUApplet/src/test/resources/appletviewer.policy b/BKUApplet/src/test/resources/appletviewer.policy
new file mode 100644
index 00000000..c26e27b7
--- /dev/null
+++ b/BKUApplet/src/test/resources/appletviewer.policy
@@ -0,0 +1,3 @@
+grant {
+ permission java.security.AllPermission;
+}; \ No newline at end of file
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SecureViewerDialog.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SecureViewerDialog.java
index 1883fce5..c0b14a85 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SecureViewerDialog.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SecureViewerDialog.java
@@ -321,11 +321,11 @@ public class SecureViewerDialog extends JDialog implements ActionListener {
public void actionPerformed(ActionEvent e) {
if ("close".equals(e.getActionCommand())) {
// SecureViewerDialog.dialog.setVisible(false);
- log.trace("closing secure viewer");
+ log.trace(Thread.currentThread() + " closing secure viewer");
setVisible(false);
log.trace("secure viewer closed");
} else if ("save".equals(e.getActionCommand())) {
- log.trace("display secure viewer save dialog");
+ log.trace(Thread.currentThread() + " display secure viewer save dialog");
showSaveDialog(content, null, null);
log.trace("done secure viewer save");
} else {
diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java
index fdd58850..e2e8d104 100644
--- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java
+++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java
@@ -32,7 +32,6 @@ import org.junit.Test;
*
* @author clemens
*/
-@Ignore
public class BKUGUITest {
@Test
diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java
index 5475a45b..20654141 100644
--- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java
+++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java
@@ -108,9 +108,9 @@ public class BKUGUIWorker implements Runnable {
//
List<HashDataInput> signedRefs = new ArrayList();
signedRefs.add(signedRef1);
- signedRefs.add(signedRef2);
- signedRefs.add(signedRef3);
- signedRefs.add(signedRef4);
+// signedRefs.add(signedRef2);
+// signedRefs.add(signedRef3);
+// signedRefs.add(signedRef4);
// signedRefs.add(signedRef4);
// signedRefs.add(signedRef4);
// signedRefs.add(signedRef4);
diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/DummyFontLoader.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/DummyFontLoader.java
index 87d67adc..505c4247 100644
--- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/DummyFontLoader.java
+++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/DummyFontLoader.java
@@ -21,14 +21,20 @@ import at.gv.egiz.bku.gui.viewer.FontProviderException;
import at.gv.egiz.bku.gui.viewer.FontProvider;
import java.awt.Font;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
/**
*
* @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at>
*/
public class DummyFontLoader implements FontProvider {
+ protected final static Log log = LogFactory.getLog(DummyFontLoader.class);
+
@Override
public Font getFont() throws FontProviderException {
+ log.debug("return font");
return new Font("monospaced", Font.PLAIN, 10);
}
diff --git a/BKUFonts/.classpath b/BKUFonts/.classpath
new file mode 100644
index 00000000..d2236dff
--- /dev/null
+++ b/BKUFonts/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/fonts"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/BKUFonts/.project b/BKUFonts/.project
new file mode 100644
index 00000000..484ff825
--- /dev/null
+++ b/BKUFonts/.project
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>BKUFonts</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/BKUFonts/.settings/org.eclipse.jdt.core.prefs b/BKUFonts/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..9db35b19
--- /dev/null
+++ b/BKUFonts/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Fri Nov 06 15:23:46 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/BKUFonts/.settings/org.eclipse.wst.common.component b/BKUFonts/.settings/org.eclipse.wst.common.component
new file mode 100644
index 00000000..d7d79bb4
--- /dev/null
+++ b/BKUFonts/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="BKUFonts">
+ <wb-resource deploy-path="/" source-path="/src/main/fonts"/>
+ </wb-module>
+</project-modules>
diff --git a/BKUFonts/.settings/org.eclipse.wst.common.project.facet.core.xml b/BKUFonts/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 00000000..f68988cf
--- /dev/null
+++ b/BKUFonts/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <installed facet="jst.java" version="6.0"/>
+ <installed facet="jst.utility" version="1.0"/>
+</faceted-project>
diff --git a/BKUFonts/.settings/org.maven.ide.eclipse.prefs b/BKUFonts/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 00000000..51d61132
--- /dev/null
+++ b/BKUFonts/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Fri Nov 06 15:23:22 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/bkucommon/pom.xml b/bkucommon/pom.xml
index e878f155..972136c2 100644
--- a/bkucommon/pom.xml
+++ b/bkucommon/pom.xml
@@ -25,11 +25,6 @@
<sourceDestDir>${project.build.directory}/generated-sources/moaspss</sourceDestDir>
<staleFile>${project.build.directory}/generated-sources/moaspss/.staleFlag</staleFile>
<xnocompile>true</xnocompile> </configuration> </plugin -->
- <!--
- skip tests temporarily <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId> <configuration>
- <skip>true</skip> </configuration> </plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>