org.alfresco.filesys.avm
Class AVMSearchContext

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

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

AVM Filesystem Search Context Class

Contains the details of a wildcard folder search.


Constructor Summary
AVMSearchContext(AVMNodeDescriptor[] fileList, int attrib, org.alfresco.jlan.util.WildCard filter, java.lang.String parentPath, 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 isReadOnly()
          Check if all files/folders returned by the search should be marked as read-only
 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.
 void setReadOnly(boolean readOnly)
          Set all files/folders returned by the search as read-only
 
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

AVMSearchContext

public AVMSearchContext(AVMNodeDescriptor[] fileList,
                        int attrib,
                        org.alfresco.jlan.util.WildCard filter,
                        java.lang.String parentPath,
                        boolean readOnly)
Class constructor

Parameters:
fileList - SortedMap
attrib - int
filter - WildCard
parentPath - 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.

isReadOnly

public final boolean isReadOnly()
Check if all files/folders returned by the search should be marked as read-only

Returns:
boolean

setReadOnly

public final void setReadOnly(boolean readOnly)
Set all files/folders returned by the search as read-only

Parameters:
readOnly - boolean


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