1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.opensaml.xacml.policy.impl;
19
20 import java.util.List;
21
22 import org.opensaml.xacml.policy.AttributeSelectorType;
23 import org.opensaml.xml.XMLObject;
24 import org.opensaml.xml.schema.XSBooleanValue;
25 import org.opensaml.xml.util.LazyList;
26 import org.opensaml.xml.validation.AbstractValidatingXMLObject;
27
28
29
30
31 public class AttributeSelectorTypeImpl extends AbstractValidatingXMLObject
32 implements AttributeSelectorType {
33
34
35 private String dataType;
36
37
38 private String requestContextPath;
39
40
41 private XSBooleanValue mustBePresentXS = null;
42
43
44
45
46
47
48
49
50
51
52
53 protected AttributeSelectorTypeImpl(String namespaceURI,
54 String elementLocalName, String namespacePrefix) {
55 super(namespaceURI, elementLocalName, namespacePrefix);
56 mustBePresentXS = XSBooleanValue.valueOf("false");
57 }
58
59
60 public String getDataType() {
61 return dataType;
62 }
63
64
65 public Boolean getMustBePresent() {
66 if (mustBePresentXS != null) {
67 return mustBePresentXS.getValue();
68 }
69 return Boolean.FALSE;
70 }
71
72
73 public XSBooleanValue getMustBePresentXSBoolean() {
74 return mustBePresentXS;
75 }
76
77
78 public String getRequestContextPath() {
79 return requestContextPath;
80 }
81
82
83 public void setDataType(String type) {
84 this.dataType = prepareForAssignment(this.dataType, type);
85 }
86
87
88 public void setMustBePresentXSBoolean(XSBooleanValue present) {
89 mustBePresentXS = prepareForAssignment(this.mustBePresentXS, present);
90 }
91
92
93 public void setMustBePresent(Boolean present) {
94 if (present != null) {
95 mustBePresentXS = prepareForAssignment(mustBePresentXS,
96 new XSBooleanValue(present, false));
97 } else {
98 mustBePresentXS = prepareForAssignment(mustBePresentXS, null);
99 }
100 }
101
102
103 public void setRequestContextPath(String path) {
104 requestContextPath = prepareForAssignment(this.requestContextPath, path);
105 }
106
107
108 public List<XMLObject> getOrderedChildren() {
109 return new LazyList<XMLObject>();
110 }
111
112 }