1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.saml2.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.saml2.core.BaseID;
25 import org.opensaml.saml2.core.EncryptedID;
26 import org.opensaml.saml2.core.LogoutRequest;
27 import org.opensaml.saml2.core.NameID;
28 import org.opensaml.saml2.core.SessionIndex;
29 import org.opensaml.xml.XMLObject;
30 import org.opensaml.xml.util.XMLObjectChildrenList;
31
32
33
34
35 public class LogoutRequestImpl extends RequestAbstractTypeImpl implements LogoutRequest {
36
37
38 private String reason;
39
40
41 private DateTime notOnOrAfter;
42
43
44 private BaseID baseID;
45
46
47 private NameID nameID;
48
49
50 private EncryptedID encryptedID;
51
52
53
54 private final XMLObjectChildrenList<SessionIndex> sessionIndexes;
55
56
57
58
59
60
61
62
63 protected LogoutRequestImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
64 super(namespaceURI, elementLocalName, namespacePrefix);
65 sessionIndexes = new XMLObjectChildrenList<SessionIndex>(this);
66 }
67
68
69 public String getReason() {
70 return this.reason;
71 }
72
73
74 public void setReason(String newReason) {
75 this.reason = prepareForAssignment(this.reason, newReason);
76 }
77
78
79 public DateTime getNotOnOrAfter() {
80 return this.notOnOrAfter;
81 }
82
83
84 public void setNotOnOrAfter(DateTime newNotOnOrAfter) {
85 this.notOnOrAfter = prepareForAssignment(this.notOnOrAfter, newNotOnOrAfter);
86 }
87
88
89 public BaseID getBaseID() {
90 return baseID;
91 }
92
93
94 public void setBaseID(BaseID newBaseID) {
95 baseID = prepareForAssignment(baseID, newBaseID);
96 }
97
98
99 public NameID getNameID() {
100 return nameID;
101 }
102
103
104 public void setNameID(NameID newNameID) {
105 nameID = prepareForAssignment(nameID, newNameID);
106 }
107
108
109 public EncryptedID getEncryptedID() {
110 return this.encryptedID;
111 }
112
113
114 public void setEncryptedID(EncryptedID newEncryptedID) {
115 this.encryptedID = prepareForAssignment(this.encryptedID, newEncryptedID);
116 }
117
118
119 public List<SessionIndex> getSessionIndexes() {
120 return sessionIndexes;
121 }
122
123
124 public List<XMLObject> getOrderedChildren() {
125 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
126
127 if (super.getOrderedChildren() != null) {
128 children.addAll(super.getOrderedChildren());
129 }
130
131 if (baseID != null) {
132 children.add(baseID);
133 }
134
135 if (nameID != null) {
136 children.add(nameID);
137 }
138
139 if (encryptedID != null) {
140 children.add(encryptedID);
141 }
142
143 children.addAll(sessionIndexes);
144
145 if (children.size() == 0) {
146 return null;
147 }
148
149 return Collections.unmodifiableList(children);
150 }
151 }