1
2
3
4
5
6
7
8
9
10
11
12
13 package org.abstracthorizon.danube.webdav.xml.dav.response.properties;
14
15 import org.abstracthorizon.danube.http.Status;
16 import org.abstracthorizon.danube.webdav.util.NamespacesProvider;
17 import org.abstracthorizon.danube.webdav.xml.common.XMLUtils;
18 import org.abstracthorizon.danube.webdav.xml.dav.DAVNamespace;
19
20 import java.io.PrintWriter;
21
22
23
24
25
26
27 public class DisplayName extends ResponseProperty {
28
29
30 public static final String TAG_NAME = "displayname";
31
32
33 protected String displayName;
34
35
36
37
38
39 public DisplayName(Status status) {
40 super(status);
41 }
42
43
44
45
46
47 public DisplayName(String displayName) {
48 this.displayName = displayName;
49 }
50
51
52
53
54
55 public String getDisplayName() {
56 return displayName;
57 }
58
59 @Override
60 public String toString() {
61 return "DisplayName[" + displayName + "]";
62 }
63
64
65
66
67
68
69 public void render(PrintWriter writer, NamespacesProvider provider) {
70 writer.println(XMLUtils.createTag(provider, DAVNamespace.DAV_NAMESPACE_URL, TAG_NAME, displayName));
71 }
72
73 }