1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.saml1.core.impl;
18
19 import java.util.ArrayList;
20 import java.util.Collections;
21 import java.util.List;
22
23 import org.opensaml.saml1.core.Action;
24 import org.opensaml.saml1.core.AuthorizationDecisionStatement;
25 import org.opensaml.saml1.core.DecisionTypeEnumeration;
26 import org.opensaml.saml1.core.Evidence;
27 import org.opensaml.xml.XMLObject;
28 import org.opensaml.xml.util.XMLObjectChildrenList;
29
30
31
32
33 public class AuthorizationDecisionStatementImpl extends SubjectStatementImpl implements AuthorizationDecisionStatement {
34
35
36 private String resource;
37
38
39 private DecisionTypeEnumeration decision;
40
41
42 private final XMLObjectChildrenList<Action> actions;
43
44
45 private Evidence evidence;
46
47
48
49
50
51
52
53
54 protected AuthorizationDecisionStatementImpl(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 resource;
62 }
63
64
65 public void setResource(String resource) {
66 this.resource = prepareForAssignment(this.resource, resource);
67 }
68
69
70 public DecisionTypeEnumeration getDecision() {
71 return decision;
72 }
73
74
75 public void setDecision(DecisionTypeEnumeration decision) {
76 this.decision = prepareForAssignment(this.decision, decision);
77 }
78
79
80 public List<Action> getActions() {
81 return actions;
82 }
83
84
85 public Evidence getEvidence() {
86 return evidence;
87 }
88
89
90 public void setEvidence(Evidence evidence) throws IllegalArgumentException {
91 this.evidence = prepareForAssignment(this.evidence, evidence);
92 }
93
94
95 public List<XMLObject> getOrderedChildren() {
96 List<XMLObject> list = new ArrayList<XMLObject>(actions.size() + 2);
97
98 if (super.getOrderedChildren() != null) {
99 list.addAll(super.getOrderedChildren());
100 }
101 list.addAll(actions);
102 if (evidence != null) {
103 list.add(evidence);
104 }
105 if (list.size() == 0) {
106 return null;
107 }
108 return Collections.unmodifiableList(list);
109 }
110 }