From 0b3249e37b26e029c576127654dca31bff4a5a63 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Mon, 17 Mar 2014 18:23:52 +0100 Subject: removing old samlengine and storkcommons --- .../core/impl/CustomAttributeQueryMarshaller.java | 50 ---------------------- 1 file changed, 50 deletions(-) delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryMarshaller.java (limited to 'id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryMarshaller.java') diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryMarshaller.java deleted file mode 100644 index 51b6a20f8..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryMarshaller.java +++ /dev/null @@ -1,50 +0,0 @@ -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.Configuration; -import org.opensaml.saml2.core.RequestAbstractType; -import org.opensaml.saml2.core.impl.SubjectQueryMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.CustomRequestAbstractType; - -public class CustomAttributeQueryMarshaller extends SubjectQueryMarshaller { - - /** {@inheritDoc} */ - protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException { - CustomRequestAbstractType req = (CustomRequestAbstractType) samlObject; - - if (req.getVersion() != null) { - domElement.setAttributeNS(null, RequestAbstractType.VERSION_ATTRIB_NAME, req.getVersion().toString()); - } - - if (req.getID() != null) { - domElement.setAttributeNS(null, RequestAbstractType.ID_ATTRIB_NAME, req.getID()); - domElement.setIdAttributeNS(null, RequestAbstractType.ID_ATTRIB_NAME, true); - } - - if (req.getVersion() != null) { - domElement.setAttributeNS(null, RequestAbstractType.VERSION_ATTRIB_NAME, req.getVersion().toString()); - } - - if (req.getIssueInstant() != null) { - String iiStr = Configuration.getSAMLDateFormatter().print(req.getIssueInstant()); - domElement.setAttributeNS(null, RequestAbstractType.ISSUE_INSTANT_ATTRIB_NAME, iiStr); - } - - if (req.getDestination() != null) { - domElement.setAttributeNS(null, RequestAbstractType.DESTINATION_ATTRIB_NAME, req.getDestination()); - } - - if (req.getAssertionConsumerServiceURL() != null) { - domElement.setAttributeNS(null, CustomRequestAbstractType.ASSERTION_CONSUMER_SERVICE_URL_ATTRIB_NAME, req.getAssertionConsumerServiceURL()); - } - - if (req.getConsent() != null) { - domElement.setAttributeNS(null, RequestAbstractType.CONSENT_ATTRIB_NAME, req.getConsent()); - } - } - - -} -- cgit v1.2.3 From e6144cfe09bb148638911660eeb492fee7ab8079 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 20 Mar 2014 11:43:22 +0100 Subject: fixed serializable issues in stork2-commons --- .../core/impl/CustomAttributeQueryMarshaller.java | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryMarshaller.java (limited to 'id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryMarshaller.java') diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryMarshaller.java new file mode 100644 index 000000000..7f2013ca8 --- /dev/null +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryMarshaller.java @@ -0,0 +1,50 @@ +package eu.stork.peps.auth.engine.core.impl; + +import org.opensaml.Configuration; +import org.opensaml.saml2.core.RequestAbstractType; +import org.opensaml.saml2.core.impl.SubjectQueryMarshaller; +import org.opensaml.xml.XMLObject; +import org.opensaml.xml.io.MarshallingException; +import org.w3c.dom.Element; + +import eu.stork.peps.auth.engine.core.CustomRequestAbstractType; + +public class CustomAttributeQueryMarshaller extends SubjectQueryMarshaller { + + /** {@inheritDoc} */ + protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException { + CustomRequestAbstractType req = (CustomRequestAbstractType) samlObject; + + if (req.getVersion() != null) { + domElement.setAttributeNS(null, RequestAbstractType.VERSION_ATTRIB_NAME, req.getVersion().toString()); + } + + if (req.getID() != null) { + domElement.setAttributeNS(null, RequestAbstractType.ID_ATTRIB_NAME, req.getID()); + domElement.setIdAttributeNS(null, RequestAbstractType.ID_ATTRIB_NAME, true); + } + + if (req.getVersion() != null) { + domElement.setAttributeNS(null, RequestAbstractType.VERSION_ATTRIB_NAME, req.getVersion().toString()); + } + + if (req.getIssueInstant() != null) { + String iiStr = Configuration.getSAMLDateFormatter().print(req.getIssueInstant()); + domElement.setAttributeNS(null, RequestAbstractType.ISSUE_INSTANT_ATTRIB_NAME, iiStr); + } + + if (req.getDestination() != null) { + domElement.setAttributeNS(null, RequestAbstractType.DESTINATION_ATTRIB_NAME, req.getDestination()); + } + + if (req.getAssertionConsumerServiceURL() != null) { + domElement.setAttributeNS(null, CustomRequestAbstractType.ASSERTION_CONSUMER_SERVICE_URL_ATTRIB_NAME, req.getAssertionConsumerServiceURL()); + } + + if (req.getConsent() != null) { + domElement.setAttributeNS(null, RequestAbstractType.CONSENT_ATTRIB_NAME, req.getConsent()); + } + } + + +} -- cgit v1.2.3