Package org.opensaml.samlext.saml2delrestrict

Examples of org.opensaml.samlext.saml2delrestrict.Delegate


*/
public class DelegateUnmarshaller extends AbstractSAMLObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
        Delegate delegate = (Delegate) samlObject;
       
        String attrName = attribute.getLocalName();
        if (Delegate.CONFIRMATION_METHOD_ATTRIB_NAME.equals(attrName)) {
            delegate.setConfirmationMethod(attribute.getValue());
        } else if (Delegate.DELEGATION_INSTANT_ATTRIB_NAME.equals(attrName)) {
            delegate.setDelegationInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC()));
        } else {
            super.processAttribute(samlObject, attribute);
        }
    }
View Full Code Here


    }

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
            throws UnmarshallingException {
        Delegate delegate = (Delegate) parentSAMLObject;
       
        if (childSAMLObject instanceof BaseID) {
            delegate.setBaseID((BaseID) childSAMLObject);
        } else if (childSAMLObject instanceof NameID) {
            delegate.setNameID((NameID) childSAMLObject);
        } else if (childSAMLObject instanceof EncryptedID) {
            delegate.setEncryptedID((EncryptedID) childSAMLObject);
        } else {
            super.processChildElement(parentSAMLObject, childSAMLObject);
        }
    }
View Full Code Here

*/
public class DelegateMarshaller extends AbstractSAMLObjectMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        Delegate delegate = (Delegate) xmlObject;
       
        if (delegate.getDelegationInstant() != null) {
            String delInstant = Configuration.getSAMLDateFormatter().print(delegate.getDelegationInstant());
            domElement.setAttributeNS(null, Delegate.DELEGATION_INSTANT_ATTRIB_NAME, delInstant);
        }
        if (!DatatypeHelper.isEmpty(delegate.getConfirmationMethod())) {
            domElement.setAttributeNS(null, Delegate.CONFIRMATION_METHOD_ATTRIB_NAME, delegate.getConfirmationMethod());
        }
       
        super.marshallAttributes(xmlObject, domElement);
    }
View Full Code Here

TOP

Related Classes of org.opensaml.samlext.saml2delrestrict.Delegate

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.