com.xpn.xwiki.plugin.webdav.utils
Class XWikiDavUtils

java.lang.Object
  extended by com.xpn.xwiki.plugin.webdav.utils.XWikiDavUtils

public final class XWikiDavUtils
extends java.lang.Object

Holds all utility methods / variable for the webdav module.

Version:
$Id: XWikiDavUtils.java 32446 2010-11-04 08:55:46Z vmassol $.

Nested Class Summary
static interface XWikiDavUtils.BaseViews
          An interface for collecting all base views.
 
Field Summary
static java.lang.String URL_SEPARATOR
          Path separator character.
static java.lang.String VIRTUAL_DIRECTORY_POSTFIX
          Post-fix used to indicate the beginning of a virtual grouping.
static java.lang.String VIRTUAL_DIRECTORY_PREFIX
          Prefix used to indicate the beginning of a virtual grouping.
static java.lang.String XWIKI_ATTACHMENT_SIGNATURE
          Signature used to identify an attachment url.
static java.lang.String XWIKI_WEBDAV_SIGNATURE
          Signature used to identify a webdav url.
 
Method Summary
static java.lang.String getDavURL(Document doc, Attachment attachment)
           
static int getSubViewNameLength(int totalDocumentCount)
          Calculates the length of a subview (for groupings) given the total document count.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URL_SEPARATOR

public static final java.lang.String URL_SEPARATOR
Path separator character.

See Also:
Constant Field Values

VIRTUAL_DIRECTORY_PREFIX

public static final java.lang.String VIRTUAL_DIRECTORY_PREFIX
Prefix used to indicate the beginning of a virtual grouping.

See Also:
Constant Field Values

VIRTUAL_DIRECTORY_POSTFIX

public static final java.lang.String VIRTUAL_DIRECTORY_POSTFIX
Post-fix used to indicate the beginning of a virtual grouping.

See Also:
Constant Field Values

XWIKI_ATTACHMENT_SIGNATURE

public static final java.lang.String XWIKI_ATTACHMENT_SIGNATURE
Signature used to identify an attachment url.

See Also:
Constant Field Values

XWIKI_WEBDAV_SIGNATURE

public static final java.lang.String XWIKI_WEBDAV_SIGNATURE
Signature used to identify a webdav url.

See Also:
Constant Field Values
Method Detail

getSubViewNameLength

public static int getSubViewNameLength(int totalDocumentCount)
Calculates the length of a subview (for groupings) given the total document count.

Parameters:
totalDocumentCount - Total document count.
Returns:
The calculated view name length.

getDavURL

public static java.lang.String getDavURL(Document doc,
                                         Attachment attachment)
Parameters:
doc - The Document having the attachment.
attachment - The Attachment.
Returns:
The webdav url corresponding to the attachment.


Copyright © 2004-2011 XWiki. All Rights Reserved.