Examples of AttributeConsumingService


Examples of org.opensaml.saml2.metadata.AttributeConsumingService

public class AttributeConsumingServiceUnmarshaller extends AbstractSAMLObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
            throws UnmarshallingException {
        AttributeConsumingService service = (AttributeConsumingService) parentSAMLObject;

        if (childSAMLObject instanceof ServiceName) {
            service.getNames().add((ServiceName) childSAMLObject);
        } else if (childSAMLObject instanceof ServiceDescription) {
            service.getDescriptions().add((ServiceDescription) childSAMLObject);
        } else if (childSAMLObject instanceof RequestedAttribute) {
            service.getRequestAttributes().add((RequestedAttribute) childSAMLObject);
        } else {
            super.processChildElement(parentSAMLObject, childSAMLObject);
        }
    }
View Full Code Here

Examples of org.opensaml.saml2.metadata.AttributeConsumingService

        }
    }

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
        AttributeConsumingService service = (AttributeConsumingService) samlObject;

        if (attribute.getLocalName().equals(AttributeConsumingService.INDEX_ATTRIB_NAME)) {
            service.setIndex(Integer.valueOf(attribute.getValue()));
        } else if (attribute.getLocalName().equals(AttributeConsumingService.IS_DEFAULT_ATTRIB_NAME)) {
            service.setIsDefault(XSBooleanValue.valueOf(attribute.getValue()));
        } else {
            super.processAttribute(samlObject, attribute);
        }
    }
View Full Code Here

Examples of org.opensaml.saml2.metadata.AttributeConsumingService

            return null;
        }

        log.debug("AttributeConsumingService index was specified: {}", index != null);

        AttributeConsumingService acs = null;
        if (index != null) {
            acs = selectByIndex(candidates);
            if (acs == null && isOnBadIndexUseDefault()) {
                acs = selectDefault(candidates);
            }
View Full Code Here

Examples of org.opensaml.saml2.metadata.AttributeConsumingService

     * @param candidates the list of candiate services
     * @return the selected candidate or null
     */
    private AttributeConsumingService selectDefault(List<AttributeConsumingService> candidates) {
        log.debug("Selecting default AttributeConsumingService");
        AttributeConsumingService firstNoDefault = null;
        for (AttributeConsumingService attribCS : candidates) {
            if (attribCS.isDefault()) {
                log.debug("Selected AttributeConsumingService with explicit isDefault of true");
                return attribCS;
            }
View Full Code Here

Examples of org.opensaml.saml2.metadata.AttributeConsumingService

*/
public class AttributeConsumingServiceMarshaller extends AbstractSAMLObjectMarshaller {

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

        domElement.setAttributeNS(null, AttributeConsumingService.INDEX_ATTRIB_NAME, Integer.toString(service
                .getIndex()));

        if (service.isDefaultXSBoolean() != null) {
            domElement.setAttributeNS(null, AttributeConsumingService.IS_DEFAULT_ATTRIB_NAME, service
                    .isDefaultXSBoolean().toString());
        }
    }
View Full Code Here

Examples of org.opensaml.saml2.metadata.AttributeConsumingService

    }

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
            throws UnmarshallingException {
        AttributeConsumingService service = (AttributeConsumingService) parentSAMLObject;

        if (childSAMLObject instanceof ServiceName) {
            service.getNames().add((ServiceName) childSAMLObject);
        } else if (childSAMLObject instanceof ServiceDescription) {
            service.getDescriptions().add((ServiceDescription) childSAMLObject);
        } else if (childSAMLObject instanceof RequestedAttribute) {
            service.getRequestAttributes().add((RequestedAttribute) childSAMLObject);
        } else {
            super.processChildElement(parentSAMLObject, childSAMLObject);
        }
    }
View Full Code Here

Examples of org.opensaml.saml2.metadata.AttributeConsumingService

        }
    }

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
        AttributeConsumingService service = (AttributeConsumingService) samlObject;

        if (attribute.getLocalName().equals(AttributeConsumingService.INDEX_ATTRIB_NAME)) {
            service.setIndex(Integer.valueOf(attribute.getValue()));
        } else if (attribute.getLocalName().equals(AttributeConsumingService.IS_DEFAULT_ATTRIB_NAME)) {
            service.setIsDefault(XSBooleanValue.valueOf(attribute.getValue()));
        } else {
            super.processAttribute(samlObject, attribute);
        }
    }
View Full Code Here

Examples of org.opensaml.saml2.metadata.AttributeConsumingService

        super(namespaceURI, elementLocalName);
    }

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

        domElement.setAttributeNS(null, AttributeConsumingService.INDEX_ATTRIB_NAME, Integer.toString(service
                .getIndex()));

        if (service.isDefaultXSBoolean() != null) {
            domElement.setAttributeNS(null, AttributeConsumingService.IS_DEFAULT_ATTRIB_NAME,
                    service.isDefaultXSBoolean().toString());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.