com.jalios.jcms.policy
Class BasicWebdavPolicyFilter

java.lang.Object
  extended by com.jalios.jcms.policy.AbstractPolicyFilter
      extended by com.jalios.jcms.policy.BasicWebdavPolicyFilter
All Implemented Interfaces:
PluginComponent, PolicyFilter, WebdavPolicyFilter, Comparable

public class BasicWebdavPolicyFilter
extends AbstractPolicyFilter
implements WebdavPolicyFilter, PluginComponent

This class is a hook to allow developer to add custom webdav behaviour without implementing a new WebdavContext, WebdavFileSystem, ...
To handle read/write/upload rights for webdav the class RightPolicy may be used with JcmsContext Webdav.

Since:
jcms-5.7.0
Version:
$Revision: 19809 $
Author:
Jean-Philippe Encausse
See Also:
WebdavPolicyFilter

Field Summary
 
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order
 
Fields inherited from interface com.jalios.jcms.plugin.PluginComponent
REVISION
 
Constructor Summary
BasicWebdavPolicyFilter()
           
 
Method Summary
 void handleWebdavHeaders(Map headers, WebdavContext ctxt)
          This method is called by WebdavManager to handle headers set to all Webdav response.
 void handleWebdavProperties(Set propAllSet)
          This method is called by WebdavContext to add properties to Set of properties used by PROPFIND method.
 String handleWebdavProperty(String property, String jcms, WebdavResource res, WebdavContext ctxt)
          This method handle response for the given property.
 boolean init(Plugin plugin)
          Initialize the component with the given plugin configuration
 boolean silentFilterResource(boolean jcms, WebdavResource res, WebdavContext ctxt)
          This method is called by CatWebdavFileSystem to ignore custom files like windows thumb.db...
 
Methods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
compareTo, equals, getOrder, setOrder
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

BasicWebdavPolicyFilter

public BasicWebdavPolicyFilter()
Method Detail

init

public boolean init(Plugin plugin)
Description copied from interface: PluginComponent
Initialize the component with the given plugin configuration

Specified by:
init in interface PluginComponent
Parameters:
plugin - the calling plugin
Returns:
true if the component has been correctly initialized.
Since:
jcms-5.7.1
See Also:
PluginComponent.init(Plugin)

handleWebdavHeaders

public void handleWebdavHeaders(Map headers,
                                WebdavContext ctxt)
Description copied from interface: WebdavPolicyFilter
This method is called by WebdavManager to handle headers set to all Webdav response.

Specified by:
handleWebdavHeaders in interface WebdavPolicyFilter
Parameters:
headers - a Map of headers to handle
ctxt - the WebdavContext
See Also:
WebdavPolicyFilter.handleWebdavHeaders(Map, WebdavContext)

handleWebdavProperties

public void handleWebdavProperties(Set propAllSet)
Description copied from interface: WebdavPolicyFilter
This method is called by WebdavContext to add properties to Set of properties used by PROPFIND method.

Specified by:
handleWebdavProperties in interface WebdavPolicyFilter
Parameters:
propAllSet - the Set of properties
See Also:
WebdavPolicyFilter.handleWebdavProperties(Set)

handleWebdavProperty

public String handleWebdavProperty(String property,
                                   String jcms,
                                   WebdavResource res,
                                   WebdavContext ctxt)
Description copied from interface: WebdavPolicyFilter
This method handle response for the given property. It is called before propert resolution. Custom properties must be declared using method WebdavPolicy#handleWebdavProperties(Set)

Specified by:
handleWebdavProperty in interface WebdavPolicyFilter
Parameters:
property - the working property
res - the working webdav
ctxt - the WebdavContext
Returns:
String the value to add to response
See Also:
WebdavPolicyFilter.handleWebdavProperty(String, String, WebdavResource, WebdavContext)

silentFilterResource

public boolean silentFilterResource(boolean jcms,
                                    WebdavResource res,
                                    WebdavContext ctxt)
Description copied from interface: WebdavPolicyFilter
This method is called by CatWebdavFileSystem to ignore custom files like windows thumb.db... that shound not be added to JCMS.

Specified by:
silentFilterResource in interface WebdavPolicyFilter
Parameters:
jcms - the choice of JCMS
res - the WebdavResource
ctxt - the WebdavContext
Returns:
boolean true to filter thr given resource
See Also:
WebdavPolicyFilter.silentFilterResource(boolean, WebdavResource, WebdavContext)


Copyright © 2001-2010 Jalios SA. All Rights Reserved.