Package org.opensaml.saml2.metadata

Examples of org.opensaml.saml2.metadata.ServiceDescription


        if (DatatypeHelper.isEmpty(supportedProtocol)) {
            log.debug("Supported protocol was null, skipping search for role.");
            return null;
        }

        RoleDescriptor role = doGetRole(entityID, roleName, supportedProtocol);
        if (role == null) {
            log.debug("Metadata document does not contain a role of type {} supporting protocol {} for entity {}",
                    new Object[] { roleName, supportedProtocol, entityID });
            return null;
        }
View Full Code Here


                    entityID);
            return null;
        }

        Iterator<RoleDescriptor> rolesItr = roles.iterator();
        RoleDescriptor role = null;
        while (rolesItr.hasNext()) {
            role = rolesItr.next();
            if (role != null && role.isSupportedProtocol(supportedProtocol)) {
                return role;
            }
        }

        return null;
View Full Code Here

     * {@inheritDoc}
     */
    protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
        QName attribName = XMLHelper.getNodeQName(attribute);
        if (LangBearing.XML_LANG_ATTR_NAME.equals(attribName)) {
            ServiceDescription description = (ServiceDescription) samlObject;

            LocalizedString descStr = description.getDescription();
            if (descStr == null) {
                descStr = new LocalizedString();
            }

            descStr.setLanguage(attribute.getValue());
            description.setDescription(descStr);
        }
    }
View Full Code Here

        }
    }

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

        LocalizedString descStr = description.getDescription();
        if (descStr == null) {
            descStr = new LocalizedString();
        }

        descStr.setLocalizedString(elementContent);
        description.setDescription(descStr);
    }
View Full Code Here

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

        if (description.getDescription() != null) {
            Attr attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), SAMLConstants.XML_NS,
                    ServiceDescription.LANG_ATTRIB_NAME, SAMLConstants.XML_PREFIX);
            attribute.setValue(description.getDescription().getLanguage());
            domElement.setAttributeNodeNS(attribute);
        }
    }
View Full Code Here

        }
    }

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

        if (description.getDescription() != null) {
            XMLHelper.appendTextContent(domElement, description.getDescription().getLocalString());
        }
    }
View Full Code Here

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

        if (description.getDescription() != null) {
            Attr attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), SAMLConstants.XML_NS,
                    ServiceDescription.LANG_ATTRIB_NAME, SAMLConstants.XML_PREFIX);
            attribute.setValue(description.getDescription().getLanguage());
            domElement.setAttributeNodeNS(attribute);
        }
    }
View Full Code Here

        }
    }

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

        if (description.getDescription() != null) {
            XMLHelper.appendTextContent(domElement, description.getDescription().getLocalString());
        }
    }
View Full Code Here

     * {@inheritDoc}
     */
    protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
        if (attribute.getLocalName().equals(ServiceDescription.LANG_ATTRIB_NAME)
                && attribute.getNamespaceURI().equals(SAMLConstants.XML_NS)) {
            ServiceDescription description = (ServiceDescription) samlObject;

            LocalizedString descStr = description.getDescription();
            if (descStr == null) {
                descStr = new LocalizedString();
            }

            descStr.setLanguage(attribute.getValue());
            description.setDescription(descStr);
        }
    }
View Full Code Here

        }
    }

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

        LocalizedString descStr = description.getDescription();
        if (descStr == null) {
            descStr = new LocalizedString();
        }

        descStr.setLocalizedString(elementContent);
        description.setDescription(descStr);
    }
View Full Code Here

TOP

Related Classes of org.opensaml.saml2.metadata.ServiceDescription

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.