Package org.opensaml.xacml.policy

Examples of org.opensaml.xacml.policy.AttributeAssignmentType


    }

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

        AttributeAssignmentType attrib = (AttributeAssignmentType) samlObject;

        if (attribute.getLocalName().equals(AttributeAssignmentType.ATTR_ID_ATTRIB_NAME)) {
            attrib.setAttributeId(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
        } else{         
          super.processAttribute(samlObject, attribute);
        }
    }
View Full Code Here


        super();
    }

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

        if (!DatatypeHelper.isEmpty(attributeAssignment.getAttributeId())) {
            domElement.setAttributeNS(null, AttributeAssignmentType.ATTR_ID_ATTRIB_NAME, attributeAssignment
                    .getAttributeId());
        }
        if(!DatatypeHelper.isEmpty(attributeAssignment.getDataType())){
          super.marshallAttributes(samlElement, domElement);
        }
       
    }
View Full Code Here

        obligation.setFulfillOn(effect);
        return obligation;
    }
   
    public static void addAttributeAssignment(ObligationType obligation, String attributeId, String value, String dataType) {
        AttributeAssignmentType attributeAssignment = AttributeAssignmentHelper.build(attributeId, value, dataType);
        obligation.getAttributeAssignments().add(attributeAssignment);
    }
View Full Code Here

    private static final AttributeAssignmentHelper instance = new AttributeAssignmentHelper();

    private AttributeAssignmentHelper() {}

    public static AttributeAssignmentType build(String attributeId, String value, String dataType) {
        AttributeAssignmentType attributeAssignment = (AttributeAssignmentType) builderFactory.getBuilder(elementQName).buildObject(elementQName);
        attributeAssignment.setAttributeId(attributeId);
        attributeAssignment.setValue(value);
        attributeAssignment.setDataType(dataType);
        return attributeAssignment;
    }
View Full Code Here

TOP

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

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.