com.bradmcevoy.http.webdav
Class WebDavResourceTypeHelper

java.lang.Object
  extended by com.bradmcevoy.http.webdav.WebDavResourceTypeHelper
All Implemented Interfaces:
ResourceTypeHelper

public class WebDavResourceTypeHelper
extends java.lang.Object
implements ResourceTypeHelper

Author:
brad

Constructor Summary
WebDavResourceTypeHelper()
           
 
Method Summary
 java.util.List<javax.xml.namespace.QName> getResourceTypes(Resource r)
          Get the resource types for a PROPFIND request.
 java.util.List<java.lang.String> getSupportedLevels(Resource r)
          Gets the list of supported level names for a resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebDavResourceTypeHelper

public WebDavResourceTypeHelper()
Method Detail

getResourceTypes

public java.util.List<javax.xml.namespace.QName> getResourceTypes(Resource r)
Description copied from interface: ResourceTypeHelper
Get the resource types for a PROPFIND request. E.g. collection, calendar, etc

Specified by:
getResourceTypes in interface ResourceTypeHelper
Returns:
- a list of QName's where the URI determines the namespace (E.g. DAV, http://calendarserver.org/ns/) and the name is the name of the resource type E.g. collection, calendar

getSupportedLevels

public java.util.List<java.lang.String> getSupportedLevels(Resource r)
Description copied from interface: ResourceTypeHelper
Gets the list of supported level names for a resource. This is to populate the DAV header, E.g. 1, access-control, calendar-access Typically, this list is determined by the type of the resource. Eg, if the resource supports locking then it returns 1, 2. Note that should **NOTE** be sensitive to authorisation or state. Ie a resource should have supported levels of 1,2 if it supports locking, regardless of whether or not the current user has permission to do so, and regardless of whether the resource can be locked in its current state.

Specified by:
getSupportedLevels in interface ResourceTypeHelper
Parameters:
r - - the resource
Returns:
- the list of supported level identifiers supported by the given resource


Copyright © 2011. All Rights Reserved.