1
2
3
4
5
6
7
8
9
10
11
12
13 package org.abstracthorizon.danube.webdav.xml.dav.request.properties;
14
15 import org.abstracthorizon.danube.webdav.ResourceAdapter;
16 import org.abstracthorizon.danube.webdav.xml.XMLParserHandler;
17 import org.abstracthorizon.danube.webdav.xml.dav.response.properties.ResponseProperty;
18
19 import java.util.Locale;
20
21 import org.xml.sax.SAXException;
22
23
24
25
26
27
28 public class GetContentLanguage extends RequestProperty {
29
30
31 protected static String cachedContentLanguage = Locale.getDefault().getLanguage();
32
33
34 protected String contentLanguage;
35
36
37
38
39
40 public GetContentLanguage(XMLParserHandler parent) {
41 super(parent);
42 }
43
44 @Override
45 public Object end(Object current, String tag, String value) throws SAXException {
46 contentLanguage = value;
47 return super.end(current, tag, value);
48 }
49
50
51
52
53
54 public String getContentLanguage() {
55 return contentLanguage;
56 }
57
58
59
60
61
62
63
64 public ResponseProperty processResponse(ResourceAdapter adapter, Object resource) {
65 return new org.abstracthorizon.danube.webdav.xml.dav.response.properties.GetContentLanguage(cachedContentLanguage);
66 }
67
68 @Override
69 public String toString() {
70 return "GetContentLanguage[" + contentLanguage + "]";
71 }
72 }