diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2018-06-15 13:16:19 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2018-06-15 13:16:19 +0200 |
commit | 5d46366bfebd7bc38d7df3d648bf03bd29700a2e (patch) | |
tree | b0f9a299ce15c154b6337603634ec792a24c8697 /id/server/moa-id-commons/src/main/java | |
parent | 6b38531ef2a829e3dab513ae8c679511a848421d (diff) | |
download | moa-id-spss-5d46366bfebd7bc38d7df3d648bf03bd29700a2e.tar.gz moa-id-spss-5d46366bfebd7bc38d7df3d648bf03bd29700a2e.tar.bz2 moa-id-spss-5d46366bfebd7bc38d7df3d648bf03bd29700a2e.zip |
fix first refactoring problems
Diffstat (limited to 'id/server/moa-id-commons/src/main/java')
-rw-r--r-- | id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/MOAIDMessageProvider.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/MOAIDMessageProvider.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/MOAIDMessageProvider.java index bc1e2dcdb..2cb867cbc 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/MOAIDMessageProvider.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/MOAIDMessageProvider.java @@ -48,6 +48,8 @@ package at.gv.egovernment.moa.id.commons.utils; import java.util.Locale; +import org.springframework.stereotype.Service; + import at.gv.egiz.eaaf.core.api.IStatusMessager; import at.gv.egiz.eaaf.core.exceptions.ProcessExecutionException; import at.gv.egovernment.moa.id.commons.api.exceptions.BKUException; @@ -57,7 +59,7 @@ import at.gv.egovernment.moa.util.Messages; import at.gv.egovernment.moa.util.MiscUtil; -//@Service("MOAIDMessageProvider") +@Service("MOAIDMessageProvider") public class MOAIDMessageProvider implements IStatusMessager { //internal messanges @@ -81,7 +83,7 @@ public class MOAIDMessageProvider implements IStatusMessager { } - private MOAIDMessageProvider() { + public MOAIDMessageProvider() { this.messages = new Messages(DEFAULT_MESSAGE_RESOURCES, DEFAULT_MESSAGE_LOCALES); this.externalError = new Messages(DEFAULT_EXTERNALERROR_RESOURCES, DEFAULT_EXTERNALERROR_LOCALES); @@ -136,7 +138,7 @@ public String getResponseErrorCode(Throwable throwable) { @Override public String mapInternalErrorToExternalError(String intErrorCode) { - String extErrorCode = messages.getMessage(intErrorCode, null); + String extErrorCode = externalError.getMessage(intErrorCode, null); if (MiscUtil.isEmpty(extErrorCode)) extErrorCode = IStatusMessager.CODES_EXTERNAL_ERROR_GENERIC; |