1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package edu.internet2.middleware.shibboleth.common.xmlobject.impl;
19
20 import javax.xml.namespace.QName;
21
22 import org.opensaml.xml.schema.impl.XSAnyImpl;
23
24 import edu.internet2.middleware.shibboleth.common.xmlobject.ShibbolethScopedValue;
25
26
27
28
29 public class ShibbolethScopedValueImpl extends XSAnyImpl implements ShibbolethScopedValue {
30
31
32 private String scope;
33
34
35 private String scopeAttributeName;
36
37
38
39
40
41
42
43
44 protected ShibbolethScopedValueImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
45 super(namespaceURI, elementLocalName, namespacePrefix);
46 }
47
48
49 public String getScope() {
50 return scope;
51 }
52
53
54 public String getScopeAttributeName() {
55 return scopeAttributeName;
56 }
57
58
59 public void setScope(String newScope) {
60 scope = prepareForAssignment(scope, newScope);
61 if (scope != null && scopeAttributeName != null) {
62 getUnknownAttributes().put(new QName(scopeAttributeName), scope);
63 }
64 }
65
66
67 public void setScopeAttributeName(String newScopeAttributeName) {
68 if (scopeAttributeName != null) {
69 QName oldName = new QName(scopeAttributeName);
70 if (getUnknownAttributes().containsKey(oldName)) {
71 getUnknownAttributes().remove(oldName);
72 }
73 }
74
75 scopeAttributeName = prepareForAssignment(scopeAttributeName, newScopeAttributeName);
76
77 if (scope != null) {
78 getUnknownAttributes().put(new QName(scopeAttributeName), scope);
79 }
80 }
81
82
83 public String getValue() {
84 return getTextContent();
85 }
86
87
88 public void setValue(String newValue) {
89 setTextContent(newValue);
90 }
91
92 }