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