Package org.opensaml.ws.wspolicy

Examples of org.opensaml.ws.wspolicy.PolicyReference


*/
public class PolicyReferenceMarshaller extends AbstractWSPolicyObjectMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        PolicyReference pr = (PolicyReference) xmlObject;
       
        if (pr.getURI() != null) {
            domElement.setAttributeNS(null, PolicyReference.URI_ATTRIB_NAME, pr.getURI());
        }
       
        if (pr.getDigest() != null) {
            domElement.setAttributeNS(null, PolicyReference.DIGEST_ATTRIB_NAME, pr.getDigest());
        }
       
        if (pr.getDigestAlgorithm() != null) {
            domElement.setAttributeNS(null, PolicyReference.DIGEST_ALGORITHM_ATTRIB_NAME, pr.getDigestAlgorithm());
        }
       
        XMLHelper.marshallAttributeMap(pr.getUnknownAttributes(), domElement);
       
    }
View Full Code Here


*/
public class PolicyReferenceUnmarshaller extends AbstractWSPolicyObjectUnmarshaller {

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

        QName uriName = new QName(PolicyReference.URI_ATTRIB_NAME);
        QName digestName = new QName(PolicyReference.DIGEST_ATTRIB_NAME);
        QName digestAlgorithmName = new QName(PolicyReference.DIGEST_ALGORITHM_ATTRIB_NAME);

        QName attribQName =
            XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute .getPrefix());

        if (uriName.equals(attribQName)) {
            pr.setURI(attribute.getValue());
        } else if (digestName.equals(attribQName)) {
            pr.setDigest(attribute.getValue());
        } else if (digestAlgorithmName.equals(attribQName)) {
            pr.setDigestAlgorithm(attribute.getValue());
        } else {
            XMLHelper.unmarshallToAttributeMap(pr.getUnknownAttributes(), attribute);
        }
    }
View Full Code Here

*/
public class PolicyReferenceMarshaller extends AbstractWSPolicyObjectMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        PolicyReference pr = (PolicyReference) xmlObject;
       
        if (pr.getURI() != null) {
            domElement.setAttributeNS(null, PolicyReference.URI_ATTRIB_NAME, pr.getURI());
        }
       
        if (pr.getDigest() != null) {
            domElement.setAttributeNS(null, PolicyReference.DIGEST_ATTRIB_NAME, pr.getDigest());
        }
       
        if (pr.getDigestAlgorithm() != null) {
            domElement.setAttributeNS(null, PolicyReference.DIGEST_ALGORITHM_ATTRIB_NAME, pr.getDigestAlgorithm());
        }
       
        XMLHelper.marshallAttributeMap(pr.getUnknownAttributes(), domElement);
       
    }
View Full Code Here

*/
public class PolicyReferenceUnmarshaller extends AbstractWSPolicyObjectUnmarshaller {

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

        QName uriName = new QName(PolicyReference.URI_ATTRIB_NAME);
        QName digestName = new QName(PolicyReference.DIGEST_ATTRIB_NAME);
        QName digestAlgorithmName = new QName(PolicyReference.DIGEST_ALGORITHM_ATTRIB_NAME);

        QName attribQName =
            XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute .getPrefix());

        if (uriName.equals(attribQName)) {
            pr.setURI(attribute.getValue());
        } else if (digestName.equals(attribQName)) {
            pr.setDigest(attribute.getValue());
        } else if (digestAlgorithmName.equals(attribQName)) {
            pr.setDigestAlgorithm(attribute.getValue());
        } else {
            XMLHelper.unmarshallToAttributeMap(pr.getUnknownAttributes(), attribute);
        }
    }
View Full Code Here

TOP

Related Classes of org.opensaml.ws.wspolicy.PolicyReference

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.