View Javadoc

1   /*
2    * Copyright (c) 2006-2007 Creative Sphere Limited.
3    * All rights reserved. This program and the accompanying materials
4    * are made available under the terms of the Eclipse Public License v1.0
5    * which accompanies this distribution, and is available at
6    * http://www.eclipse.org/legal/epl-v10.html
7    *
8    * Contributors:
9    *
10   *   Creative Sphere - initial API and implementation
11   *
12   */
13  package org.abstracthorizon.danube.webdav.xml.dav;
14  
15  import org.abstracthorizon.danube.webdav.xml.XMLParserHandler;
16  import org.abstracthorizon.danube.webdav.xml.dav.request.KeepAlive;
17  import org.abstracthorizon.danube.webdav.xml.dav.request.LockEntry;
18  import org.abstracthorizon.danube.webdav.xml.dav.request.LockInfo;
19  import org.abstracthorizon.danube.webdav.xml.dav.request.LockScope;
20  import org.abstracthorizon.danube.webdav.xml.dav.request.LockType;
21  import org.abstracthorizon.danube.webdav.xml.dav.request.PropFind;
22  import org.abstracthorizon.danube.webdav.xml.dav.request.PropertyBehavior;
23  import org.abstracthorizon.danube.webdav.xml.dav.request.PropertyUpdate;
24  import org.abstracthorizon.danube.webdav.xml.dav.request.properties.CreationDate;
25  import org.abstracthorizon.danube.webdav.xml.dav.request.properties.DisplayName;
26  import org.abstracthorizon.danube.webdav.xml.dav.request.properties.GetContentLanguage;
27  import org.abstracthorizon.danube.webdav.xml.dav.request.properties.GetContentLength;
28  import org.abstracthorizon.danube.webdav.xml.dav.request.properties.GetContentType;
29  import org.abstracthorizon.danube.webdav.xml.dav.request.properties.GetETag;
30  import org.abstracthorizon.danube.webdav.xml.dav.request.properties.GetLastModified;
31  import org.abstracthorizon.danube.webdav.xml.dav.request.properties.LockDiscovery;
32  import org.abstracthorizon.danube.webdav.xml.dav.request.properties.ResourceType;
33  import org.abstracthorizon.danube.webdav.xml.dav.request.properties.Source;
34  import org.abstracthorizon.danube.webdav.xml.dav.request.properties.SupportedLock;
35  
36  /**
37   * Factory of DAV related objects. (See RFC-2518)
38   *
39   * @author Daniel Sendula
40   */
41  public class DAVFactory {
42  
43      public LockInfo newLockInfo(XMLParserHandler parent) {
44          return new LockInfo(parent, this);
45      }
46  
47      public LockEntry newLockEntry(XMLParserHandler parent) {
48          return new LockEntry(parent, this);
49      }
50  
51      public LockScope newLockScope(XMLParserHandler parent) {
52          return new LockScope(parent);
53      }
54  
55      public LockType newLockType(XMLParserHandler parent) {
56          return new LockType(parent);
57      }
58  
59      public PropertyBehavior newPropertyBehavior(XMLParserHandler parent) {
60          return new PropertyBehavior(parent, this);
61      }
62  
63      public KeepAlive newKeepAlive(XMLParserHandler parent) {
64          return new KeepAlive(parent);
65      }
66  
67      public PropertyUpdate newPropertyUpdate(XMLParserHandler parent) {
68          return new PropertyUpdate(parent, this);
69      }
70  
71      public PropFind newPropFind(XMLParserHandler parent) {
72          return new PropFind(parent, this);
73      }
74  
75      public RequestProp newProp(XMLParserHandler parent) {
76          return new RequestProp(parent, this);
77      }
78  
79      public RequestProp newSet(XMLParserHandler parent) {
80          return new RequestProp(parent, this, true);
81      }
82  
83      public RequestProp newRemove(XMLParserHandler parent) {
84          return new RequestProp(parent, this, false);
85      }
86  
87      public CreationDate newCreationDate(XMLParserHandler parent) {
88          return new CreationDate(parent);
89      }
90  
91      public DisplayName newDisplayName(XMLParserHandler parent) {
92          return new DisplayName(parent);
93      }
94  
95      public GetContentLanguage newGetContentLanguage(XMLParserHandler parent) {
96          return new GetContentLanguage(parent);
97      }
98  
99      public GetContentLength newGetContentLength(XMLParserHandler parent) {
100         return new GetContentLength(parent);
101     }
102 
103     public GetContentType newGetContentType(XMLParserHandler parent) {
104         return new GetContentType(parent);
105     }
106 
107     public GetETag newGetETag(XMLParserHandler parent) {
108         return new GetETag(parent);
109     }
110 
111     public GetLastModified newGetLastModified(XMLParserHandler parent) {
112         return new GetLastModified(parent);
113     }
114 
115     public LockDiscovery newLockDiscovery(XMLParserHandler parent) {
116         return new LockDiscovery(parent);
117     }
118 
119     public ResourceType newResourceType(XMLParserHandler parent) {
120         return new ResourceType(parent);
121     }
122 
123     public Source newSource(XMLParserHandler parent) {
124         return new Source(parent);
125     }
126 
127     public SupportedLock newSupportedLock(XMLParserHandler parent) {
128         return new SupportedLock(parent, this);
129     }
130 }