Package org.opensaml.samlext.saml2mdui

Examples of org.opensaml.samlext.saml2mdui.Logo


public class LogoUnmarshaller extends AbstractSAMLObjectUnmarshaller {

   
    /** {@inheritDoc} */
    protected void processElementContent(XMLObject samlObject, String elementContent) {
        Logo logo = (Logo) samlObject;

        logo.setURL(elementContent);
    }
View Full Code Here


        logo.setURL(elementContent);
    }
   
    /**  {@inheritDoc} */
    protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
        Logo logo = (Logo) samlObject;

        if (attribute.getLocalName().equals(LangBearing.XML_LANG_ATTR_LOCAL_NAME)
                && SAMLConstants.XML_NS.equals(attribute.getNamespaceURI())) {
            logo.setXMLLang(attribute.getValue());
        } else if (attribute.getLocalName().equals(Logo.HEIGHT_ATTR_NAME)) {
            logo.setHeight(Integer.valueOf(attribute.getValue()));
        } else if (attribute.getLocalName().equals(Logo.WIDTH_ATTR_NAME)) {
            logo.setWidth(Integer.valueOf(attribute.getValue()));
        }
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException {
        Logo logo = (Logo) samlObject;

        if (logo.getXMLLang() != null) {
            Attr attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), SAMLConstants.XML_NS,
                    LangBearing.XML_LANG_ATTR_LOCAL_NAME, SAMLConstants.XML_PREFIX);
            attribute.setValue(logo.getXMLLang());
            domElement.setAttributeNodeNS(attribute);
        }
        if (logo.getHeight() != null) {
            domElement.setAttributeNS(null, Logo.HEIGHT_ATTR_NAME, logo.getHeight().toString());
        }
        if (logo.getWidth() != null) {
            domElement.setAttributeNS(null, Logo.WIDTH_ATTR_NAME, logo.getWidth().toString());
        }
    }
View Full Code Here

        }
    }

    /** {@inheritDoc} */
    protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException {
        Logo logo = (Logo) samlObject;

        if (logo.getURL() != null) {
            XMLHelper.appendTextContent(domElement, logo.getURL());
        }
    }
View Full Code Here

TOP

Related Classes of org.opensaml.samlext.saml2mdui.Logo

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.