Package org.opensaml.ws.wssecurity

Examples of org.opensaml.ws.wssecurity.Timestamp


*/
public class TimestampMarshaller extends AbstractWSSecurityObjectMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        Timestamp timestamp = (Timestamp) xmlObject;
       
        if (!DatatypeHelper.isEmpty(timestamp.getWSUId())) {
            XMLHelper.marshallAttribute(Timestamp.WSU_ID_ATTR_NAME, timestamp.getWSUId(), domElement, true);
        }
       
        XMLHelper.marshallAttributeMap(timestamp.getUnknownAttributes(), domElement);
    }
View Full Code Here


public class TimestampUnmarshaller extends AbstractWSSecurityObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
            throws UnmarshallingException {
        Timestamp timestamp = (Timestamp) parentXMLObject;
       
        if (childXMLObject instanceof Created) {
            timestamp.setCreated((Created) childXMLObject);
        } else if (childXMLObject instanceof Expires) {
            timestamp.setExpires((Expires) childXMLObject);
        } else {
            timestamp.getUnknownXMLObjects().add(childXMLObject);
        }
    }
View Full Code Here

        }
    }

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

public class TimestampUnmarshaller extends AbstractWSSecurityObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
            throws UnmarshallingException {
        Timestamp timestamp = (Timestamp) parentXMLObject;
       
        if (childXMLObject instanceof Created) {
            timestamp.setCreated((Created) childXMLObject);
        } else if (childXMLObject instanceof Expires) {
            timestamp.setExpires((Expires) childXMLObject);
        } else {
            timestamp.getUnknownXMLObjects().add(childXMLObject);
        }
    }
View Full Code Here

        }
    }

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

*/
public class TimestampMarshaller extends AbstractWSSecurityObjectMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        Timestamp timestamp = (Timestamp) xmlObject;
       
        if (!DatatypeHelper.isEmpty(timestamp.getWSUId())) {
            XMLHelper.marshallAttribute(Timestamp.WSU_ID_ATTR_NAME, timestamp.getWSUId(), domElement, true);
        }
       
        XMLHelper.marshallAttributeMap(timestamp.getUnknownAttributes(), domElement);
    }
View Full Code Here

TOP

Related Classes of org.opensaml.ws.wssecurity.Timestamp

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.