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.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   * This class models WebDAV's source response tag
24   *
25   * @author Daniel Sendula
26   */
27  public class Source extends ResponseProperty {
28  
29      /** Tag name */
30      public static final String TAG_NAME = "source";
31  
32      /**
33       * Constructor
34       * @param status status
35       */
36      public Source(Status status) {
37          super(status);
38      }
39  
40      @Override
41      public String toString() {
42          return "Source[]";
43      }
44  
45      /**
46       * Renders the tag
47       * @param writer writer
48       * @param provider namespace provider
49       */
50      public void render(PrintWriter writer, NamespacesProvider provider) {
51          writer.println(XMLUtils.createEmptyTag(provider, DAVNamespace.DAV_NAMESPACE_URL, TAG_NAME));
52      }
53  }