1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.xacml.profile.saml.impl;
18
19 import java.util.ArrayList;
20 import java.util.Collections;
21 import java.util.List;
22
23 import org.opensaml.common.impl.AbstractSAMLObject;
24 import org.opensaml.xacml.policy.PolicySetType;
25 import org.opensaml.xacml.policy.PolicyType;
26 import org.opensaml.xacml.profile.saml.ReferencedPoliciesType;
27 import org.opensaml.xml.XMLObject;
28 import org.opensaml.xml.util.XMLObjectChildrenList;
29
30
31
32
33 public class ReferencedPoliciesTypeImpl extends AbstractSAMLObject implements ReferencedPoliciesType {
34
35
36 private XMLObjectChildrenList<PolicyType> policies;
37
38
39 private XMLObjectChildrenList<PolicySetType> policieSets;
40
41
42
43
44
45
46
47
48 protected ReferencedPoliciesTypeImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
49 super(namespaceURI, elementLocalName, namespacePrefix);
50 policies = new XMLObjectChildrenList<PolicyType>(this);
51 policieSets = new XMLObjectChildrenList<PolicySetType>(this);
52 }
53
54
55 public List<PolicySetType> getPolicySets() {
56 return policieSets;
57 }
58
59
60 public List<PolicyType> getPolicies() {
61 return policies;
62 }
63
64
65 public List<XMLObject> getOrderedChildren() {
66 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
67
68 if(!policies.isEmpty()) {
69 children.addAll(policies);
70 }
71 if(!policieSets.isEmpty()) {
72 children.addAll(policieSets);
73 }
74 return Collections.unmodifiableList(children);
75 }
76 }