Package org.opensaml.saml2.core

Examples of org.opensaml.saml2.core.StatusCode


*/
public class StatusCodeMarshaller extends AbstractSAMLObjectMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject samlElement, Element domElement) throws MarshallingException {
        StatusCode statusCode = (StatusCode) samlElement;

        QName statusValue = statusCode.getValue();
        if (statusValue != null) {
            domElement.setAttributeNS(null, StatusCode.VALUE_ATTRIB_NAME, XMLHelper.qnameToContentString(statusValue));
        }
    }
View Full Code Here


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

        StatusCode statusCode = (StatusCode) parentSAMLObject;

        if (childSAMLObject instanceof StatusCode) {
            statusCode.setStatusCode((StatusCode) childSAMLObject);
        } else {
            super.processChildElement(parentSAMLObject, childSAMLObject);
        }

    }
View Full Code Here

    }

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

        StatusCode statusCode = (StatusCode) samlObject;

        if (attribute.getName().equals(StatusCode.VALUE_ATTRIB_NAME)) {
            statusCode.setValue(XMLHelper.getAttributeValueAsQName(attribute));
        } else {
            super.processAttribute(samlObject, attribute);
        }
    }
View Full Code Here

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

        StatusCode statusCode = (StatusCode) parentSAMLObject;

        if (childSAMLObject instanceof StatusCode) {
            statusCode.setStatusCode((StatusCode) childSAMLObject);
        } else {
            super.processChildElement(parentSAMLObject, childSAMLObject);
        }

    }
View Full Code Here

    }

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

        StatusCode statusCode = (StatusCode) samlObject;

        if (attribute.getName().equals(StatusCode.VALUE_ATTRIB_NAME)) {
            statusCode.setValue(XMLHelper.getAttributeValueAsQName(attribute));
        } else {
            super.processAttribute(samlObject, attribute);
        }
    }
View Full Code Here

        super(SAMLConstants.SAML10P_NS, StatusCode.DEFAULT_ELEMENT_LOCAL_NAME);
    }

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject samlElement, Element domElement) throws MarshallingException {
        StatusCode statusCode = (StatusCode) samlElement;

        QName statusValue = statusCode.getValue();
        if (statusValue != null) {
            domElement.setAttributeNS(null, StatusCode.VALUE_ATTRIB_NAME, XMLHelper.qnameToContentString(statusValue));
        }
    }
View Full Code Here

     * @param statusMessage the status message
     * @return the status
     */
    protected final Status newStatus(final QName codeValue, final String statusMessage) {
        final Status status = newSamlObject(Status.class);
        final StatusCode code = newSamlObject(StatusCode.class);
        code.setValue(codeValue);
        status.setStatusCode(code);
        if (statusMessage != null) {
            final StatusMessage message = newSamlObject(StatusMessage.class);
            message.setMessage(statusMessage);
            status.setStatusMessage(message);
View Full Code Here

  protected SAMLMessageDecoder samlMessageDecoder() {
    final BasicParserPool basicParserPool = new BasicParserPool();
    basicParserPool.setMaxPoolSize(maxParserPoolSize);

    return new HTTPPostSimpleSignDecoder(basicParserPool);
  }
View Full Code Here

                authDecision.setDecision(
                    transformDecisionType(decisionStatementBean.getDecision())
                );

                for (ActionBean actionBean : decisionStatementBean.getActions()) {
                    Action actionElement = createSamlAction(actionBean);
                    authDecision.getActions().add(actionElement);
                }

                if (decisionStatementBean.getEvidence() instanceof Evidence) {                                   
                    authDecision.setEvidence((Evidence)decisionStatementBean.getEvidence());
View Full Code Here

    public static Action createSamlAction(ActionBean actionBean) {
        if (actionElementBuilder == null) {
            actionElementBuilder = (SAMLObjectBuilder<Action>)
                builderFactory.getBuilder(Action.DEFAULT_ELEMENT_NAME);
        }
        Action actionElement = actionElementBuilder.buildObject();
        actionElement.setNamespace(actionBean.getActionNamespace());
        if (actionBean.getActionNamespace() == null) {
            actionElement.setNamespace("urn:oasis:names:tc:SAML:1.0:action:rwedc-negation");
        }
        actionElement.setAction(actionBean.getContents());

        return actionElement;
    }
View Full Code Here

TOP

Related Classes of org.opensaml.saml2.core.StatusCode

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.