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.saml1.core.AuthenticationStatement;
25 import org.opensaml.saml1.core.AuthorityBinding;
26 import org.opensaml.saml1.core.SubjectLocality;
27 import org.opensaml.xml.XMLObject;
28 import org.opensaml.xml.util.XMLObjectChildrenList;
29
30
31
32
33 public class AuthenticationStatementImpl extends SubjectStatementImpl implements AuthenticationStatement {
34
35
36 private String authenticationMethod;
37
38
39 private DateTime authenticationInstant;
40
41
42 private SubjectLocality subjectLocality;
43
44
45 private final XMLObjectChildrenList<AuthorityBinding> authorityBindings;
46
47
48
49
50
51
52
53
54 protected AuthenticationStatementImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
55 super(namespaceURI, elementLocalName, namespacePrefix);
56 authorityBindings = new XMLObjectChildrenList<AuthorityBinding>(this);
57 }
58
59
60 public String getAuthenticationMethod() {
61 return authenticationMethod;
62 }
63
64
65 public void setAuthenticationMethod(String authenticationMethod) {
66 this.authenticationMethod = prepareForAssignment(this.authenticationMethod, authenticationMethod);
67 }
68
69
70 public DateTime getAuthenticationInstant() {
71 return authenticationInstant;
72 }
73
74
75 public void setAuthenticationInstant(DateTime authenticationInstant) {
76 this.authenticationInstant = prepareForAssignment(this.authenticationInstant, authenticationInstant);
77 }
78
79
80
81
82
83
84 public SubjectLocality getSubjectLocality() {
85 return subjectLocality;
86 }
87
88
89 public void setSubjectLocality(SubjectLocality subjectLocality) throws IllegalArgumentException {
90 this.subjectLocality = prepareForAssignment(this.subjectLocality, subjectLocality);
91 }
92
93
94 public List<AuthorityBinding> getAuthorityBindings() {
95 return authorityBindings;
96 }
97
98
99 public List<XMLObject> getOrderedChildren() {
100 List<XMLObject> list = new ArrayList<XMLObject>(authorityBindings.size() + 2);
101
102 if (super.getOrderedChildren() != null) {
103 list.addAll(super.getOrderedChildren());
104 }
105
106 if (subjectLocality != null) {
107 list.add(subjectLocality);
108 }
109
110 list.addAll(authorityBindings);
111
112 if (list.size() == 0) {
113 return null;
114 }
115
116 return Collections.unmodifiableList(list);
117 }
118 }