1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.opensaml.xacml.profile.saml.impl;
20
21 import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller;
22 import org.opensaml.xacml.policy.PolicySetType;
23 import org.opensaml.xacml.policy.PolicyType;
24 import org.opensaml.xacml.profile.saml.ReferencedPoliciesType;
25 import org.opensaml.xacml.profile.saml.XACMLPolicyStatementType;
26 import org.opensaml.xml.XMLObject;
27 import org.opensaml.xml.io.UnmarshallingException;
28
29
30
31
32 public class XACMLPolicyStatementTypeUnmarshaller extends AbstractSAMLObjectUnmarshaller {
33
34
35 protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
36 XACMLPolicyStatementType xacmlpolicystatement = (XACMLPolicyStatementType) parentObject;
37
38 if (childObject instanceof PolicyType) {
39 xacmlpolicystatement.getPolicies().add((PolicyType) childObject);
40 } else if (childObject instanceof PolicySetType) {
41 xacmlpolicystatement.getPolicySets().add((PolicySetType) childObject);
42 } else if (childObject instanceof ReferencedPoliciesType) {
43 xacmlpolicystatement.setReferencedPolicies((ReferencedPoliciesType) childObject);
44 } else {
45 super.processChildElement(parentObject, childObject);
46 }
47 }
48
49 }