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