1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.wss4j.dom;
21
22
23
24
25
26
27
28
29
30 import java.util.List;
31
32 import javax.xml.namespace.QName;
33 import org.w3c.dom.Element;
34
35 public class WSDataRef {
36
37
38
39
40 private String wsuId;
41
42
43
44
45 private QName name;
46
47
48
49
50 private String xpath;
51
52
53
54
55 private String algorithm;
56
57
58
59
60 private List<String> transformAlgorithms;
61
62
63
64
65
66 private String digestAlgorithm;
67
68
69
70
71
72 private byte[] digestValue;
73
74 private boolean content;
75
76
77
78
79 private Element protectedElement;
80
81
82
83
84 private boolean attachment;
85
86
87
88
89 private Element encryptedElement;
90
91
92
93
94 public String getWsuId() {
95 return wsuId;
96 }
97
98
99
100
101 public void setWsuId(String wsuId) {
102 this.wsuId = wsuId;
103 }
104
105
106
107
108 public QName getName() {
109 return name;
110 }
111
112
113
114
115 public void setName(QName name) {
116 this.name = name;
117 }
118
119
120
121
122 public void setProtectedElement(Element element) {
123 protectedElement = element;
124 String prefix = element.getPrefix();
125 if (prefix == null) {
126 name =
127 new QName(
128 element.getNamespaceURI(), element.getLocalName()
129 );
130 } else {
131 name =
132 new QName(
133 element.getNamespaceURI(), element.getLocalName(), prefix
134 );
135 }
136 }
137
138
139
140
141 public Element getProtectedElement() {
142 return protectedElement;
143 }
144
145
146
147
148 public String getXpath() {
149 return xpath;
150 }
151
152
153
154
155 public void setXpath(String xpath) {
156 this.xpath = xpath;
157 }
158
159
160
161
162 public boolean isContent() {
163 return content;
164 }
165
166
167
168
169 public void setContent(boolean content) {
170 this.content = content;
171 }
172
173
174
175
176 public String getAlgorithm() {
177 return algorithm;
178 }
179
180
181
182
183 public void setAlgorithm(String algo) {
184 algorithm = algo;
185 }
186
187
188
189
190
191 public String getDigestAlgorithm() {
192 return this.digestAlgorithm;
193 }
194
195
196
197
198
199 public void setDigestAlgorithm(String digestAlgorithm) {
200 this.digestAlgorithm = digestAlgorithm;
201 }
202
203
204
205
206 public void setTransformAlgorithms(List<String> transformAlgorithms) {
207 this.transformAlgorithms = transformAlgorithms;
208 }
209
210
211
212
213 public List<String> getTransformAlgorithms() {
214 return transformAlgorithms;
215 }
216
217 public boolean isAttachment() {
218 return attachment;
219 }
220
221 public void setAttachment(boolean attachment) {
222 this.attachment = attachment;
223 }
224
225 public byte[] getDigestValue() {
226 return digestValue;
227 }
228
229 public void setDigestValue(byte[] digestValue) {
230 this.digestValue = digestValue;
231 }
232
233 public Element getEncryptedElement() {
234 return encryptedElement;
235 }
236
237 public void setEncryptedElement(Element encryptedElement) {
238 this.encryptedElement = encryptedElement;
239 }
240 }