com.sun.portal.search.providers
Class SearchRequestBean

java.lang.Object
  |
  +--com.sun.portal.search.providers.SearchRequestBean
All Implemented Interfaces:
Serializable

public class SearchRequestBean
extends Object
implements Serializable

The SearchRequestBean is a helper bean used by the search JSP's. The class has specific getter and setter methods for each of the form fields in basic search and advanced search. The JSP application can query the Bean using reflection.

SearchRequestBean can be extended based on the search JSP provider requirements. Other get/set methods can be added by extending the SearchRequestBean. Users may also prefer to ignore the SearchRequestBean and implement their own JSP helpers. Here is the List of Bean properties, description and accessor methods

See Also:
Search, Serialized Form

Constructor Summary
SearchRequestBean()
           
 
Method Summary
 String authorOpSelection(String op)
          Compares the input parameter with the authorOp property
 String DescSelectionAttribute(String attr)
          Helper method used to return the selection for the description menu Compares the parameter value with the description property
 String expiresOpSelection(String op)
           
 String getAuthorOp()
          Gets the value of authorOp
 String getAuthorVal()
          Gets the value of authorVal
 String getBrowseCategory()
          Method is used for category browsing and category searching
 String getDescription()
          Gets the description
 String getExpiresOp()
          Gets the value of expiresOp
 String getExpiresVal()
          Gets the value of expiresVal
 String getKeywordsOp()
          Gets the value of keywordsOp
 String getKeywordsVal()
          Gets the value of keywordsVal
 String getLmodifiedOp()
          Gets the lmodifiedOp property
 String getLmodifiedVal()
          Gets the lmodifiedVal property
 String getMode()
          Gets the search mode
 String getNowords()
          Gets the value of nowords
 int getPage()
          Gets the current page value
 String getScat()
          Get the value of scat i.e search all category radio button
 String getScope()
          Gets the query string
 String getSince()
          Gets the value of the since property
 String getTitleOp()
          Gets the value of titleOp
 String getTitleVal()
          Gets the title value
 String getUrlOp()
          Gets the value of urlOp
 String getUrlVal()
          Gets the value of urlVal
 int getViewHits()
          Gets the viewHits value
 String getWordsOp()
          Get the value of wordsOp
 String getWordsVal()
          Gets the value of wordsVal
 String keywordsOpSelection(String op)
           
 String lmodifiedOpSelection(String op)
           
 void SearchRequestBean()
          Public Constructor
 void setAuthorOp(String authorOperator)
          Sets the value of authorOp
 void setAuthorVal(String authorValue)
          Sets the value of authorVal
 void setBrowseCategory(String bc)
          Sets the current category
 void setDescription(String d)
          Gets the description.
 void setExpiresOp(String expiresOperator)
          Sets the value of expiresOp
 void setExpiresVal(String expires)
          Sets the expiresVal property
 void setKeywordsOp(String keywordsOperator)
          Sets the value of keywordsOp
 void setKeywordsVal(String keywords)
          Sets the value of keywordsVal
 void setLmodifiedOp(String lmodifiedOperator)
          Sets the lmodifiedOp property
 void setLmodifiedVal(String lmodified)
          Sets the lmodifiedVal property
 void setMode(String m)
          Sets the search mode
 void setNowords(String nowords)
          Sets the value of nowords
 void setPage(int p)
          Sets the current page value
 void setScat(String cat)
          Set the value of the scat radio button
 void setScope(String s)
          Sets the query string value
 void setSince(String lmodified)
          Sets the since property
 void setTitleOp(String titleOperator)
          Sets the value of titleOp
 void setTitleVal(String title)
          Sets the titleVal
 void setUrlOp(String urlOperator)
          Sets the value of urlOp
 void setUrlVal(String url)
          Sets the value of urlVal
 void setViewHits(int vhits)
          Sets the viewHits value
 void setWordsOp(String wordsOperator)
          Sets the value of wordsOp
 void setWordsVal(String whichwords)
          Sets the value of wordsVal
 String sinceSelection(String op)
           
 String titleOpSelection(String op)
           
 String urlOpSelection(String op)
           
 String viewhitsSelection(int op)
           
 String wordsOpSelection(String op)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchRequestBean

public SearchRequestBean()
Method Detail

SearchRequestBean

public void SearchRequestBean()
Public Constructor

getScope

public String getScope()
Gets the query string
Returns:
The value of scope, query string

setScope

public void setScope(String s)
Sets the query string value
Parameters:
scope - is the query string

getDescription

public String getDescription()
Gets the description
Returns:
The value of the description e.g full,brief,title

setDescription

public void setDescription(String d)
Gets the description. for example: full,brief,title
Parameters:
d - is the description type in the search results Description defaults to an empty string if value is null

getMode

public String getMode()
Gets the search mode
Returns:
search mode

setMode

public void setMode(String m)
Sets the search mode
Parameters:
m - value of the current search mode. possible values can be 'adv' or 'basic'

setPage

public void setPage(int p)
Sets the current page value
Parameters:
p - value of the current page

getPage

public int getPage()
Gets the current page value
Returns:
The value of the current page

getViewHits

public int getViewHits()
Gets the viewHits value
Returns:
the number of search hits in the results page

setViewHits

public void setViewHits(int vhits)
Sets the viewHits value
Parameters:
vhits - The number of results to be displayed on the page

DescSelectionAttribute

public String DescSelectionAttribute(String attr)
Helper method used to return the selection for the description menu Compares the parameter value with the description property
Parameters:
description - string normally passed from the request object

Returns:
"SELECTED" if the parameter is equal to the description property empty string if these are not equal

getBrowseCategory

public String getBrowseCategory()
Method is used for category browsing and category searching
Returns:
the current category

setBrowseCategory

public void setBrowseCategory(String bc)
Sets the current category
Parameters:
bc - is the current category, The category is set only if the current category value is not an empty string.

getScat

public String getScat()
Get the value of scat i.e search all category radio button
Returns:
The value of the search all category radio button

setScat

public void setScat(String cat)
Set the value of the scat radio button
Parameters:
cat - is the value of the search all categories radio button

getWordsOp

public String getWordsOp()
Get the value of wordsOp
Returns:
The value of the with operation (any/all/exact/passage) operator from advanced search

setWordsOp

public void setWordsOp(String wordsOperator)
Sets the value of wordsOp
Parameters:
wordsOperator - value for the words operation

wordsOpSelection

public String wordsOpSelection(String op)
Parameters:
op - value that is compared with the value of wordsOp
Returns:
"SELECTED" is returned if they are both equal and empty string is returned if unequal

getWordsVal

public String getWordsVal()
Gets the value of wordsVal
Returns:
The value of the words property

setWordsVal

public void setWordsVal(String whichwords)
Sets the value of wordsVal
Parameters:
whichwords - value of the words property

getNowords

public String getNowords()
Gets the value of nowords
Returns:
The value of the nowords property

setNowords

public void setNowords(String nowords)
Sets the value of nowords
Parameters:
nowords - value of the nowords property

getAuthorOp

public String getAuthorOp()
Gets the value of authorOp
Returns:
The value of the author operator

setAuthorOp

public void setAuthorOp(String authorOperator)
Sets the value of authorOp
Parameters:
authorOperator - value of the author property

getAuthorVal

public String getAuthorVal()
Gets the value of authorVal
Returns:
The value of the author property

authorOpSelection

public String authorOpSelection(String op)
Compares the input parameter with the authorOp property
Parameters:
op - is compared to the author operator

setAuthorVal

public void setAuthorVal(String authorValue)
Sets the value of authorVal
Parameters:
authorValue - value for the authorVal property

setUrlOp

public void setUrlOp(String urlOperator)
Sets the value of urlOp
Parameters:
urlOperator - value for the urlOp

getUrlOp

public String getUrlOp()
Gets the value of urlOp
Returns:
The value of the urlOp

urlOpSelection

public String urlOpSelection(String op)
Parameters:
op - is compared to the url operator

getUrlVal

public String getUrlVal()
Gets the value of urlVal
Returns:
The value of the urlVal

setUrlVal

public void setUrlVal(String url)
Sets the value of urlVal
Parameters:
url - value for the urlVal property

setTitleOp

public void setTitleOp(String titleOperator)
Sets the value of titleOp
Parameters:
titleOperator - value for the titleOp

getTitleOp

public String getTitleOp()
Gets the value of titleOp
Returns:
The value of the titleOp

titleOpSelection

public String titleOpSelection(String op)
Parameters:
op - is compared to the title operator
Returns:
'SELECTED' if equal and "" if unequal

getTitleVal

public String getTitleVal()
Gets the title value
Returns:
The value of the titleVal property

setTitleVal

public void setTitleVal(String title)
Sets the titleVal
Parameters:
The - value for the titleVal property

setKeywordsOp

public void setKeywordsOp(String keywordsOperator)
Sets the value of keywordsOp
Parameters:
The - value of the keywordsOp property

getKeywordsOp

public String getKeywordsOp()
Gets the value of keywordsOp
Returns:
The value of the keywordsOp property

keywordsOpSelection

public String keywordsOpSelection(String op)
Parameters:
op - is compared to the keywordsOp
Returns:
'SELECTED' if equal "" and if unequal

getKeywordsVal

public String getKeywordsVal()
Gets the value of keywordsVal
Returns:
The value of the keywords property

setKeywordsVal

public void setKeywordsVal(String keywords)
Sets the value of keywordsVal
Parameters:
keywords - value for the keywordsVal

setExpiresOp

public void setExpiresOp(String expiresOperator)
Sets the value of expiresOp
Parameters:
expiresOperator - value for expiresOp

getExpiresOp

public String getExpiresOp()
Gets the value of expiresOp
Returns:
The value of the expiresOp property

expiresOpSelection

public String expiresOpSelection(String op)
Parameters:
op - is compared to the expires operator
Returns:
'SELECTED' if equal and "" if unequal

getExpiresVal

public String getExpiresVal()
Gets the value of expiresVal
Returns:
The value of the expires property

setExpiresVal

public void setExpiresVal(String expires)
Sets the expiresVal property
Parameters:
expires - value for the expires property

setLmodifiedOp

public void setLmodifiedOp(String lmodifiedOperator)
Sets the lmodifiedOp property
Parameters:
lmodifiedOperator - value for the lmodified operator

getLmodifiedOp

public String getLmodifiedOp()
Gets the lmodifiedOp property
Returns:
The value of the lmodified operator

lmodifiedOpSelection

public String lmodifiedOpSelection(String op)
Parameters:
op - is compared to the lmodified operator
Returns:
'SELECTED' if equal and "" if unequal

getSince

public String getSince()
Gets the value of the since property
Returns:
The value of the since property

setSince

public void setSince(String lmodified)
Sets the since property
Parameters:
lmodified - value for the since property

sinceSelection

public String sinceSelection(String op)
Parameters:
op - is compared to the since property
Returns:
'SELECTED' if equal and empty string if unequal

getLmodifiedVal

public String getLmodifiedVal()
Gets the lmodifiedVal property
Returns:
The value of lmodified property

setLmodifiedVal

public void setLmodifiedVal(String lmodified)
Sets the lmodifiedVal property
Parameters:
lmodified - value of the lmodified property

viewhitsSelection

public String viewhitsSelection(int op)
Parameters:
op - is compared to the viewhits property
Returns:
'SELECTED' if equal and empty string if unequal