1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.opensaml.xacml.policy.impl;
20
21 import org.opensaml.xacml.policy.AttributeAssignmentType;
22 import org.opensaml.xml.XMLObject;
23 import org.opensaml.xml.io.UnmarshallingException;
24 import org.opensaml.xml.util.DatatypeHelper;
25 import org.w3c.dom.Attr;
26
27
28 public class AttributeAssignmentTypeUnmarshaller extends AttributeValueTypeUnmarshaller {
29
30
31 public AttributeAssignmentTypeUnmarshaller() {
32 super();
33 }
34
35
36 protected void processElementContent(XMLObject samlObject, String elementContent) {
37 super.processElementContent(samlObject, elementContent);
38 }
39
40
41 protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
42
43 AttributeAssignmentType attrib = (AttributeAssignmentType) samlObject;
44
45 if (attribute.getLocalName().equals(AttributeAssignmentType.ATTR_ID_ATTRIB_NAME)) {
46 attrib.setAttributeId(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
47 }
48 else{
49 super.processAttribute(samlObject, attribute);
50 }
51 }
52
53
54 protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
55 throws UnmarshallingException {
56 super.processChildElement(parentXMLObject, childXMLObject);
57 }
58 }