Package org.opensaml.xacml.policy

Examples of org.opensaml.xacml.policy.EnvironmentMatchType


        super();
    }

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        EnvironmentMatchType matchType = (EnvironmentMatchType) xmlObject;

        if (!DatatypeHelper.isEmpty(matchType.getMatchId())) {
            domElement.setAttribute(EnvironmentMatchType.MATCH_ID_ATTRIB_NAME, matchType.getMatchId());
        }
    }
View Full Code Here


    }

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        if (attribute.getLocalName().equals(EnvironmentMatchType.MATCH_ID_ATTRIB_NAME)) {
            EnvironmentMatchType matchType = (EnvironmentMatchType) xmlObject;
            matchType.setMatchId(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
        } else {
            super.processAttribute(xmlObject, attribute);
        }
    }
View Full Code Here

    }

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
            throws UnmarshallingException {
        EnvironmentMatchType matchType = (EnvironmentMatchType) parentXMLObject;
        if (childXMLObject instanceof AttributeValueType) {
            matchType.setAttributeValue((AttributeValueType) childXMLObject);
        } else if (childXMLObject instanceof AttributeDesignatorType) {
            matchType.setEnvironmentAttributeDesignator((AttributeDesignatorType) childXMLObject);
        } else if (childXMLObject instanceof AttributeSelectorType) {
            matchType.setAttributeSelector((AttributeSelectorType) childXMLObject);
        } else {
            super.processChildElement(parentXMLObject, childXMLObject);
        }
    }
View Full Code Here

       
        if (attribute == null) {
            return null;
        }
       
        EnvironmentMatchType environmentMatch = build();
       
        AttributeDesignatorType designator = AttributeDesignatorHelper.build(
                AttributeDesignatorType.ACTION_ATTRIBUTE_DESIGNATOR_ELEMENT_NAME, attribute);
       
        String attributeDataType =  (matchFunctionDatatype == null ?attribute.getDataType() : matchFunctionDatatype);
       
        AttributeValueType policyAttributeValue = PolicyAttributeValueHelper.build(attributeDataType,
            CtxAttributeTypeHelper.getFirstValue(attribute));
       
        environmentMatch.setEnvironmentAttributeDesignator(designator);
        environmentMatch.setAttributeValue(policyAttributeValue);
        environmentMatch.setMatchId(matchFunctionId);
       
        return environmentMatch;
    }
View Full Code Here

TOP

Related Classes of org.opensaml.xacml.policy.EnvironmentMatchType

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.