com.primus.ae.searchclient
Class SearchSession

java.lang.Object
  extended by com.primus.ae.searchclient.SearchSession

public class SearchSession
extends java.lang.Object

The SearchSession object contains session information associated with a given login as well as constant search parameters. The values are used for logging and searching.


Field Summary
 java.lang.String mEnvironmentName
          Name of search environment to use
 
Constructor Summary
SearchSession()
           
 
Method Summary
 void addOptionSet(java.lang.String optionSetName, java.util.Map map)
          Adds a new option set.
 java.lang.String getClustername()
          Deprecated. as of 2006.3
 java.lang.String getEnvironmentName()
           
 long getLoginSessionId()
          Deprecated. as of 2006.3
 int getMinScore()
          Deprecated. as of 2006.3
 int getNumResultsToLog()
          Deprecated. as of 2006.3
 java.util.Map getOptionSet(OptionSets optionSet)
          Fetches a pre-defined option set
 java.util.Map getOptionSet(java.lang.String optionSetName)
          Fetches an option set
 atg.search.routing.command.search.PageOffsetInfo getPageOffsetInfo(int pageNum)
           
 long getProblemId()
          Deprecated. as of 2006.3
 int getReplyWaitTime()
          Deprecated. as of 2006.3
 long getSearchSessionId()
          Deprecated. as of 2006.3
 int getSiteId()
          Deprecated. as of 2006.3
 java.lang.String getSitename()
          Deprecated. as of 2006.3
 java.util.List getUserGroups()
          Deprecated. as of 2006.3
 java.lang.String getUsername()
          Deprecated. as of 2006.3
 void putPageOffsetInfo(int pageNum, atg.search.routing.command.search.PageOffsetInfo pInfo)
          call after you have the results.
 void setClustername(java.lang.String clustername)
          Deprecated. as of 2006.3
 void setEnvironmentName(java.lang.String envName)
           
 void setLoginSessionId(long loginSessionId)
          Deprecated. as of 2006.3
 void setMinScore(int minScore)
          Deprecated. as of 2006.3
 void setNumResultsToLog(int numResultsToLog)
          Deprecated. as of 2006.3
 void setProblemId(long problemId)
          Deprecated. as of 2006.3
 void setReplyWaitTime(int replyWaitTime)
          Deprecated. as of 2006.3
 void setSearchSessionId(long searchSessionId)
          Deprecated. as of 2006.3
 void setSiteId(int siteId)
          Deprecated. as of 2006.3
 void setSitename(java.lang.String sitename)
          Deprecated. as of 2006.3
 void setUserGroups(java.util.List userGroups)
          Deprecated. as of 2006.3
 void setUsername(java.lang.String username)
          Deprecated. as of 2006.3
 java.lang.String stringifyOptionSet(java.lang.String optionSetName)
          Prints out all values in XML attribute-friendly format: key="value" key="value" ...
 java.lang.String toXml()
          Deprecated. as of 2007.0
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mEnvironmentName

public java.lang.String mEnvironmentName
Name of search environment to use

Constructor Detail

SearchSession

public SearchSession()
Method Detail

getLoginSessionId

public long getLoginSessionId()
Deprecated. as of 2006.3

Returns:
login session ID generated on server

setLoginSessionId

public void setLoginSessionId(long loginSessionId)
Deprecated. as of 2006.3

Parameters:
loginSessionId -

getSearchSessionId

public long getSearchSessionId()
Deprecated. as of 2006.3

Returns:
search session ID generated on server

setSearchSessionId

public void setSearchSessionId(long searchSessionId)
Deprecated. as of 2006.3

Parameters:
searchSessionId -

getProblemId

public long getProblemId()
Deprecated. as of 2006.3

Returns:
problem Id generated on server

setProblemId

public void setProblemId(long problemId)
Deprecated. as of 2006.3

Parameters:
problemId -

getSitename

public java.lang.String getSitename()
Deprecated. as of 2006.3

Returns:
sitename specified by user

setSitename

public void setSitename(java.lang.String sitename)
Deprecated. as of 2006.3

Parameters:
sitename -

getUsername

public java.lang.String getUsername()
Deprecated. as of 2006.3

Returns:
username specified by user

setUsername

public void setUsername(java.lang.String username)
Deprecated. as of 2006.3

Parameters:
username -

getSiteId

public int getSiteId()
Deprecated. as of 2006.3

Returns:
site ID corresponding to site name provided by user

setSiteId

public void setSiteId(int siteId)
Deprecated. as of 2006.3

Parameters:
siteId -

getClustername

public java.lang.String getClustername()
Deprecated. as of 2006.3

Returns:
name of cluster associated with the site

setClustername

public void setClustername(java.lang.String clustername)
Deprecated. as of 2006.3

Parameters:
clustername -

getMinScore

public int getMinScore()
Deprecated. as of 2006.3

Returns:
0

setMinScore

public void setMinScore(int minScore)
Deprecated. as of 2006.3

Parameters:
minScore - minimum score for results.

getNumResultsToLog

public int getNumResultsToLog()
Deprecated. as of 2006.3

Returns:
number of results to log

setNumResultsToLog

public void setNumResultsToLog(int numResultsToLog)
Deprecated. as of 2006.3

Parameters:
numResultsToLog - number of results to log on server, usually 1

getReplyWaitTime

public int getReplyWaitTime()
Deprecated. as of 2006.3

Returns:
0

setReplyWaitTime

public void setReplyWaitTime(int replyWaitTime)
Deprecated. as of 2006.3

Parameters:
replyWaitTime - time to wait in milliseconds

setUserGroups

public void setUserGroups(java.util.List userGroups)
Deprecated. as of 2006.3

Parameters:
userGroups -

getUserGroups

public java.util.List getUserGroups()
Deprecated. as of 2006.3

Returns:
empty list

getEnvironmentName

public java.lang.String getEnvironmentName()

setEnvironmentName

public void setEnvironmentName(java.lang.String envName)

toXml

public java.lang.String toXml()
Deprecated. as of 2007.0

Returns:
XML representation of session instance <SearchSession><loginSessionId>long</loginSessionId>...</SearchSession>

addOptionSet

public void addOptionSet(java.lang.String optionSetName,
                         java.util.Map map)
Adds a new option set. If the option set already exists, it is replaced

Parameters:
optionSetName - Name of option set. Some option set names are
 stockQueryRequestOptions,
 stockTopQRequestOptions,
 stockCategoryRequestOptions,
 refinementRequestOptions
map - The option set

getOptionSet

public java.util.Map getOptionSet(java.lang.String optionSetName)
                           throws MissingOptionSetException
Fetches an option set

Parameters:
optionSetName - Name of desired option set
Returns:
The optionset's key-value pairs
Throws:
MissingOptionSetException - if the optionset isn't found.

getOptionSet

public java.util.Map getOptionSet(OptionSets optionSet)
                           throws MissingOptionSetException
Fetches a pre-defined option set

Parameters:
optionSet - desired option set
Returns:
The optionset's key-value pairs
Throws:
MissingOptionSetException - if the optionset isn't found.

stringifyOptionSet

public java.lang.String stringifyOptionSet(java.lang.String optionSetName)
Prints out all values in XML attribute-friendly format: key="value" key="value" ...

Parameters:
optionSetName - Name of option set to stringify
Returns:
formatted options

putPageOffsetInfo

public void putPageOffsetInfo(int pageNum,
                              atg.search.routing.command.search.PageOffsetInfo pInfo)
call after you have the results. call this for the first time with page zero results

Parameters:
pageNum -
pInfo -

getPageOffsetInfo

public atg.search.routing.command.search.PageOffsetInfo getPageOffsetInfo(int pageNum)