com.iphrase.onestep.beans
Class VoiceOver

java.lang.Object
  |
  +--com.iphrase.onestep.beans.VoiceOver

public class VoiceOver
extends java.lang.Object

Contains data required for formatting the VoiceOver component. The data structure of this class is optimized for access from JSP. The single instance of VoiceOver is created by the QueryHandler and set in the request-scope.


Inner Class Summary
 class VoiceOver.Item
          Contains data for a single new or removed constraint in the VoiceOver component.
 
Constructor Summary
VoiceOver(java.util.ArrayList features, java.lang.String tabsFeatureId)
          Constructs the VoiceOver bean
 
Method Summary
 int getDirectSortBy()
           
 java.lang.String getPage()
           
 java.lang.String getPerPage()
           
 java.lang.String getSortBy()
           
 java.lang.String getViewBy()
           
 java.lang.String getYouAsked()
          Get "you asked" string
 java.lang.String[] getYouAskedWithin()
          Get "Search Within" strings
 VoiceOver.Item[] getYouChanged()
          Get "You clicked" entries data
 VoiceOver.Item[] getYouRelaxed()
          Get "You removed" entries data
 java.lang.String getYouRemoved()
           
 void setConstraints(java.util.ArrayList relaxedConstraints, java.util.ArrayList newConstraints)
          Sets new or removed constraints.
 void setDirectSortBy(int directSortBy)
           
 void setPage(java.lang.String string)
           
 void setPerPage(java.lang.String string)
           
 void setSortBy(java.lang.String string)
           
 void setViewBy(java.lang.String string)
           
 void setYouAskedHistory(java.lang.String[] within)
          Sets the search strings that the user entered into the "search for" box.
 void setYouRemoved(java.lang.String term)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VoiceOver

public VoiceOver(java.util.ArrayList features,
                 java.lang.String tabsFeatureId)
Constructs the VoiceOver bean
Parameters:
features - ArrayList of TallyFeature objects
tabsFeatureId - ID of the feature whose values are used in rendering tabs
Method Detail

getYouAsked

public java.lang.String getYouAsked()
Get "you asked" string
Returns:
String containing the text that the user typed in the search box

getYouAskedWithin

public java.lang.String[] getYouAskedWithin()
Get "Search Within" strings
Returns:
array of all strings used within a series of consecutive searches (when the "Search within" option was enabled).

getYouChanged

public VoiceOver.Item[] getYouChanged()
Get "You clicked" entries data
Returns:
array of VoiceOver.Item objects containing the data for formatting the new constraints

getYouRelaxed

public VoiceOver.Item[] getYouRelaxed()
Get "You removed" entries data
Returns:
array of VoiceOver.Item objects containing the data for formatting removed constraints

setYouAskedHistory

public void setYouAskedHistory(java.lang.String[] within)
Sets the search strings that the user entered into the "search for" box. The last string in the array contains the "you asked" string; all other entries in the array contain the "within" strings (i.e., the previous search strings).
Parameters:
array - of String user asked for

setConstraints

public void setConstraints(java.util.ArrayList relaxedConstraints,
                           java.util.ArrayList newConstraints)
Sets new or removed constraints.
Parameters:
{@link - ArrayList} of Constraint user removed in the last submitted query
{@link - ArrayList} of Constraint user added in the last submitted query

getYouRemoved

public java.lang.String getYouRemoved()
Returns:
youRemoved voiceOver display string

setYouRemoved

public void setYouRemoved(java.lang.String term)
Parameters:
term - String youRemoved voiceOver display string

getPage

public java.lang.String getPage()
Returns:
page voiceOver display string

getPerPage

public java.lang.String getPerPage()
Returns:
perPage voiceOver display string

getSortBy

public java.lang.String getSortBy()
Returns:
sortBy voiceOver display string

getViewBy

public java.lang.String getViewBy()
Returns:
viewBy voiceOver display string

getDirectSortBy

public int getDirectSortBy()
Returns:
direct sortBy voiceOver display string ascending/descending

setDirectSortBy

public void setDirectSortBy(int directSortBy)
Parameters:
int - int page voiceOver display string ascending/descending

setPage

public void setPage(java.lang.String string)
Parameters:
string - String page voiceOver display string

setPerPage

public void setPerPage(java.lang.String string)
Parameters:
string - String prePage voiceOver display string

setSortBy

public void setSortBy(java.lang.String string)
Parameters:
string - String SortBy voiceOver display string

setViewBy

public void setViewBy(java.lang.String string)
Parameters:
string - String ViewBy voiceOver display string

© Copyright 2005, 2006. IBM Corporation. All rights reserved.