aboutsummaryrefslogtreecommitdiff
path: root/common/src/main/java
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/src/main/java
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/src/main/java')
-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
2 files changed, 32 insertions, 2 deletions
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);