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 | 73 |
1 files changed, 4 insertions, 69 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 a4257c387..811d828e1 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 @@ -159,9 +159,6 @@ public class MandateRetrievalRequest implements IAction { new ConsentEvaluator().requestConsent(container, httpResp, oaParam); else new ConsentEvaluator().generateSTORKResponse(httpResp, container); - - - //return (new AttributeCollector()).processRequest(container, httpReq, httpResp, moasession, oaParam); } @@ -200,62 +197,6 @@ public class MandateRetrievalRequest implements IAction { } - private void populateMandatingData(AuthenticationSession moasession) { - MandateType mandateType = new MandateType(); - RepresentationPersonType representationPersonType = new RepresentationPersonType(); - MandateContentType mandateContentType = new MandateContentType(); - } - - - private void populateRepresented(AuthenticationSession moasession) { - - MandateContainer mc = null; - - try { - mc = new CorporateBodyMandateContainer(new String(authData.getMISMandate().getMandate(), "UTF-8")); - } catch (Exception ex) { - Logger.error("CORPORATE ERROR"); - try { - mc = new PhyPersonMandateContainer(new String(authData.getMISMandate().getMandate(), "UTF-8")); - } catch (Exception ex2) { - Logger.error("PERSON ERROR"); - } - } - - if (mc instanceof CorporateBodyMandateContainer) { - Logger.error("Instance of Corp"); - } else if (mc instanceof PhyPersonMandateContainer) { - Logger.error("Instance of Phy"); - } - - - } - - - private Node extractChildNode(Node node, String childName) throws MOAIDException { - if (!node.hasChildNodes()) { - throw new MOAIDException("stork.11", null); // TODO description - } - for (int n = 0; n < node.getChildNodes().getLength(); n++) { - if (node.getChildNodes().item(n).getNodeName().equals(childName)) { - return node.getChildNodes().item(n); - } - } - throw new MOAIDException("stork.11", null); // TODO description - - } - - private String extractNodeTextContent(Node node, String childName) throws MOAIDException { - if (!node.hasChildNodes()) { - throw new MOAIDException("stork.11", null); // TODO description - } - for (int n = 0; n < node.getChildNodes().getLength(); n++) { - if (node.getChildNodes().item(n).getNodeName().equals(childName)) { - return node.getTextContent(); - } - } - throw new MOAIDException("stork.11", null); // TODO description - } private String mapPowersType(MandateContainer mandateContainer) { // TODO return ""; @@ -281,16 +222,10 @@ public class MandateRetrievalRequest implements IAction { private RepresentationPersonType getRepresentative(MandateContainer mandateContainer, PersonalAttribute sourceAttribute) { RepresentationPersonType representative = new RepresentationPersonType(); - if (mandateContainer instanceof CorporateBodyMandateContainer) { - Logger.error("Company as representative not supported"); // TODO - - } else if (mandateContainer instanceof PhyPersonMandateContainer) { - PhyPersonMandateContainer phyPersonMandateContainer = (PhyPersonMandateContainer)mandateContainer; - representative.setEIdentifier(""); // TODO CALCULATE - representative.setGivenName(phyPersonMandateContainer.getPhysicalRepresentativeGivenName()); - representative.setSurname(phyPersonMandateContainer.getPhysicalRepresentativeFamilyName()); - representative.setDateOfBirth(phyPersonMandateContainer.getPhysicalRepresentativeBirthDate()); - } + representative.setEIdentifier(""); // TODO CALCULATE + representative.setGivenName(mandateContainer.getPhysicalRepresentativeGivenName()); + representative.setSurname(mandateContainer.getPhysicalRepresentativeFamilyName()); + representative.setDateOfBirth(mandateContainer.getPhysicalRepresentativeBirthDate()); Logger.debug("Complex attribute extracted: " + sourceAttribute.getName()); return representative; |