public class JavaFileSearchContext extends SearchContext
Modifier | Constructor and Description |
---|---|
protected |
JavaFileSearchContext()
Class constructor
|
Modifier and Type | Method and Description |
---|---|
protected String[] |
getListForDirectory(File file)
Return the list of file names for a directory.
|
int |
getResumeId()
Return the resume id for the current file/directory.
|
boolean |
hasMoreFiles()
Determine if there are more files to return for this search
|
void |
initSearch(String path,
int attr)
Start a directory search.
|
protected boolean |
isDirectory(File file)
Test if the specified file is a file or directory.
|
protected boolean |
isSingleFileSearch()
Determine if this is a wildcard or single file/directory type search.
|
boolean |
isValidSearch()
Determine if the search is valid.
|
boolean |
nextFileInfo(FileInfo info)
Return the next file information for this search
|
String |
nextFileName()
Return the next file name for this search
|
int |
numberOfEntries()
Return the total number of file entries for this search if known, else return -1
|
boolean |
restartAt(FileInfo info)
Restart the file search at the specified file
|
boolean |
restartAt(int resumeId)
Restart the search at the specified resume point.
|
void |
setRelativePath(String relPath)
Set the share relative path to the search folder
|
protected void |
setSingleFileSearch(boolean single)
Set the wildcard/single file search flag.
|
closeSearch, getDotDotInfo, getDotInfo, getFlags, getMaximumFiles, getSearchString, getTreeId, hasDotFiles, setFlags, setMaximumFiles, setSearchString, setTreeId, toString
protected final String[] getListForDirectory(File file)
file
- java.io.Filepublic int getResumeId()
getResumeId
in class SearchContext
public boolean hasMoreFiles()
hasMoreFiles
in class SearchContext
public final void initSearch(String path, int attr) throws FileNotFoundException
path
- java.lang.Stringattr
- intFileNotFoundException
protected final boolean isDirectory(File file)
file
- java.io.Fileprotected final boolean isSingleFileSearch()
public final boolean isValidSearch()
public boolean nextFileInfo(FileInfo info)
nextFileInfo
in class SearchContext
info
- FileInfopublic String nextFileName()
nextFileName
in class SearchContext
public boolean restartAt(int resumeId)
restartAt
in class SearchContext
resumeId
- Resume point.public boolean restartAt(FileInfo info)
restartAt
in class SearchContext
info
- FileInfoprotected final void setSingleFileSearch(boolean single)
single
- booleanpublic int numberOfEntries()
numberOfEntries
in class SearchContext
public final void setRelativePath(String relPath)
relPath
- StringCopyright © 2005–2017 Alfresco Software. All rights reserved.