Package org.opensaml.xml.encryption

Examples of org.opensaml.xml.encryption.EncryptedType


public abstract class EncryptedTypeUnmarshaller extends AbstractXMLEncryptionUnmarshaller {

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

        if (childXMLObject instanceof EncryptionMethod) {
            et.setEncryptionMethod((EncryptionMethod) childXMLObject);
        } else if (childXMLObject instanceof KeyInfo) {
            et.setKeyInfo((KeyInfo) childXMLObject);
        } else if (childXMLObject instanceof CipherData) {
            et.setCipherData((CipherData) childXMLObject);
        } else if (childXMLObject instanceof EncryptionProperties) {
            et.setEncryptionProperties((EncryptionProperties) childXMLObject);
        } else {
            super.processChildElement(parentXMLObject, childXMLObject);
        }

    }
View Full Code Here


    }

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

        if (attribute.getLocalName().equals(EncryptedType.ID_ATTRIB_NAME)) {
            et.setID(attribute.getValue());
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        } else if (attribute.getLocalName().equals(EncryptedType.TYPE_ATTRIB_NAME)) {
            et.setType(attribute.getValue());
        } else if (attribute.getLocalName().equals(EncryptedType.MIMETYPE_ATTRIB_NAME)) {
            et.setMimeType(attribute.getValue());
        } else if (attribute.getLocalName().equals(EncryptedType.ENCODING_ATTRIB_NAME)) {
            et.setEncoding(attribute.getValue());
        } else {
            super.processAttribute(xmlObject, attribute);
        }

    }
View Full Code Here

*/
public abstract class EncryptedTypeMarshaller extends AbstractXMLEncryptionMarshaller {

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

        if (et.getID() != null) {
            domElement.setAttributeNS(null, EncryptedType.ID_ATTRIB_NAME, et.getID());
            domElement.setIdAttributeNS(null, EncryptedType.ID_ATTRIB_NAME, true);
        }

        if (et.getType() != null) {
            domElement.setAttributeNS(null, EncryptedType.TYPE_ATTRIB_NAME, et.getType());
        }

        if (et.getMimeType() != null) {
            domElement.setAttributeNS(null, EncryptedType.MIMETYPE_ATTRIB_NAME, et.getMimeType());
        }

        if (et.getEncoding() != null) {
            domElement.setAttributeNS(null, EncryptedType.ENCODING_ATTRIB_NAME, et.getEncoding());
        }

    }
View Full Code Here

public abstract class EncryptedTypeUnmarshaller extends AbstractXMLEncryptionUnmarshaller {

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

        if (childXMLObject instanceof EncryptionMethod) {
            et.setEncryptionMethod((EncryptionMethod) childXMLObject);
        } else if (childXMLObject instanceof KeyInfo) {
            et.setKeyInfo((KeyInfo) childXMLObject);
        } else if (childXMLObject instanceof CipherData) {
            et.setCipherData((CipherData) childXMLObject);
        } else if (childXMLObject instanceof EncryptionProperties) {
            et.setEncryptionProperties((EncryptionProperties) childXMLObject);
        } else {
            super.processChildElement(parentXMLObject, childXMLObject);
        }

    }
View Full Code Here

    }

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

        if (attribute.getLocalName().equals(EncryptedType.ID_ATTRIB_NAME)) {
            et.setID(attribute.getValue());
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        } else if (attribute.getLocalName().equals(EncryptedType.TYPE_ATTRIB_NAME)) {
            et.setType(attribute.getValue());
        } else if (attribute.getLocalName().equals(EncryptedType.MIMETYPE_ATTRIB_NAME)) {
            et.setMimeType(attribute.getValue());
        } else if (attribute.getLocalName().equals(EncryptedType.ENCODING_ATTRIB_NAME)) {
            et.setEncoding(attribute.getValue());
        } else {
            super.processAttribute(xmlObject, attribute);
        }

    }
View Full Code Here

*/
public abstract class EncryptedTypeMarshaller extends AbstractXMLEncryptionMarshaller {

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

        if (et.getID() != null) {
            domElement.setAttributeNS(null, EncryptedType.ID_ATTRIB_NAME, et.getID());
            domElement.setIdAttributeNS(null, EncryptedType.ID_ATTRIB_NAME, true);
        }

        if (et.getType() != null) {
            domElement.setAttributeNS(null, EncryptedType.TYPE_ATTRIB_NAME, et.getType());
        }

        if (et.getMimeType() != null) {
            domElement.setAttributeNS(null, EncryptedType.MIMETYPE_ATTRIB_NAME, et.getMimeType());
        }

        if (et.getEncoding() != null) {
            domElement.setAttributeNS(null, EncryptedType.ENCODING_ATTRIB_NAME, et.getEncoding());
        }

    }
View Full Code Here

TOP

Related Classes of org.opensaml.xml.encryption.EncryptedType

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.