smbdav
Interface DavenportFileFilter

All Superinterfaces:
jcifs.smb.SmbFileFilter
All Known Implementing Classes:
AndFilter, NotFilter, OrFilter, ServerFilter

public interface DavenportFileFilter
extends jcifs.smb.SmbFileFilter

This extends the jcifs.smb.SmbFileFilter interface to allow for configuration via a set of initialization properties.

Filters are installed via the fileFilters parameter in the Davenport deployment descriptor. This parameter contains a list of whitespace-separated filter names; an additional parameter is specified for each name, indicating the filter class. If the filter class implements the smbdav.DavenportFileFilter interface, the instance will be initialized using a java.util.Properties object containing name-value pairs from the deployment descriptor, scoped by the filter's name. For example:

 <init-param>
     <param-name>fileFilters</param-name>
     <param-value>myFilter</param-value> 
 </init-param>
 <init-param>
     <param-name>myFilter</param-name>
     <param-value>com.foo.MyFilter</param-value> 
 </init-param>
 <init-param>
     <param-name>myFilter.myProperty</param-name>
     <param-value>myValue</param-value> 
 </init-param>
 

The fileFilters parameter declares a single filter, named "myFilter". The corresponding myFilter parameter specifies the filter class ("com.foo.MyFilter"). A java.util.Properties object will be created, containing the single property "myProperty" with value "myValue". Note that the filter's namespace prefix ("myFilter.") will be stripped off when the properties are delivered to the filter instance.

Author:
Eric Glass

Method Summary
 void destroy()
          Destroys the filter instance.
 void init(java.util.Properties properties)
          Initializes the filter with the provided properties.
 
Methods inherited from interface jcifs.smb.SmbFileFilter
accept
 

Method Detail

init

public void init(java.util.Properties properties)
          throws java.lang.Exception
Initializes the filter with the provided properties.

Parameters:
properties - The filter's initialization properties.
Throws:
java.lang.Exception - If an error occurs during initialization.

destroy

public void destroy()
Destroys the filter instance.



Copyright © 2004 Eric Glass