Package org.opensaml.xml.signature

Examples of org.opensaml.xml.signature.RetrievalMethod


*/
public class RetrievalMethodMarshaller extends AbstractXMLSignatureMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        RetrievalMethod rm = (RetrievalMethod) xmlObject;

        if (rm.getURI() != null) {
            domElement.setAttributeNS(null, RetrievalMethod.URI_ATTRIB_NAME, rm.getURI());
        }
        if (rm.getType() != null) {
            domElement.setAttributeNS(null, RetrievalMethod.TYPE_ATTRIB_NAME, rm.getType());
        }
    }
View Full Code Here


*/
public class RetrievalMethodUnmarshaller extends AbstractXMLSignatureUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        RetrievalMethod rm = (RetrievalMethod) xmlObject;

        if (attribute.getLocalName().equals(RetrievalMethod.URI_ATTRIB_NAME)) {
            rm.setURI(attribute.getValue());
        } else if (attribute.getLocalName().equals(RetrievalMethod.TYPE_ATTRIB_NAME)) {
            rm.setType(attribute.getValue());
        } else {
            super.processAttribute(xmlObject, attribute);
        }
    }
View Full Code Here

    }

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
            throws UnmarshallingException {
        RetrievalMethod rm = (RetrievalMethod) parentXMLObject;

        if (childXMLObject instanceof Transforms) {
            rm.setTransforms((Transforms) childXMLObject);
        } else {
            super.processChildElement(parentXMLObject, childXMLObject);
        }
    }
View Full Code Here

     * @param encKey the EncryptedKey
     */
    protected void linkSinglePeerKey(EncryptedData encData, EncryptedKey encKey) {
        log.debug("Linking single peer EncryptedKey with RetrievalMethod and DataReference");
        // Forward reference from EncryptedData to the EncryptedKey
        RetrievalMethod rm = retrievalMethodBuilder.buildObject();
        rm.setURI("#" + encKey.getID());
        rm.setType(EncryptionConstants.TYPE_ENCRYPTED_KEY);
        encData.getKeyInfo().getRetrievalMethods().add(rm);
       
        // Back reference from the EncryptedKey to the EncryptedData
        DataReference dr = dataReferenceBuilder.buildObject();
        dr.setURI("#" + encData.getID());
View Full Code Here

*/
public class RetrievalMethodUnmarshaller extends AbstractXMLSignatureUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        RetrievalMethod rm = (RetrievalMethod) xmlObject;

        if (attribute.getLocalName().equals(RetrievalMethod.URI_ATTRIB_NAME)) {
            rm.setURI(attribute.getValue());
        } else if (attribute.getLocalName().equals(RetrievalMethod.TYPE_ATTRIB_NAME)) {
            rm.setType(attribute.getValue());
        } else {
            super.processAttribute(xmlObject, attribute);
        }
    }
View Full Code Here

    }

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
            throws UnmarshallingException {
        RetrievalMethod rm = (RetrievalMethod) parentXMLObject;

        if (childXMLObject instanceof Transforms) {
            rm.setTransforms((Transforms) childXMLObject);
        } else {
            super.processChildElement(parentXMLObject, childXMLObject);
        }
    }
View Full Code Here

*/
public class RetrievalMethodMarshaller extends AbstractXMLSignatureMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        RetrievalMethod rm = (RetrievalMethod) xmlObject;

        if (rm.getURI() != null) {
            domElement.setAttributeNS(null, RetrievalMethod.URI_ATTRIB_NAME, rm.getURI());
        }
        if (rm.getType() != null) {
            domElement.setAttributeNS(null, RetrievalMethod.TYPE_ATTRIB_NAME, rm.getType());
        }
    }
View Full Code Here

     * @param encKey the EncryptedKey
     */
    protected void linkSinglePeerKey(EncryptedData encData, EncryptedKey encKey) {
        log.debug("Linking single peer EncryptedKey with RetrievalMethod and DataReference");
        // Forward reference from EncryptedData to the EncryptedKey
        RetrievalMethod rm = retrievalMethodBuilder.buildObject();
        rm.setURI("#" + encKey.getID());
        rm.setType(EncryptionConstants.TYPE_ENCRYPTED_KEY);
        encData.getKeyInfo().getRetrievalMethods().add(rm);
       
        // Back reference from the EncryptedKey to the EncryptedData
        DataReference dr = dataReferenceBuilder.buildObject();
        dr.setURI("#" + encData.getID());
View Full Code Here

TOP

Related Classes of org.opensaml.xml.signature.RetrievalMethod

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.