public abstract class SearchContext extends 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 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 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(String path,
int attr,
int level)
Set the search parameters
|
protected void |
setSearchPath(String path)
Set the search path
|
abstract void |
StartSearch(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 IOException, SMBException
IOException - If an I/O error occurs.SMBException - If an SMB level error occurspublic abstract String nextFileName() throws IOException, SMBException
IOException - If an I/O error occurs.SMBException - If an SMB level error occurspublic abstract void StartSearch(String fname, int attr, int level) throws 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.FileInfoLevelIOException - If an I/O error occurs.SMBException - If an SMB level error occursprotected final DiskSession getSession()
protected final String getSearchPath()
protected final int getSearchAttributes()
protected final int getInformationLevel()
protected final void setSearchPath(String path)
path - Stringprotected final void setSearchAttributes(int attr)
attr - intprotected final void setInformationLevel(int level)
level - intprotected final void setSearchParameters(String path, int attr, int level)
path - Stringattr - intlevel - intCopyright © 2005–2020 Alfresco Software. All rights reserved.