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.joda.time.DateTime;
24 import org.opensaml.common.SAMLVersion;
25 import org.opensaml.common.impl.AbstractSignableSAMLObject;
26 import org.opensaml.saml1.core.RequestAbstractType;
27 import org.opensaml.saml1.core.RespondWith;
28 import org.opensaml.xml.XMLObject;
29 import org.opensaml.xml.util.XMLObjectChildrenList;
30
31
32
33
34 public abstract class RequestAbstractTypeImpl extends AbstractSignableSAMLObject implements RequestAbstractType {
35
36
37 private String id;
38
39
40 private DateTime issueInstant;
41
42
43 private SAMLVersion version;
44
45
46 public final XMLObjectChildrenList<RespondWith> respondWiths;
47
48
49
50
51
52
53
54
55 protected RequestAbstractTypeImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
56 super(namespaceURI, elementLocalName, namespacePrefix);
57 version = SAMLVersion.VERSION_11;
58 respondWiths = new XMLObjectChildrenList<RespondWith>(this);
59 }
60
61
62 public String getID() {
63 return id;
64 }
65
66
67 public void setID(String id) {
68 String oldID = this.id;
69 this.id = prepareForAssignment(this.id, id);
70 registerOwnID(oldID, this.id);
71 }
72
73
74 public int getMajorVersion() {
75 return version.getMajorVersion();
76 }
77
78
79 public int getMinorVersion() {
80 return version.getMinorVersion();
81 }
82
83
84 public void setVersion(SAMLVersion newVersion) {
85 version = prepareForAssignment(version, newVersion);
86 }
87
88
89 public DateTime getIssueInstant() {
90 return issueInstant;
91 }
92
93
94 public void setIssueInstant(DateTime instant) {
95 this.issueInstant = prepareForAssignment(this.issueInstant, instant);
96 }
97
98
99 public List<RespondWith> getRespondWiths() {
100 return respondWiths;
101 }
102
103
104 public String getSignatureReferenceID(){
105 return id;
106 }
107
108
109 public List<XMLObject> getOrderedChildren() {
110 List<XMLObject> children = new ArrayList<XMLObject>();
111
112 children.addAll(respondWiths);
113
114 if(getSignature() != null){
115 children.add(getSignature());
116 }
117
118 return Collections.unmodifiableList(children);
119 }
120 }