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.joda.time.DateTime;
28 import org.opensaml.common.SAMLVersion;
29 import org.opensaml.common.impl.AbstractSignableSAMLObject;
30 import org.opensaml.saml2.common.Extensions;
31 import org.opensaml.saml2.core.Issuer;
32 import org.opensaml.saml2.core.Status;
33 import org.opensaml.saml2.core.StatusResponseType;
34 import org.opensaml.xml.XMLObject;
35
36
37
38
39 public abstract class StatusResponseTypeImpl extends AbstractSignableSAMLObject implements StatusResponseType {
40
41
42 private SAMLVersion version;
43
44
45 private String id;
46
47
48 private String inResponseTo;
49
50
51 private DateTime issueInstant;
52
53
54 private String destination;
55
56
57 private String consent;
58
59
60 private Issuer issuer;
61
62
63 private Extensions extensions;
64
65
66 private Status status;
67
68
69
70
71
72
73
74
75 protected StatusResponseTypeImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
76 super(namespaceURI, elementLocalName, namespacePrefix);
77 version = SAMLVersion.VERSION_20;
78 }
79
80
81 public SAMLVersion getVersion() {
82 return version;
83 }
84
85
86 public void setVersion(SAMLVersion newVersion) {
87 this.version = prepareForAssignment(this.version, newVersion);
88 }
89
90
91 public String getID() {
92 return this.id;
93 }
94
95
96 public void setID(String newID) {
97 String oldID = this.id;
98 this.id = prepareForAssignment(this.id, newID);
99 registerOwnID(oldID, this.id);
100 }
101
102
103 public String getInResponseTo() {
104 return this.inResponseTo;
105 }
106
107
108 public void setInResponseTo(String newInResponseTo) {
109 this.inResponseTo = prepareForAssignment(this.inResponseTo, newInResponseTo);
110 }
111
112
113 public DateTime getIssueInstant() {
114 return this.issueInstant;
115 }
116
117
118 public void setIssueInstant(DateTime newIssueInstant) {
119 this.issueInstant = prepareForAssignment(this.issueInstant, newIssueInstant);
120 }
121
122
123 public String getDestination() {
124 return this.destination;
125 }
126
127
128 public void setDestination(String newDestination) {
129 this.destination = prepareForAssignment(this.destination, newDestination);
130 }
131
132
133 public String getConsent() {
134 return this.consent;
135 }
136
137
138 public void setConsent(String newConsent) {
139 this.consent = prepareForAssignment(this.consent, newConsent);
140 }
141
142
143 public Issuer getIssuer() {
144 return this.issuer;
145 }
146
147
148 public void setIssuer(Issuer newIssuer) {
149 this.issuer = prepareForAssignment(this.issuer, newIssuer);
150 }
151
152
153 public Extensions getExtensions() {
154 return this.extensions;
155 }
156
157
158 public void setExtensions(Extensions newExtensions) {
159 this.extensions = prepareForAssignment(this.extensions, newExtensions);
160 }
161
162
163 public Status getStatus() {
164 return this.status;
165 }
166
167
168 public void setStatus(Status newStatus) {
169 this.status = prepareForAssignment(this.status, newStatus);
170 }
171
172
173 public String getSignatureReferenceID(){
174 return id;
175 }
176
177
178 public List<XMLObject> getOrderedChildren() {
179 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
180
181 if (issuer != null){
182 children.add(issuer);
183 }
184 if(getSignature() != null){
185 children.add(getSignature());
186 }
187 if (extensions != null){
188 children.add(extensions);
189 }
190 if (status != null){
191 children.add(status);
192 }
193
194 return Collections.unmodifiableList(children);
195 }
196 }