diff options
author | mcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2010-05-05 15:29:01 +0000 |
---|---|---|
committer | mcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2010-05-05 15:29:01 +0000 |
commit | b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd (patch) | |
tree | 0883f08a408f89f758e9a1be629232e3dd055c3a /bkucommon/src/test/java/at/gv/egiz/stal | |
parent | 83a9b613836910f7edc370c2fe60fa2268dc4461 (diff) | |
download | mocca-b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd.tar.gz mocca-b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd.tar.bz2 mocca-b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd.zip |
Merged feature branch mocca-1.2.13-id@r724 back to trunk.
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@725 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'bkucommon/src/test/java/at/gv/egiz/stal')
-rw-r--r-- | bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummySTAL.java | 13 | ||||
-rw-r--r-- | bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummyStalFactory.java | 38 |
2 files changed, 44 insertions, 7 deletions
diff --git a/bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummySTAL.java b/bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummySTAL.java index 8adeadee..e4ffdb9d 100644 --- a/bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummySTAL.java +++ b/bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummySTAL.java @@ -27,10 +27,9 @@ import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; -import java.util.Locale; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import at.gv.egiz.stal.ErrorResponse; import at.gv.egiz.stal.InfoboxReadRequest; @@ -43,7 +42,7 @@ import at.gv.egiz.stal.SignResponse; public class DummySTAL implements STAL { - static Log log = LogFactory.getLog(DummySTAL.class); + private final Logger log = LoggerFactory.getLogger(DummySTAL.class); protected X509Certificate cert = null; protected PrivateKey privateKey = null; @@ -66,7 +65,7 @@ public class DummySTAL implements STAL { } } } catch (Exception e) { - log.error(e); + log.error("Failed to create DummySTAL.", e); } } @@ -113,7 +112,7 @@ public class DummySTAL implements STAL { infoboxReadResponse.setInfoboxValue(cert.getEncoded()); response = infoboxReadResponse; } catch (CertificateEncodingException e) { - log.error(e); + log.error("Failed to encode certificate.", e); response = new ErrorResponse(); } } else { @@ -136,7 +135,7 @@ public class DummySTAL implements STAL { resp.setSignatureValue(sigVal); responses.add(resp); } catch (Exception e) { - log.error(e); + log.error("Failed to create signature.", e); responses.add(new ErrorResponse()); } diff --git a/bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummyStalFactory.java b/bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummyStalFactory.java new file mode 100644 index 00000000..b8e3fff4 --- /dev/null +++ b/bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummyStalFactory.java @@ -0,0 +1,38 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package at.gv.egiz.stal.dummy;
+
+import java.util.Locale; + +import at.gv.egiz.stal.STAL;
+import at.gv.egiz.stal.STALFactory;
+
+public class DummyStalFactory implements STALFactory {
+
+ @Override
+ public STAL createSTAL() {
+ // TODO Auto-generated method stub
+ return new at.gv.egiz.stal.dummy.DummySTAL();
+ } + + @Override + public void setLocale(Locale locale) { + // TODO Auto-generated method stub + + }
+
+}
|