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 java.util.ArrayList;
22 import java.util.Collections;
23 import java.util.List;
24
25 import org.opensaml.saml2.core.impl.RequestAbstractTypeImpl;
26 import org.opensaml.xacml.XACMLObject;
27 import org.opensaml.xacml.ctx.RequestType;
28 import org.opensaml.xacml.policy.IdReferenceType;
29 import org.opensaml.xacml.profile.saml.XACMLPolicyQueryType;
30 import org.opensaml.xml.XMLObject;
31 import org.opensaml.xml.util.IndexedXMLObjectChildrenList;
32
33
34 public class XACMLPolicyQueryTypeImpl extends RequestAbstractTypeImpl implements XACMLPolicyQueryType {
35
36
37 private IndexedXMLObjectChildrenList<XACMLObject> choiceGroup;
38
39
40
41
42
43
44
45
46 public XACMLPolicyQueryTypeImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
47 super(namespaceURI, elementLocalName, namespacePrefix);
48 setElementNamespacePrefix(namespacePrefix);
49 choiceGroup = new IndexedXMLObjectChildrenList<XACMLObject>(this);
50 }
51
52
53 public List<RequestType> getRequests() {
54 return (List<RequestType>) choiceGroup.subList(RequestType.DEFAULT_ELEMENT_NAME);
55 }
56
57
58 public List<IdReferenceType> getPolicySetIdReferences() {
59 return (List<IdReferenceType>) choiceGroup.subList(IdReferenceType.POLICY_SET_ID_REFERENCE_ELEMENT_NAME);
60 }
61
62
63 public List<IdReferenceType> getPolicyIdReferences() {
64 return (List<IdReferenceType>) choiceGroup.subList(IdReferenceType.POLICY_ID_REFERENCE_ELEMENT_NAME);
65 }
66
67
68 public List<XMLObject> getOrderedChildren() {
69
70 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
71
72 if(super.getOrderedChildren() != null){
73 children.addAll(super.getOrderedChildren());
74 }
75
76 children.addAll(choiceGroup);
77
78 return Collections.unmodifiableList(children);
79 }
80 }