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 javax.xml.namespace.QName;
24
25 import org.opensaml.common.impl.AbstractSAMLObject;
26 import org.opensaml.saml1.core.StatusCode;
27 import org.opensaml.xml.Namespace;
28 import org.opensaml.xml.XMLObject;
29
30
31
32
33 public class StatusCodeImpl extends AbstractSAMLObject implements StatusCode {
34
35
36 private QName value = null;
37
38
39 private StatusCode childStatusCode = null;
40
41
42
43
44
45
46
47
48 protected StatusCodeImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
49 super(namespaceURI, elementLocalName, namespacePrefix);
50 }
51
52
53 public QName getValue() {
54 return value;
55 }
56
57
58 public void setValue(QName newValue) {
59 this.value = prepareForAssignment(this.value, newValue);
60 if(value != null){
61 addNamespace(new Namespace(value.getNamespaceURI(), value.getPrefix()));
62 }
63 }
64
65
66 public StatusCode getStatusCode() {
67 return childStatusCode;
68 }
69
70
71 public void setStatusCode(StatusCode statusCode) {
72 childStatusCode = prepareForAssignment(childStatusCode, statusCode);
73 }
74
75
76 public List<XMLObject> getOrderedChildren() {
77 if (childStatusCode != null) {
78 ArrayList<XMLObject> contents = new ArrayList<XMLObject>(1);
79 contents.add(childStatusCode);
80 return Collections.unmodifiableList(contents);
81 } else {
82 return null;
83 }
84 }
85 }