|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection java.util.AbstractList java.util.ArrayList org.alltimeflashdreamer.filelister.FileLister
Title: FileLister
Description: This class is the core of the FileLister application. It searches the file system downwards, starting with the root directory defined in the FileListerConfig object. The found files (which may be directories too, of course) are collected, if they match the search string's restrictions.
Organization: All Time Flash Dreamer
Nested Class Summary |
Nested classes inherited from class java.util.AbstractList |
|
Field Summary | |
(package private) static boolean |
ISWINDOWS
often used value to find out whether the platform is Windows or not |
static String |
VERSIONNUMBER
Defines the version number of the FileLister (is shown in the JSP output) |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
(package private) |
FileLister(FileListerConfig fileListerConfig,
boolean bQuietMode)
If it's the directory input mode, it's checked whether the researching of the given directory is allowed again or not, depending on the index aging parameter of the property file, compared with the "last indexed" value and the current time. |
Method Summary | |
(package private) int |
getChildCount(FileListerEntry fileListerEntry)
If the given FileListerEntry represents a file, 0 is returned, else the index is queried for the child count of the given directory. |
(package private) ArrayList |
getFileListerEntriesForZip()
Returns an list containing the selected FileListerEntries within the FileLister or null, if none are selected. |
(package private) long |
getLastIndexed()
Returns the indexing time (as long) of the directory node entry of the user's search directory. |
(package private) static String |
getRealPath(File dir)
Returns either the canonical path or, in case of a windows drive letter, the absolute path of the given directory. |
int |
getResultCount()
Returns the total result count of the query that initialized the current instance of FileLister. |
(package private) int |
getTotalDumpedEntryCount()
Returns the total amount of dumped FileListerEntry objects. |
FileListerEntry[] |
getVisibleFileListerEntries()
Returns the sublist of visible FileListerEntry objects (in the GUI) in of the whole result set received from the underlying query. |
(package private) void |
prepareEntries(int iStartIndex)
Makes sure that there are enough entries buffered in the memory to allow easy navigation, with only a few reloads. |
(package private) void |
processMultiSelectForZip(String sZipMode)
Loops over all lists stored in this class and over all FileListerEntry instances within those lists and selects or unselects all the entries at once, but only if the given string equals "selectall" or "deselectall". |
(package private) void |
reloadIndex()
Reloads the index from the database, very much like during construction. |
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, remove, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList |
Field Detail |
public static final String VERSIONNUMBER
static final boolean ISWINDOWS
Constructor Detail |
FileLister(FileListerConfig fileListerConfig, boolean bQuietMode) throws FileListerException
fileListerConfig
- the previously initialized config objectbQuietMode
- whether to print messages to the System.out or
not (true means "print no messages at all")
FileListerException
- each possible exception that may occur during
the listing-of-files processMethod Detail |
static String getRealPath(File dir) throws IOException
dir
- the directory to get the real path of
IOException
- thrown on canonical file accessvoid reloadIndex() throws FileListerException
FileListerException
- if some problem occurred during reloadinglong getLastIndexed()
public int getResultCount()
public FileListerEntry[] getVisibleFileListerEntries()
void prepareEntries(int iStartIndex) throws FileListerException
iStartIndex
- the start index of the position where the user
wants to see entries; this start index is used to load the files
FileListerException
- thrown if there were problems loading files into
the listArrayList getFileListerEntriesForZip()
int getChildCount(FileListerEntry fileListerEntry) throws FileListerException
fileListerEntry
- the entry to get the child count of
FileListerException
- wrapped SQLException, in caseint getTotalDumpedEntryCount()
void processMultiSelectForZip(String sZipMode)
sZipMode
- the string describing whether to select or unselect all the
registered entries
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |