1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.opensaml.saml2.core.impl;
22
23 import java.util.ArrayList;
24 import java.util.Collections;
25 import java.util.List;
26
27 import org.opensaml.saml2.core.Action;
28 import org.opensaml.saml2.core.AuthzDecisionQuery;
29 import org.opensaml.saml2.core.Evidence;
30 import org.opensaml.xml.XMLObject;
31 import org.opensaml.xml.util.XMLObjectChildrenList;
32
33
34
35
36 public class AuthzDecisionQueryImpl extends SubjectQueryImpl implements AuthzDecisionQuery {
37
38
39 private String resource;
40
41
42 private Evidence evidence;
43
44
45 private final XMLObjectChildrenList<Action> actions;
46
47
48
49
50
51
52
53
54 protected AuthzDecisionQueryImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
55 super(namespaceURI, elementLocalName, namespacePrefix);
56 actions = new XMLObjectChildrenList<Action>(this);
57 }
58
59
60 public String getResource() {
61 return this.resource;
62 }
63
64
65 public void setResource(String newResource) {
66 this.resource = prepareForAssignment(this.resource, newResource);
67 }
68
69
70 public List<Action> getActions() {
71 return actions;
72 }
73
74
75 public Evidence getEvidence() {
76 return this.evidence;
77 }
78
79
80 public void setEvidence(Evidence newEvidence) {
81 this.evidence = prepareForAssignment(this.evidence, newEvidence);
82 }
83
84
85 public List<XMLObject> getOrderedChildren() {
86 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
87
88 if (super.getOrderedChildren() != null) {
89 children.addAll(super.getOrderedChildren());
90 }
91 children.addAll(actions);
92 if (evidence != null) {
93 children.add(evidence);
94 }
95
96 if (children.size() == 0) {
97 return null;
98 }
99
100 return Collections.unmodifiableList(children);
101 }
102 }