org.alltimeflashdreamer.filelister
Class SearchParameters

java.lang.Object
  extended byorg.alltimeflashdreamer.filelister.SearchParameters
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DefineSearchParameters

public class SearchParameters
extends Object
implements Serializable

Title: SearchParameters

Description: This class stores the settings of one FileLister search parameter input/constellation. It is ready to be queried by SQLQueryBuilder or extending classes to build the appropriate SQL query string(s).

Organization: All Time Flash Dreamer

Version:
0.5.1
Author:
Copyright (c) 2002-2004 by Florian Steinsiepe
See Also:
Serialized Form

Field Summary
(package private) static int NOTSPECIFIED
          place holder value for "not specified" or "not defined" (this is -1)
 
Constructor Summary
(package private) SearchParameters()
          The empty constructor initializes the class with the application's default values.
(package private) SearchParameters(HttpServletRequest request)
          Constructor reads the URL input parameters regarding the search settings that need to be stored for each (consecutive) search.
 
Method Summary
(package private)  boolean getBooleanInput(String sURLInput)
          Returns true only if the given input equals "true", else false is returned.
(package private) static long getDefaultMultiplier()
          Returns the default multiplier value (1024, indicating KB).
(package private)  Date getEndingDate()
          Returns the current ending date or null, if not defined.
 String getEndingDateOutput()
          Returns the currently set ending date value, as a String which is empty in case no ending date size has yet been defined by the user.
(package private)  long getMaximumMultiplier()
          Returns the current maximum multiplier.
 String getMaximumMultiplierOutput()
          Returns the whole list of option tags to be filled into the maximum size's multiplier select box, having the correct entry selected.
(package private)  long getMaximumSize()
          Returns the current maximum size value or -1, if not defined.
 String getMaximumSizeOutput()
          Returns the currently set maximum value, as a String which is empty in case no maximum size has yet been defined by the user.
(package private)  long getMinimumMultiplier()
          Returns the current minimum multiplier value.
 String getMinimumMultiplierOutput()
          Returns the whole list of option tags to be filled into the minimum size's multiplier select box, having the correct entry selected.
(package private)  long getMinimumSize()
          Returns the current minimum size value or -1, if not defined.
 String getMinimumSizeOutput()
          Returns the currently set minimum value, as a String which is empty in case no minimum size has yet been defined by the user.
 String getSearchString()
          Returns the search string entered by the user for this specific search (cycle).
(package private)  Date getStartingDate()
          Returns the current starting date or null, if not defined.
 String getStartingDateOutput()
          Returns the currently set starting date value, as a String which is empty in case no starting date size has yet been defined by the user.
(package private)  void initializeDefaultValues()
          Initializes the class with default values (only).
 boolean isCaseSensitiveSearch()
          Returns whether the search string shall be handled in the case sensitive fashion or not.
 boolean isDirectoryListing()
          Tells whether the directories shall be listed.
 boolean isExactMatch()
          Returns whether the search string shall be matched exactly or not.
 boolean isFileListing()
          Tells whether the files shall be listed.
 boolean isListingAllEntries()
          Returns whether all contents shall be listed (client entered the empty string as the search string) or not.
 boolean isUsingRegExp()
          Returns whether the user selected to use regular expressions for the search string or not.
(package private)  void setCaseSensitiveSearch(boolean bCaseSensitiveSearch)
          Sets the bCaseSensitiveSearch attribute.
(package private)  void setDirectoryListing(boolean bListDirectories)
          Set the bListDirectories attribute.
(package private)  void setEndingDate(Date dtEndingDate)
          Sets the given ending date.
(package private)  void setExactMatch(boolean bExactMatch)
          Sets the bExactMatch attribute.
(package private)  void setFileListing(boolean bListFiles)
          Set the bListFiles attribute.
(package private)  void setMaximumMultiplier(long lMaximumMultiplier)
          Sets the current maximum multiplier value.
(package private)  void setMaximumSize(long lMaximumSize)
          Sets the given maximum size value or -1, if lower than -1.
(package private)  void setMinimumMultiplier(long lMinimumMultiplier)
          Sets the current minimum multiplier value.
(package private)  void setMinimumSize(long lMinimumSize)
          Sets the given minimum size value or -1, if lower than -1.
(package private)  void setSearchString(String sSearchString)
          Sets the sSearchString attribute.
(package private)  void setStartingDate(Date dtStartingDate)
          Sets the given starting date.
(package private)  void setUsingRegExp(boolean bUseRegExp)
          Sets the bUseRegExp attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOTSPECIFIED

static final int NOTSPECIFIED
place holder value for "not specified" or "not defined" (this is -1)

See Also:
Constant Field Values
Constructor Detail

SearchParameters

SearchParameters(HttpServletRequest request)
           throws FileListerException
Constructor reads the URL input parameters regarding the search settings that need to be stored for each (consecutive) search.

Parameters:
request - where to read the URL input from
Throws:
FileListerException - wrapper for each detected "bad input"

SearchParameters

SearchParameters()
The empty constructor initializes the class with the application's default values.

Method Detail

isDirectoryListing

public boolean isDirectoryListing()
Tells whether the directories shall be listed.

Returns:
list the directories?

isFileListing

public boolean isFileListing()
Tells whether the files shall be listed.

Returns:
list the files?

isUsingRegExp

public boolean isUsingRegExp()
Returns whether the user selected to use regular expressions for the search string or not.

Returns:
user's using regexp?

isCaseSensitiveSearch

public boolean isCaseSensitiveSearch()
Returns whether the search string shall be handled in the case sensitive fashion or not.

Returns:
case sensitive compares?

isExactMatch

public boolean isExactMatch()
Returns whether the search string shall be matched exactly or not.

Returns:
case sensitive compares?

getSearchString

public String getSearchString()
Returns the search string entered by the user for this specific search (cycle).

Returns:
a String or "" (which represents "list all")

isListingAllEntries

public boolean isListingAllEntries()
Returns whether all contents shall be listed (client entered the empty string as the search string) or not.

Returns:
whether to list all contents or filtered ones only

getMinimumSizeOutput

public String getMinimumSizeOutput()
Returns the currently set minimum value, as a String which is empty in case no minimum size has yet been defined by the user.

Returns:
the minimum size string or ""

getMaximumSizeOutput

public String getMaximumSizeOutput()
Returns the currently set maximum value, as a String which is empty in case no maximum size has yet been defined by the user.

Returns:
the maximum size string or ""

getStartingDateOutput

public String getStartingDateOutput()
Returns the currently set starting date value, as a String which is empty in case no starting date size has yet been defined by the user.

Returns:
the starting date string or ""

getEndingDateOutput

public String getEndingDateOutput()
Returns the currently set ending date value, as a String which is empty in case no ending date size has yet been defined by the user.

Returns:
the ending date string or ""

getMinimumMultiplierOutput

public String getMinimumMultiplierOutput()
Returns the whole list of option tags to be filled into the minimum size's multiplier select box, having the correct entry selected.

Returns:
the HTML string to be filled into the min size multiplier box

getMaximumMultiplierOutput

public String getMaximumMultiplierOutput()
Returns the whole list of option tags to be filled into the maximum size's multiplier select box, having the correct entry selected.

Returns:
the HTML string to be filled into the max size multiplier box

setDirectoryListing

void setDirectoryListing(boolean bListDirectories)
Set the bListDirectories attribute.

Parameters:
bListDirectories - list directories or not?

setFileListing

void setFileListing(boolean bListFiles)
Set the bListFiles attribute.

Parameters:
bListFiles - list files or not?

setUsingRegExp

void setUsingRegExp(boolean bUseRegExp)
Sets the bUseRegExp attribute.

Parameters:
bUseRegExp - use regexp or not?

setCaseSensitiveSearch

void setCaseSensitiveSearch(boolean bCaseSensitiveSearch)
Sets the bCaseSensitiveSearch attribute.

Parameters:
bCaseSensitiveSearch - search case-sensitively or not?

setExactMatch

void setExactMatch(boolean bExactMatch)
Sets the bExactMatch attribute.

Parameters:
bExactMatch - search exact match or not?

setSearchString

void setSearchString(String sSearchString)
Sets the sSearchString attribute.

Parameters:
sSearchString - search string of user?

getMinimumSize

long getMinimumSize()
Returns the current minimum size value or -1, if not defined.

Returns:
the minimum size or -1 (not defined)

setMinimumSize

void setMinimumSize(long lMinimumSize)
Sets the given minimum size value or -1, if lower than -1.

Parameters:
lMinimumSize - the new minimum size

getMaximumSize

long getMaximumSize()
Returns the current maximum size value or -1, if not defined.

Returns:
the maximum size or -1 (not defined)

setMaximumSize

void setMaximumSize(long lMaximumSize)
Sets the given maximum size value or -1, if lower than -1.

Parameters:
lMaximumSize - the new maximum size

getStartingDate

Date getStartingDate()
Returns the current starting date or null, if not defined.

Returns:
the starting date or null

setStartingDate

void setStartingDate(Date dtStartingDate)
Sets the given starting date.

Parameters:
dtStartingDate - a new starting date or null, to unset it

getEndingDate

Date getEndingDate()
Returns the current ending date or null, if not defined.

Returns:
the ending date or null

setEndingDate

void setEndingDate(Date dtEndingDate)
Sets the given ending date.

Parameters:
dtEndingDate - a new ending date or null, to unset it

getMinimumMultiplier

long getMinimumMultiplier()
Returns the current minimum multiplier value.

Returns:
the maximum multiplier

setMinimumMultiplier

void setMinimumMultiplier(long lMinimumMultiplier)
Sets the current minimum multiplier value.

Parameters:
lMinimumMultiplier - at least 1

getMaximumMultiplier

long getMaximumMultiplier()
Returns the current maximum multiplier.

Returns:
the maximum multiplier

setMaximumMultiplier

void setMaximumMultiplier(long lMaximumMultiplier)
Sets the current maximum multiplier value.

Parameters:
lMaximumMultiplier - at least 1

initializeDefaultValues

void initializeDefaultValues()
Initializes the class with default values (only).


getBooleanInput

boolean getBooleanInput(String sURLInput)
Returns true only if the given input equals "true", else false is returned.

Parameters:
sURLInput - the input to parse
Returns:
a boolean value, as described above

getDefaultMultiplier

static long getDefaultMultiplier()
Returns the default multiplier value (1024, indicating KB).

Returns:
the default multiplier