Package org.alfresco.filesys.repo
Class ContentSearchContext
java.lang.Object
org.alfresco.jlan.server.filesys.SearchContext
org.alfresco.filesys.repo.ContentSearchContext
- All Implemented Interfaces:
InFlightCorrectable
- Direct Known Subclasses:
DotDotContentSearchContext
public class ContentSearchContext
extends org.alfresco.jlan.server.filesys.SearchContext
implements InFlightCorrectable
Wrapper for simple XPath searche against the node service. The search is performed statically
outside the context instance itself - this class merely maintains the state of the search
results across client connections.
- Author:
- Derek Hulley
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedContentSearchContext(CifsHelper cifsHelper, List<NodeRef> results, String searchStr, String relPath, boolean lockedFilesAsOffline) Class constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected StringReturn the relative path that is being searchedprotected intReturn the results array sizeintReturn the resume id for the current file/directory in the search.booleanDetermine if there are more files for the active search.booleannextFileInfo(org.alfresco.jlan.server.filesys.FileInfo info) Return file information for the next file in the active search.Return the file name of the next file in the active search.booleanrestartAt(int resumeIdParameter) Restart the current search at the specified file.booleanrestartAt(org.alfresco.jlan.server.filesys.FileInfo info) Restart a search at the specified resume point.voidsetInFlightCorrector(InFlightCorrector corrector) toString()Return the search as a stringMethods inherited from class org.alfresco.jlan.server.filesys.SearchContext
closeSearch, getDotDotInfo, getDotInfo, getFlags, getMaximumFiles, getSearchString, getTreeId, hasDotFiles, numberOfEntries, setFlags, setMaximumFiles, setSearchString, setTreeId
-
Field Details
-
LinkFileSize
public static final int LinkFileSize- See Also:
-
-
Constructor Details
-
ContentSearchContext
protected ContentSearchContext(CifsHelper cifsHelper, List<NodeRef> results, String searchStr, String relPath, boolean lockedFilesAsOffline) Class constructor- Parameters:
cifsHelper- Filesystem helper classresults- List of file/folder nodes that match the search patternsearchStr- Search pathrelPath- Relative path being searched
-
-
Method Details
-
setInFlightCorrector
- Specified by:
setInFlightCorrectorin interfaceInFlightCorrectable
-
toString
Return the search as a string- Overrides:
toStringin classorg.alfresco.jlan.server.filesys.SearchContext- Returns:
- String
-
getResumeId
public int getResumeId()Return the resume id for the current file/directory in the search.- Specified by:
getResumeIdin classorg.alfresco.jlan.server.filesys.SearchContext- Returns:
- int
-
hasMoreFiles
public boolean hasMoreFiles()Determine if there are more files for the active search.- Specified by:
hasMoreFilesin classorg.alfresco.jlan.server.filesys.SearchContext- Returns:
- boolean
-
nextFileInfo
public boolean nextFileInfo(org.alfresco.jlan.server.filesys.FileInfo info) Return file information for the next file in the active search. Returns false if the search is complete.- Specified by:
nextFileInfoin classorg.alfresco.jlan.server.filesys.SearchContext- Parameters:
info- FileInfo to return the file information.- Returns:
- true if the file information is valid, else false
-
nextFileName
Return the file name of the next file in the active search. Returns null is the search is complete.- Specified by:
nextFileNamein classorg.alfresco.jlan.server.filesys.SearchContext- Returns:
- String
-
restartAt
public boolean restartAt(org.alfresco.jlan.server.filesys.FileInfo info) Restart a search at the specified resume point.- Specified by:
restartAtin classorg.alfresco.jlan.server.filesys.SearchContext- Parameters:
info- File to restart the search at.- Returns:
- true if the search can be restarted, else false.
-
restartAt
public boolean restartAt(int resumeIdParameter) Restart the current search at the specified file.- Specified by:
restartAtin classorg.alfresco.jlan.server.filesys.SearchContext- Returns:
- true if the search can be restarted, else false.
-
getRelativePath
Return the relative path that is being searched- Returns:
- String
-
getResultsSize
protected int getResultsSize()Return the results array size- Returns:
- int
-