Package org.opensaml.ws.wspolicy

Examples of org.opensaml.ws.wspolicy.Policy


*/
public class PolicyMarshaller extends OperatorContentTypeMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        Policy policy = (Policy) xmlObject;
       
        if (policy.getName() != null) {
            domElement.setAttributeNS(null, Policy.NAME_ATTRIB_NAME, policy.getName());
        }
       
        if (policy.getWSUId() != null) {
            XMLHelper.marshallAttribute(IdBearing.WSU_ID_ATTR_NAME, policy.getWSUId(), domElement, true);
        }
       
        XMLHelper.marshallAttributeMap(policy.getUnknownAttributes(), domElement);
    }
View Full Code Here


*/
public class PolicyUnmarshaller extends OperatorContentTypeUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        Policy policy = (Policy) xmlObject;
       
        QName nameQName = new QName(Policy.NAME_ATTRIB_NAME);
       
        QName attribQName =
            XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix());
       
        if (nameQName.equals(attribQName)) {
            policy.setName(attribute.getValue());
        } else if (Policy.WSU_ID_ATTR_NAME.equals(attribQName)) {
            policy.setWSUId(attribute.getValue());
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        } else {
            XMLHelper.unmarshallToAttributeMap(policy.getUnknownAttributes(), attribute);
        }
    }
View Full Code Here

*/
public class PolicyMarshaller extends OperatorContentTypeMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        Policy policy = (Policy) xmlObject;
       
        if (policy.getName() != null) {
            domElement.setAttributeNS(null, Policy.NAME_ATTRIB_NAME, policy.getName());
        }
       
        if (policy.getWSUId() != null) {
            XMLHelper.marshallAttribute(IdBearing.WSU_ID_ATTR_NAME, policy.getWSUId(), domElement, true);
        }
       
        XMLHelper.marshallAttributeMap(policy.getUnknownAttributes(), domElement);
    }
View Full Code Here

*/
public class PolicyUnmarshaller extends OperatorContentTypeUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        Policy policy = (Policy) xmlObject;
       
        QName nameQName = new QName(Policy.NAME_ATTRIB_NAME);
       
        QName attribQName =
            XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix());
       
        if (nameQName.equals(attribQName)) {
            policy.setName(attribute.getValue());
        } else if (Policy.WSU_ID_ATTR_NAME.equals(attribQName)) {
            policy.setWSUId(attribute.getValue());
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        } else {
            XMLHelper.unmarshallToAttributeMap(policy.getUnknownAttributes(), attribute);
        }
    }
View Full Code Here

TOP

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

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.