Package com.jalios.jcms.policy
Class BasicWebdavPolicyFilter
- java.lang.Object
-
- com.jalios.jcms.policy.AbstractPolicyFilter
-
- com.jalios.jcms.policy.BasicWebdavPolicyFilter
-
- All Implemented Interfaces:
PluginComponent
,PolicyFilter
,WebdavPolicyFilter
,java.lang.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
- Author:
- Jean-Philippe Encausse
- See Also:
WebdavPolicyFilter
-
-
Field Summary
-
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order
-
-
Constructor Summary
Constructors Constructor Description BasicWebdavPolicyFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleWebdavHeaders(java.util.Map headers, WebdavContext ctxt)
This method is called by WebdavManager to handle headers set to all Webdav response.void
handleWebdavProperties(java.util.Set propAllSet)
This method is called by WebdavContext to add properties to Set of properties used by PROPFIND method.java.lang.String
handleWebdavProperty(java.lang.String property, java.lang.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 configurationboolean
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
-
-
-
-
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 interfacePluginComponent
- 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(java.util.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 interfaceWebdavPolicyFilter
- Parameters:
headers
- a Map of headers to handlectxt
- the WebdavContext- See Also:
WebdavPolicyFilter.handleWebdavHeaders(Map, WebdavContext)
-
handleWebdavProperties
public void handleWebdavProperties(java.util.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 interfaceWebdavPolicyFilter
- Parameters:
propAllSet
- the Set of properties- See Also:
WebdavPolicyFilter.handleWebdavProperties(Set)
-
handleWebdavProperty
public java.lang.String handleWebdavProperty(java.lang.String property, java.lang.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 interfaceWebdavPolicyFilter
- Parameters:
property
- the working propertyres
- the working webdavctxt
- 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 interfaceWebdavPolicyFilter
- Parameters:
jcms
- the choice of JCMSres
- the WebdavResourcectxt
- the WebdavContext- Returns:
- boolean true to filter thr given resource
- See Also:
WebdavPolicyFilter.silentFilterResource(boolean, WebdavResource, WebdavContext)
-
-