org.alfresco.filesys.avm
Class AVMSingleFileSearchContext

java.lang.Object
  extended by org.alfresco.jlan.server.filesys.SearchContext
      extended by org.alfresco.filesys.avm.AVMSingleFileSearchContext

public class AVMSingleFileSearchContext
extends org.alfresco.jlan.server.filesys.SearchContext

AVM Filesystem Single File Search Context Class

Contains the details of a non-wildcard file/folder search, where there is only one result to return.


Constructor Summary
AVMSingleFileSearchContext(AVMNodeDescriptor fileDetails, java.lang.String relPath, boolean readOnly)
          Class constructor
 
Method Summary
 int getResumeId()
          Return the resume id for the current file/directory in the search.
 boolean hasMoreFiles()
          Determine if there are more files for the active search.
 boolean nextFileInfo(org.alfresco.jlan.server.filesys.FileInfo info)
          Return file information for the next file in the active search.
 java.lang.String nextFileName()
          Return the file name of the next file in the active search.
 int numberOfEntries()
          Return the total number of file entries for this search if known, else return -1
 boolean restartAt(org.alfresco.jlan.server.filesys.FileInfo info)
          Restart the current search at the specified file.
 boolean restartAt(int resumeId)
          Restart a search at the specified resume point.
 
Methods inherited from class org.alfresco.jlan.server.filesys.SearchContext
closeSearch, getDotDotInfo, getDotInfo, getFlags, getMaximumFiles, getSearchString, getTreeId, hasDotFiles, setFlags, setMaximumFiles, setSearchString, setTreeId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AVMSingleFileSearchContext

public AVMSingleFileSearchContext(AVMNodeDescriptor fileDetails,
                                  java.lang.String relPath,
                                  boolean readOnly)
Class constructor

Parameters:
fileDetails - AVMNodeDescriptor
relPath - String
readOnly - boolean
Method Detail

hasMoreFiles

public boolean hasMoreFiles()
Determine if there are more files for the active search.

Specified by:
hasMoreFiles in class org.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:
nextFileInfo in class org.alfresco.jlan.server.filesys.SearchContext
Parameters:
info - FileInfo to return the file information.
Returns:
true if the file information is valid, else false

nextFileName

public java.lang.String nextFileName()
Return the file name of the next file in the active search. Returns null is the search is complete.

Specified by:
nextFileName in class org.alfresco.jlan.server.filesys.SearchContext
Returns:
String

numberOfEntries

public int numberOfEntries()
Return the total number of file entries for this search if known, else return -1

Overrides:
numberOfEntries in class org.alfresco.jlan.server.filesys.SearchContext
Returns:
int

getResumeId

public int getResumeId()
Return the resume id for the current file/directory in the search.

Specified by:
getResumeId in class org.alfresco.jlan.server.filesys.SearchContext
Returns:
int

restartAt

public boolean restartAt(int resumeId)
Restart a search at the specified resume point.

Specified by:
restartAt in class org.alfresco.jlan.server.filesys.SearchContext
Parameters:
resumeId - Resume point id.
Returns:
true if the search can be restarted, else false.

restartAt

public boolean restartAt(org.alfresco.jlan.server.filesys.FileInfo info)
Restart the current search at the specified file.

Specified by:
restartAt in class org.alfresco.jlan.server.filesys.SearchContext
Parameters:
info - File to restart the search at.
Returns:
true if the search can be restarted, else false.


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.