From b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd Mon Sep 17 00:00:00 2001 From: mcentner Date: Wed, 5 May 2010 15:29:01 +0000 Subject: 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 --- .../java/at/gv/egiz/stalx/service/STALService.java | 2 -- .../translator/STALXTranslationHandler.java | 34 +++++++++++----------- 2 files changed, 17 insertions(+), 19 deletions(-) (limited to 'STALXService/src/main/java/at/gv/egiz') diff --git a/STALXService/src/main/java/at/gv/egiz/stalx/service/STALService.java b/STALXService/src/main/java/at/gv/egiz/stalx/service/STALService.java index eccd2c4f..6b55d2e5 100644 --- a/STALXService/src/main/java/at/gv/egiz/stalx/service/STALService.java +++ b/STALXService/src/main/java/at/gv/egiz/stalx/service/STALService.java @@ -3,7 +3,6 @@ package at.gv.egiz.stalx.service; import java.net.MalformedURLException; import java.net.URL; -import java.util.logging.Logger; import javax.xml.namespace.QName; import javax.xml.ws.Service; import javax.xml.ws.WebEndpoint; @@ -24,7 +23,6 @@ public class STALService { // private final static URL STALSERVICE_WSDL_LOCATION; - private final static Logger logger = Logger.getLogger(at.gv.egiz.stalx.service.STALService.class.getName()); // static { // URL url = null; diff --git a/STALXService/src/main/java/at/gv/egiz/stalx/service/translator/STALXTranslationHandler.java b/STALXService/src/main/java/at/gv/egiz/stalx/service/translator/STALXTranslationHandler.java index d432b170..d9f4163c 100644 --- a/STALXService/src/main/java/at/gv/egiz/stalx/service/translator/STALXTranslationHandler.java +++ b/STALXService/src/main/java/at/gv/egiz/stalx/service/translator/STALXTranslationHandler.java @@ -37,8 +37,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import javax.xml.bind.JAXBElement; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @@ -46,7 +46,7 @@ import org.apache.commons.logging.LogFactory; */ public class STALXTranslationHandler implements STALTranslator.TranslationHandler { - private static final Log log = LogFactory.getLog(STALXTranslationHandler.class); + private final Logger log = LoggerFactory.getLogger(STALXTranslationHandler.class); ObjectFactory of; public STALXTranslationHandler() { @@ -54,8 +54,8 @@ public class STALXTranslationHandler implements STALTranslator.TranslationHandle } @Override - public List getSupportedTypes() { - return Arrays.asList(new Class[]{ScriptType.class, + public List> getSupportedTypes() { + return Arrays.asList(new Class[]{ScriptType.class, at.buergerkarte.namespaces.cardchannel.service.ResponseType.class, APDUScriptRequest.class, APDUScriptResponse.class}); @@ -64,7 +64,7 @@ public class STALXTranslationHandler implements STALTranslator.TranslationHandle @Override public JAXBElement translate(STALRequest request) throws TranslationException { if (request instanceof APDUScriptRequest) { - log.trace("translate at.gv.egiz.stal.ext.APDUScriptRequest -> at.buergerkarte.namespaces.cardchannel.service.ScriptType"); + log.trace("Translate at.gv.egiz.stal.ext.APDUScriptRequest -> at.buergerkarte.namespaces.cardchannel.service.ScriptType."); ScriptType scriptT = of.createScriptType(); @@ -80,14 +80,14 @@ public class STALXTranslationHandler implements STALTranslator.TranslationHandle commandAPDUType.setExpectedSW(cmd.getExpectedSW()); scriptT.getResetOrCommandAPDUOrVerifyAPDU().add(commandAPDUType); } else { - log.error("invalid requestScriptElement " + requestScriptElement.getClass()); + log.error("Invalid requestScriptElement {}.", requestScriptElement.getClass()); throw new TranslationException(requestScriptElement.getClass()); } } return of.createScript(scriptT); } else { - log.error("cannot translate " + request.getClass()); + log.error("Cannot translate {}.", request.getClass()); throw new TranslationException(request.getClass()); } } @@ -96,7 +96,7 @@ public class STALXTranslationHandler implements STALTranslator.TranslationHandle public STALRequest translate(RequestType request) throws TranslationException { if (request instanceof ScriptType) { - log.trace("translate at.buergerkarte.namespaces.cardchannel.service.ScriptType -> at.gv.egiz.stal.ext.APDUScriptRequest"); + log.trace("Translate at.buergerkarte.namespaces.cardchannel.service.ScriptType -> at.gv.egiz.stal.ext.APDUScriptRequest."); List resetOrCommandAPDUOrVerifyAPDU = ((ScriptType) request).getResetOrCommandAPDUOrVerifyAPDU(); List requestScript = new ArrayList(); @@ -124,7 +124,7 @@ public class STALXTranslationHandler implements STALTranslator.TranslationHandle log.error("CardChannel script command 'VerifyAPDU' not implemented."); throw new TranslationException(VerifyAPDUType.class); } else { - log.error("invalid requestScriptElement element " + element.getClass()); + log.error("Invalid requestScriptElement element {}.", element.getClass()); throw new TranslationException(element.getClass()); } } @@ -132,7 +132,7 @@ public class STALXTranslationHandler implements STALTranslator.TranslationHandle return new APDUScriptRequest(requestScript); } else { - log.error("cannot translate " + request.getClass()); + log.error("Cannot translate {}.", request.getClass()); throw new TranslationException(request.getClass()); } } @@ -140,7 +140,7 @@ public class STALXTranslationHandler implements STALTranslator.TranslationHandle @Override public JAXBElement translate(STALResponse response) throws TranslationException { if (response instanceof APDUScriptResponse) { - log.trace("translate at.gv.egiz.stal.ext.APDUScriptResponse -> at.buergerkarte.namespaces.cardchannel.service.ResponseType"); + log.trace("Translate at.gv.egiz.stal.ext.APDUScriptResponse -> at.buergerkarte.namespaces.cardchannel.service.ResponseType."); at.buergerkarte.namespaces.cardchannel.service.ResponseType responseT = of.createResponseType(); List responseScript = ((APDUScriptResponse) response).getScript(); @@ -167,13 +167,13 @@ public class STALXTranslationHandler implements STALTranslator.TranslationHandle responseT.getATROrResponseAPDU().add(responseAPDUType); } else { - log.error("invalid responseScriptElement " + element.getClass()); + log.error("Invalid responseScriptElement {}.", element.getClass()); throw new TranslationException(element.getClass()); } } return of.createResponse(responseT); } else { - log.error("cannot translate " + response.getClass()); + log.error("Cannot translate {}." + response.getClass()); throw new TranslationException(response.getClass()); } } @@ -181,7 +181,7 @@ public class STALXTranslationHandler implements STALTranslator.TranslationHandle @Override public STALResponse translate(ResponseType response) throws TranslationException { if (response instanceof at.buergerkarte.namespaces.cardchannel.service.ResponseType) { - log.trace("translate at.buergerkarte.namespaces.cardchannel.service.ResponseType -> at.gv.egiz.stal.ext.APDUScriptResponse"); + log.trace("Translate at.buergerkarte.namespaces.cardchannel.service.ResponseType -> at.gv.egiz.stal.ext.APDUScriptResponse."); List atrOrResponseAPDU = ((at.buergerkarte.namespaces.cardchannel.service.ResponseType) response).getATROrResponseAPDU(); List responseScript = new ArrayList(); @@ -203,14 +203,14 @@ public class STALXTranslationHandler implements STALTranslator.TranslationHandle respAPDU.getSW(), rc)); } else { - log.error("invalid responseScriptElement " + object.getClass()); + log.error("Invalid responseScriptElement {}.", object.getClass()); throw new TranslationException(object.getClass()); } } return new APDUScriptResponse(responseScript); } else { - log.error("cannot translate " + response.getClass()); + log.error("Cannot translate {}.", response.getClass()); throw new TranslationException(response.getClass()); } } -- cgit v1.2.3