diff options
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java | 24 |
1 files changed, 13 insertions, 11 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 baa91a854..e3b926b00 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 @@ -40,7 +40,7 @@ import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; import eu.stork.peps.auth.commons.STORKAttrQueryResponse; import eu.stork.peps.complex.attributes.*; - +import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.xml.bind.JAXBContext; @@ -267,7 +267,7 @@ public class MandateRetrievalRequest implements IAction { mandateType.setRepresenting(representative); mandateType.setRepresented(represented); - mandateType.setMandateContent(mandateContent); + //mandateType.setMandateContent(mandateContent); // TODO Logger.debug("Complex attribute extracted: " + sourceAttribute.getName()); return mandateType; } @@ -275,7 +275,8 @@ public class MandateRetrievalRequest implements IAction { private String getLegalName(MandateContainer mandateContainer, PersonalAttribute sourceAttribute) throws MOAIDException { RepresentationPersonType represented = getRepresented(mandateContainer, sourceAttribute); if (mandateContainer instanceof CorporateBodyMandateContainer) { - return represented.getName(); + represented.getLegalName(); + //return represented.getName(); } else if (sourceAttribute.isRequired()) { Logger.error("Cannot provide legalName for natural person."); throw new MOAIDException("stork.19", new Object[]{sourceAttribute.getName()}); @@ -487,10 +488,10 @@ public class MandateRetrievalRequest implements IAction { if (mandateContainer instanceof CorporateBodyMandateContainer) { CorporateBodyMandateContainer corporateBodyMandateContainer = (CorporateBodyMandateContainer) mandateContainer; represented.setELPIdentifier(corporateBodyMandateContainer.getCorpMandatorIdentificationValue()); - represented.setName(corporateBodyMandateContainer.getCorpMandatorFullName()); - represented.setAddress(""); - represented.setCanonicalAddress(new CanonicalAddressType()); - represented.setType(getCompanyType(corporateBodyMandateContainer.corpMandatorFullName, corporateBodyMandateContainer.corpMandatorIdentificationType, sourceAttribute)); + represented.setLegalName(corporateBodyMandateContainer.getCorpMandatorFullName()); + represented.setTextRegisteredAddress(""); + represented.setCanonicalRegisteredAddress(new CanonicalAddressType()); + represented.setLegalForm(getCompanyType(corporateBodyMandateContainer.corpMandatorFullName, corporateBodyMandateContainer.corpMandatorIdentificationType, sourceAttribute)); } else if (mandateContainer instanceof PhyPersonMandateContainer) { PhyPersonMandateContainer phyPersonMandateContainer = (PhyPersonMandateContainer) mandateContainer; represented.setEIdentifier(getRepresentedStorkeIdentifier(mandateContainer)); @@ -510,15 +511,16 @@ public class MandateRetrievalRequest implements IAction { try { XMLGregorianCalendar validFrom = DatatypeFactory.newInstance().newXMLGregorianCalendar(mandateContainer.getMandateValidFrom()); XMLGregorianCalendar validTo = DatatypeFactory.newInstance().newXMLGregorianCalendar(mandateContainer.getMandateValidTo()); - mandateContent.setValidFrom(validFrom); - mandateContent.setValidTo(validTo); + // TODO + //mandateContent.set .setValidFrom(validFrom); + //mandateContent.setValidTo(validTo); } catch (DatatypeConfigurationException dte) { Logger.error("Error converting date from mandate: " + mandateContainer.getMandateValidFrom() + ", " + mandateContainer.getMandateValidTo()); throw new MOAIDException("stork.20", new Object[]{}); } - mandateContent.setTransactionLimit(BigInteger.valueOf(0)); // TODO - mandateContent.setTransactionLimitCurrency("");// TODO + //mandateContent.setTransactionLimit(BigInteger.valueOf(0)); // TODO + //mandateContent.setTransactionLimitCurrency("");// TODO mandateContent.setIsJoint("0"); mandateContent.setIschained(false); mandateContent.setTypePower(mapPowersType(mandateContainer)); |