summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2011-02-23 14:42:40 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2011-02-23 14:42:40 +0000
commit00e2e53301ceafe825a6b56a4e5818fff91f834e (patch)
tree0f1f6485a0dd2da9f35466acf190c25f66248e9e
parent24f80ff39e90925e5610a6fc4c3160a6947227d9 (diff)
downloadmocca-00e2e53301ceafe825a6b56a4e5818fff91f834e.tar.gz
mocca-00e2e53301ceafe825a6b56a4e5818fff91f834e.tar.bz2
mocca-00e2e53301ceafe825a6b56a4e5818fff91f834e.zip
merge STALTranslator changes (translate() name clash workaround)
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@908 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java2
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java2
-rw-r--r--STALService/src/main/java/at/gv/egiz/stal/service/translator/STALTranslator.java4
-rw-r--r--STALService/src/test/java/at/gv/egiz/stal/service/translator/STALTranslatorTest.java6
4 files changed, 7 insertions, 7 deletions
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java
index ee1deae8..6eca5a67 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java
@@ -109,7 +109,7 @@ public class AppletBKUWorker extends AbstractBKUWorker implements Runnable {
List<STALRequest> stalRequests = new ArrayList<STALRequest>();
for (JAXBElement<? extends RequestType> req : requests) {
try {
- stalRequests.add(stalTranslator.translate(req));
+ stalRequests.add(stalTranslator.translateWSRequest(req));
} catch (TranslationException ex) {
log.error("Received unknown request from server STAL. {}", ex.getMessage());
throw new RuntimeException(ex);
diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java
index 5705a9f7..2cef45ae 100644
--- a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java
+++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java
@@ -183,7 +183,7 @@ public class STALRequestBrokerImpl implements STALRequestBroker {
List<STALResponse> stalResponses = new ArrayList<STALResponse>();
try {
for (JAXBElement<? extends ResponseType> resp : responses) {
- STALResponse stalResp = translator.translate(resp);
+ STALResponse stalResp = translator.translateWSResponse(resp);
stalResponses.add(stalResp);
}
} catch (TranslationException ex) {
diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/translator/STALTranslator.java b/STALService/src/main/java/at/gv/egiz/stal/service/translator/STALTranslator.java
index 88a6fa4c..fec5722b 100644
--- a/STALService/src/main/java/at/gv/egiz/stal/service/translator/STALTranslator.java
+++ b/STALService/src/main/java/at/gv/egiz/stal/service/translator/STALTranslator.java
@@ -98,7 +98,7 @@ public class STALTranslator {
* @return
* @throws at.gv.egiz.stal.service.translator.TranslationException
*/
- public STALRequest translate(JAXBElement<? extends RequestType> request) throws TranslationException {
+ public STALRequest translateWSRequest(JAXBElement<? extends RequestType> request) throws TranslationException {
RequestType req = request.getValue();
if (req == null) {
throw new RuntimeException("RequestType must not be null");
@@ -138,7 +138,7 @@ public class STALTranslator {
* @return
* @throws at.gv.egiz.stal.service.translator.TranslationException
*/
- public STALResponse translate(JAXBElement<? extends ResponseType> response) throws TranslationException {
+ public STALResponse translateWSResponse(JAXBElement<? extends ResponseType> response) throws TranslationException {
ResponseType resp = response.getValue();
if (resp == null) {
throw new RuntimeException("ResponseType must not be null");
diff --git a/STALService/src/test/java/at/gv/egiz/stal/service/translator/STALTranslatorTest.java b/STALService/src/test/java/at/gv/egiz/stal/service/translator/STALTranslatorTest.java
index 1dad7973..e8930ed2 100644
--- a/STALService/src/test/java/at/gv/egiz/stal/service/translator/STALTranslatorTest.java
+++ b/STALService/src/test/java/at/gv/egiz/stal/service/translator/STALTranslatorTest.java
@@ -94,7 +94,7 @@ public class STALTranslatorTest {
req.setSignedInfo("signedinfo".getBytes());
JAXBElement<? extends RequestType> request = of.createGetNextRequestResponseTypeSignRequest(req);
STALTranslator instance = new STALTranslator();
- STALRequest result = instance.translate(request);
+ STALRequest result = instance.translateWSRequest(request);
assertEquals(SignRequest.class, result.getClass());
assertEquals(req.getKeyIdentifier(), ((SignRequest) result).getKeyIdentifier());
assertEquals(req.getSignedInfo(), ((SignRequest) result).getSignedInfo());
@@ -106,7 +106,7 @@ public class STALTranslatorTest {
QName n = new QName("http://www.egiz.gv.at/stal", "SignRequest");
JAXBElement<? extends RequestType> request = new JAXBElement<SignRequestType>(n, SignRequestType.class, null);
STALTranslator instance = new STALTranslator();
- STALRequest result = instance.translate(request);
+ STALRequest result = instance.translateWSRequest(request);
assertEquals(SignRequest.class, result.getClass());
}
@@ -137,7 +137,7 @@ public class STALTranslatorTest {
JAXBElement<? extends ResponseType> response = null;
STALTranslator instance = new STALTranslator();
STALResponse expResult = null;
- STALResponse result = instance.translate(response);
+ STALResponse result = instance.translateWSResponse(response);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");