public abstract class SearchContext
extends java.lang.Object
Holds the details of an in progress folder search on a remote file server.
For large folder listings the search will be split up over a number of SMB/CIFS requests. The SearchContext derived class is used to hold the search state between requests to the remote file server.
| Modifier | Constructor and Description |
|---|---|
protected |
SearchContext(DiskSession sess)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
getInformationLevel()
Return the required information level
|
protected int |
getSearchAttributes()
Return the search attributes
|
protected java.lang.String |
getSearchPath()
Return the search path
|
protected DiskSession |
getSession()
Return the associated disk session
|
abstract FileInfo |
nextFileInfo()
Return the next file in this search as an SMB file information object.
|
abstract java.lang.String |
nextFileName()
Return the next file name in this search.
|
protected void |
setInformationLevel(int level)
Set the information level
|
protected void |
setSearchAttributes(int attr)
Set the search attributes
|
protected void |
setSearchParameters(java.lang.String path,
int attr,
int level)
Set the search parameters
|
protected void |
setSearchPath(java.lang.String path)
Set the search path
|
abstract void |
StartSearch(java.lang.String fname,
int attr,
int level)
Start a new search using the specified file name string and search attributes, return the
specified file information level
|
protected SearchContext(DiskSession sess)
sess - Disk session that the search is associated withpublic abstract FileInfo nextFileInfo() throws java.io.IOException, SMBException
java.io.IOException - If an I/O error occurs.SMBException - If an SMB level error occurspublic abstract java.lang.String nextFileName()
throws java.io.IOException,
SMBException
java.io.IOException - If an I/O error occurs.SMBException - If an SMB level error occurspublic abstract void StartSearch(java.lang.String fname,
int attr,
int level)
throws java.io.IOException,
SMBException
fname - File name string, may contain wilcards.attr - File attributes bit mask. @see org.alfresco.jlan.server.filesys.FileAttributelevel - File information level to return. @see org.alfresco.jlan.smb.FileInfoLeveljava.io.IOException - If an I/O error occurs.SMBException - If an SMB level error occursprotected final DiskSession getSession()
protected final java.lang.String getSearchPath()
protected final int getSearchAttributes()
protected final int getInformationLevel()
protected final void setSearchPath(java.lang.String path)
path - Stringprotected final void setSearchAttributes(int attr)
attr - intprotected final void setInformationLevel(int level)
level - intprotected final void setSearchParameters(java.lang.String path,
int attr,
int level)
path - Stringattr - intlevel - intCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.