Package org.opensaml.xacml.policy

Examples of org.opensaml.xacml.policy.ResourceMatchType


        super();
    }

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

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


    }

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        if (attribute.getLocalName().equals(ResourceMatchType.MATCH_ID_ATTRIB_NAME)) {
            ResourceMatchType matchType = (ResourceMatchType) 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 {
        ResourceMatchType matchType = (ResourceMatchType) parentXMLObject;
       
        if (childXMLObject instanceof AttributeValueType) {
            matchType.setAttributeValue((AttributeValueType) childXMLObject);
        } else if (childXMLObject instanceof AttributeSelectorType) {
            matchType.setAttributeSelector((AttributeSelectorType) childXMLObject);
        } else if (childXMLObject.getElementQName().equals(
                AttributeDesignatorType.RESOURCE_ATTRIBUTE_DESIGNATOR_ELEMENT_NAME)) {
            matchType.setResourceAttributeDesignator((AttributeDesignatorType) childXMLObject);
        } else {
            super.processChildElement(parentXMLObject, childXMLObject);
        }
    }
View Full Code Here

        if (attribute == null) {
            return null;
        }

        ResourceMatchType resourceMatch = build();

        AttributeDesignatorType designator = AttributeDesignatorHelper.build(
                AttributeDesignatorType.RESOURCE_ATTRIBUTE_DESIGNATOR_ELEMENT_NAME, attribute);

        String attributeDataType =  (matchFunctionDatatype == null ?attribute.getDataType() : matchFunctionDatatype);
       
        AttributeValueType policyAttributeValue = PolicyAttributeValueHelper.build(attributeDataType,
                CtxAttributeTypeHelper.getFirstValue(attribute));

        resourceMatch.setResourceAttributeDesignator(designator);
        resourceMatch.setAttributeValue(policyAttributeValue);
        resourceMatch.setMatchId(matchFunctionId);

        return resourceMatch;
    }
View Full Code Here

TOP

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

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.