aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2010-07-13 06:25:09 +0000
committerkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2010-07-13 06:25:09 +0000
commitfa30b5b2a26a6df4e56a81283761c35ef81770e3 (patch)
tree8e60eab14c0bc1cb45af7042261c8b6cf3351eab /common
parent68af85701b6f797b0d662b89b95e043ee949defd (diff)
downloadmoa-id-spss-fa30b5b2a26a6df4e56a81283761c35ef81770e3.tar.gz
moa-id-spss-fa30b5b2a26a6df4e56a81283761c35ef81770e3.tar.bz2
moa-id-spss-fa30b5b2a26a6df4e56a81283761c35ef81770e3.zip
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1166 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'common')
-rw-r--r--common/.classpath24
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java31
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java3
3 files changed, 42 insertions, 16 deletions
diff --git a/common/.classpath b/common/.classpath
index 2ea0c3c6d..acbdc4f5b 100644
--- a/common/.classpath
+++ b/common/.classpath
@@ -1,14 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <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.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java
index 5f31809dd..88133832a 100644
--- a/common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java
@@ -74,6 +74,37 @@ public class DateTimeUtils {
}
/**
+ * Builds a <code>dateTime</code> value from a <code>Calendar</code> value.
+ * @param cal the <code>Calendar</code> value
+ * @return the <code>dateTime</code> value
+ */
+ public static String buildDate(Calendar cal) {
+ StringWriter out = new StringWriter();
+ out.write("" + cal.get(Calendar.YEAR));
+ out.write("-");
+ out.write(to2DigitString(cal.get(Calendar.MONTH) + 1));
+ out.write("-");
+ out.write(to2DigitString(cal.get(Calendar.DAY_OF_MONTH)));
+ return out.toString();
+ }
+
+ /**
+ * Builds a <code>dateTime</code> value from a <code>Calendar</code> value.
+ * @param cal the <code>Calendar</code> value
+ * @return the <code>dateTime</code> value
+ */
+ public static String buildTime(Calendar cal) {
+ StringWriter out = new StringWriter();
+ out.write(to2DigitString(cal.get(Calendar.HOUR_OF_DAY)));
+ out.write(":");
+ out.write(to2DigitString(cal.get(Calendar.MINUTE)));
+ out.write(":");
+ out.write(to2DigitString(cal.get(Calendar.SECOND)));
+
+ return out.toString();
+ }
+
+ /**
* Converts month, day, hour, minute, or second value
* to a 2 digit String.
* @param number the month, day, hour, minute, or second value
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java
index 6d6aedb22..a7937b1bd 100644
--- a/common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java
+++ b/common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java
@@ -110,8 +110,7 @@ public class SSLUtils {
String clientKeyStorePassword)
throws IOException, GeneralSecurityException {
- //System.setProperty("javax.net.debug", "all");
- TrustManager[] tms = getTrustManagers(trustStore);
+ TrustManager[] tms = getTrustManagers(trustStore);
KeyManager[] kms = getKeyManagers(clientKeyStoreType, clientKeyStoreURL, clientKeyStorePassword);
SSLContext ctx = SSLContext.getInstance("TLS");
ctx.init(kms, tms, null);