diff options
author | Bojan Suzic <bojan.suzic@iaik.tugraz.at> | 2014-06-13 19:02:24 +0200 |
---|---|---|
committer | Bojan Suzic <bojan.suzic@iaik.tugraz.at> | 2014-06-13 19:02:24 +0200 |
commit | 8a1ec60f9531640ad8c4275c1c143ee29d915fe0 (patch) | |
tree | 179a64bb8e0e9e404c50e91062d3f70f1507bc8c /id | |
parent | 34213284eeb7019f8d15af44d32f1850a0dae290 (diff) | |
download | moa-id-spss-8a1ec60f9531640ad8c4275c1c143ee29d915fe0.tar.gz moa-id-spss-8a1ec60f9531640ad8c4275c1c143ee29d915fe0.tar.bz2 moa-id-spss-8a1ec60f9531640ad8c4275c1c143ee29d915fe0.zip |
company status
Diffstat (limited to 'id')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java | 16 |
1 files changed, 16 insertions, 0 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 72dc81b35..29a4c23a4 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 @@ -129,6 +129,13 @@ public class MandateRetrievalRequest implements IAction { } else { attributeList.add(new PersonalAttribute(currentAttribute.getName(), currentAttribute.isRequired(), Arrays.asList(type), AttributeStatusType.NOT_AVAILABLE.value())); } + } else if (currentAttribute.getName().equals("status")) { + String status = getCompanyStatus(mandateContainer, currentAttribute); + if (status.length() > 0) { + attributeList.add(new PersonalAttribute(currentAttribute.getName(), currentAttribute.isRequired(), Arrays.asList(status), AttributeStatusType.AVAILABLE.value())); + } else { + attributeList.add(new PersonalAttribute(currentAttribute.getName(), currentAttribute.isRequired(), Arrays.asList(status), AttributeStatusType.NOT_AVAILABLE.value())); + } } else if (currentAttribute.getName().equals("translatableType")) { String translatableType = getCompanyTranslatableType(mandateContainer, currentAttribute); if (translatableType.length() > 0) { @@ -264,6 +271,15 @@ public class MandateRetrievalRequest implements IAction { return ""; } + private String getCompanyStatus(MandateContainer mandateContainer, PersonalAttribute sourceAttribute) throws MOAIDException { + String legalName = getLegalName(mandateContainer, sourceAttribute); + if (legalName.contains("in Liquidation") || legalName.contains("in Liqu.")) { + return "L"; // liqudation + } + return "R"; + } + + private String getCompanyType(MandateContainer mandateContainer, PersonalAttribute sourceAttribute) throws MOAIDException { // retrieve the registered subject name String legalName = getLegalName(mandateContainer, sourceAttribute); |