summaryrefslogtreecommitdiff
path: root/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java
diff options
context:
space:
mode:
authormcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-10-30 10:33:29 +0000
committermcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-10-30 10:33:29 +0000
commitc2ae3db1bc6dcb8ba3eb3461c05e293917c004ca (patch)
tree78151b3f5364daac73dc305f536fae2aa2998521 /bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java
parent687e55f5dbc25855c42757e3024a3c87126803e7 (diff)
downloadmocca-c2ae3db1bc6dcb8ba3eb3461c05e293917c004ca.tar.gz
mocca-c2ae3db1bc6dcb8ba3eb3461c05e293917c004ca.tar.bz2
mocca-c2ae3db1bc6dcb8ba3eb3461c05e293917c004ca.zip
Updated SMCC to use exclusive access and to throw exceptions upon locked or not activated cards. Improved locale support in the security layer request and response processing. Fixed issue in STAL which prevented the use of RSA-SHA1 signatures. Added additional parameters to the applet test pages.
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@128 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java')
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java42
1 files changed, 28 insertions, 14 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java
index 176ba001..5d0f0de0 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/ErrorResultImpl.java
@@ -16,6 +16,8 @@
*/
package at.gv.egiz.bku.slcommands.impl;
+import java.util.Locale;
+
import javax.xml.transform.Result;
import javax.xml.transform.Templates;
@@ -32,22 +34,34 @@ public class ErrorResultImpl extends SLResultImpl implements ErrorResult {
/**
* The exception containing information provided in the <code>ErrorResponse</code>.
*/
- protected SLException slException;
-
- /**
- * Creates a new instance of this ErrorResultImpl with the given
- * <code>slException</code> containing information provided in the
- * <code>ErrorResponse</code>.
- *
- * @param slException the exception
- */
- public ErrorResultImpl(SLException slException) {
- this.slException = slException;
- }
-
+ protected SLException slException;
+
+ /**
+ * The locale to be used for rendering an <code>ErrorResponse</code>.
+ */
+ protected Locale locale;
+
+ /**
+ * Creates a new instance of this ErrorResultImpl with the given
+ * <code>slException</code> containing information provided in the
+ * <code>ErrorResponse</code> and the <code>locale</code> for rendering
+ * the <code>ErrorResponse</code>.
+ *
+ * @param slException the exception
+ * @param locale the locale
+ */
+ public ErrorResultImpl(SLException slException, Locale locale) {
+ this.slException = slException;
+ this.locale = locale;
+ }
+
@Override
public void writeTo(Result result, Templates templates) {
- writeErrorTo(slException, result, templates);
+ if (locale == null) {
+ writeErrorTo(slException, result, templates);
+ } else {
+ writeErrorTo(slException, result, templates, locale);
+ }
}
} \ No newline at end of file