aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv/egovernment
diff options
context:
space:
mode:
authorBojan Suzic <bojan.suzic@iaik.tugraz.at>2014-06-13 19:15:10 +0200
committerBojan Suzic <bojan.suzic@iaik.tugraz.at>2014-06-13 19:15:10 +0200
commit3b2f0109faa906d34172daeec388dc58bf116cb3 (patch)
tree7899067648fb9c1317b85aea99dfa89353b0c430 /id/server/idserverlib/src/main/java/at/gv/egovernment
parent8a1ec60f9531640ad8c4275c1c143ee29d915fe0 (diff)
downloadmoa-id-spss-3b2f0109faa906d34172daeec388dc58bf116cb3.tar.gz
moa-id-spss-3b2f0109faa906d34172daeec388dc58bf116cb3.tar.bz2
moa-id-spss-3b2f0109faa906d34172daeec388dc58bf116cb3.zip
mandate refactor
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java
index 29a4c23a4..4d306af22 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java
@@ -279,12 +279,7 @@ public class MandateRetrievalRequest implements IAction {
return "R";
}
-
- private String getCompanyType(MandateContainer mandateContainer, PersonalAttribute sourceAttribute) throws MOAIDException {
- // retrieve the registered subject name
- String legalName = getLegalName(mandateContainer, sourceAttribute);
- String legalIdentificationType = getLegalIdentificationType(mandateContainer, sourceAttribute);
-
+ private String getCompanyType(String legalName, String legalIdentificationType, PersonalAttribute sourceAttrivbute) throws MOAIDException {
// compile patterns for different organisation types
// sources: USP, WKO, LexAndTax
@@ -353,6 +348,13 @@ public class MandateRetrievalRequest implements IAction {
return "";
}
+ private String getCompanyType(MandateContainer mandateContainer, PersonalAttribute sourceAttribute) throws MOAIDException {
+ // retrieve the registered subject name and identification type
+ String legalName = getLegalName(mandateContainer, sourceAttribute);
+ String legalIdentificationType = getLegalIdentificationType(mandateContainer, sourceAttribute);
+ return getCompanyType(legalName, legalIdentificationType, sourceAttribute);
+ }
+
private String getCompanyTranslatableType(MandateContainer mandateContainer, PersonalAttribute sourceAttribute) throws MOAIDException {
// retrieve first the company type
String companyType = getCompanyType(mandateContainer, sourceAttribute);
@@ -390,11 +392,12 @@ public class MandateRetrievalRequest implements IAction {
RepresentationPersonType represented = new RepresentationPersonType();
if (mandateContainer instanceof CorporateBodyMandateContainer) {
- represented.setELPIdentifier(geteLPIdentifier(mandateContainer, sourceAttribute));
- represented.setName(getLegalName(mandateContainer, sourceAttribute));
+ CorporateBodyMandateContainer corporateBodyMandateContainer = (CorporateBodyMandateContainer)mandateContainer;
+ represented.setELPIdentifier("AT/" + corporateBodyMandateContainer.getCorpMandatorIdentificationValue());
+ represented.setName(corporateBodyMandateContainer.getCorpMandatorFullName());
represented.setAddress("");
represented.setCanonicalAddress(new CanonicalAddressType());
- represented.setType(getCompanyType(mandateContainer, sourceAttribute));
+ represented.setType(getCompanyType(corporateBodyMandateContainer.corpMandatorFullName, corporateBodyMandateContainer.corpMandatorIdentificationType, sourceAttribute));
} else if (mandateContainer instanceof PhyPersonMandateContainer) {
PhyPersonMandateContainer phyPersonMandateContainer = (PhyPersonMandateContainer) mandateContainer;
represented.setEIdentifier(""); // TODO CALCULATE