smbdav.filters
Class ServerFilter
java.lang.Object
smbdav.filters.ServerFilter
- All Implemented Interfaces:
- DavenportFileFilter, jcifs.smb.SmbFileFilter
- public class ServerFilter
- extends java.lang.Object
- implements DavenportFileFilter
This class filters resources to permit only resources from a specific list
of servers. Note that the parent workgroup names may need to be specified
(if users need to browse down to the server level from the parent).
This can be used in combination with a NotFilter
to exclude a
specific set of servers.
This filter accepts a "servers" property, containing a whitespace-separated
list of server/workgroup names. The "acceptRoot" property indicates
whether this filter should accept the "smb://
" resource.
Note that if "acceptRoot" is set to "false", the SMB root will not be
browseable; inversely, if a NotFilter
is applied, the
SMB root will only be accessible if "acceptRoot" is set to "false".
- Author:
- Eric Glass
Method Summary |
boolean |
accept(jcifs.smb.SmbFile file)
|
void |
destroy()
Destroys the filter instance. |
void |
init(java.util.Properties properties)
Initializes the filter with the provided properties. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServerFilter
public ServerFilter()
init
public void init(java.util.Properties properties)
throws java.lang.Exception
- Description copied from interface:
DavenportFileFilter
- Initializes the filter with the provided properties.
- Specified by:
init
in interface DavenportFileFilter
- Parameters:
properties
- The filter's initialization properties.
- Throws:
java.lang.Exception
- If an error occurs during initialization.
destroy
public void destroy()
- Description copied from interface:
DavenportFileFilter
- Destroys the filter instance.
- Specified by:
destroy
in interface DavenportFileFilter
accept
public boolean accept(jcifs.smb.SmbFile file)
throws jcifs.smb.SmbException
- Specified by:
accept
in interface jcifs.smb.SmbFileFilter
- Throws:
jcifs.smb.SmbException
Copyright © 2004 Eric Glass