1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.opensaml.xacml.ctx.impl;
20
21 import org.opensaml.xacml.ctx.DecisionType;
22 import org.opensaml.xacml.ctx.ResultType;
23 import org.opensaml.xacml.ctx.StatusType;
24 import org.opensaml.xacml.policy.ObligationsType;
25 import org.opensaml.xml.XMLObject;
26 import org.opensaml.xml.io.AbstractXMLObjectUnmarshaller;
27 import org.opensaml.xml.io.UnmarshallingException;
28 import org.w3c.dom.Attr;
29
30
31 public class ResultTypeUnmarshaller extends AbstractXMLObjectUnmarshaller {
32
33
34 public ResultTypeUnmarshaller() {
35 super();
36 }
37
38
39
40
41
42
43
44
45
46 protected ResultTypeUnmarshaller(String targetNamespaceURI, String targetLocalName) {
47 super(targetNamespaceURI, targetLocalName);
48 }
49
50
51 protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
52 ResultType result = (ResultType) samlObject;
53 if (attribute.getLocalName().equals(ResultType.RESOURCE_ID_ATTTRIB_NAME)) {
54 result.setResourceId(attribute.getValue());
55 }
56 }
57
58
59 protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
60 ResultType result = (ResultType) parentObject;
61
62 if (childObject instanceof ObligationsType) {
63 result.setObligations((ObligationsType) childObject);
64 }
65 if (childObject instanceof StatusType) {
66 result.setStatus((StatusType) childObject);
67 }
68 if (childObject instanceof DecisionType) {
69 result.setDecision((DecisionType) childObject);
70 }
71 }
72
73
74 protected void processElementContent(XMLObject xmlObject, String elementContent) {
75 }
76 }