com.plumtree.portaluiinfrastructure.search
Class SearchResultModel

java.lang.Object
  extended by com.plumtree.portaluiinfrastructure.search.SearchResultModel
All Implemented Interfaces:
IBaseSearchQueryRO, IBaseSearchResultModelRO, ISaveSearchModel, ISaveSearchModelRO, ISearchQueryRO, ISearchResultModel, ISearchResultModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IPagination, IPaginationRO

public class SearchResultModel
extends java.lang.Object
implements ISearchResultModelRO, ISearchResultModel

Author:
CraigS

Field Summary
protected  IPTFilter _advancedFilter
          User's original search filter
protected  boolean _initialBestBets
          Whether best bets were initially requested
protected  java.lang.String _initialGroupBy
          Field that was used for group-by on the original search.
protected  java.lang.String _initialSearchString
          User's original search string
protected  boolean _isAdvancedSearch
          Whether the original search used a filter (i.e.
protected  java.lang.String _pageMode
          The current "mode" that the client page is in.
protected  int _pageSize
          User's desired number of results per page
protected  int _savedSearchErrorCode
          Integer that client views can use to get/set error conditions for saved search (or they can use the getError() mechanism, but this affects *all* views, not just the saved search view).
protected  java.lang.String _savedSearchName
          Name this search has been saved under
protected  int _swrCount
           
protected  java.lang.String _swrFields
          Fields that search-within-results queries will run against
static java.lang.String COLLAB_APP
          String that getResultApp() returns for Collab items
static java.lang.String CONTAINER_ABSTYPE
          String that getResultAbsType() returns for containers
static java.lang.String CONTENT_APP
          String that getResultApp() returns for Content items
static java.lang.String DOCUMENT_ABSTYPE
          String that getResultAbsType() returns for documents
static java.lang.String GROUP_BY_PREFS_KEY
           
static java.lang.String GROUPBY_FOLDER
          Built-in group-by string identifiers.
static java.lang.String GROUPBY_OBJECTTYPE
           
static java.lang.String MODEL_MODE_INPUT
           
static java.lang.String OTHER_ABSTYPE
          String that getResultAbsType() returns for any other item
static java.lang.String PORTAL_APP
          String that getResultApp() returns for portal items
static java.lang.String SORTORDER_CREATED_ASC
           
static java.lang.String SORTORDER_CREATED_DESC
           
static java.lang.String SORTORDER_MODIFIED_ASC
           
static java.lang.String SORTORDER_MODIFIED_DESC
           
static java.lang.String SORTORDER_NAME_ASC
           
static java.lang.String SORTORDER_NAME_DESC
           
static java.lang.String SORTORDER_RELEVANCE
          Supported sort orders.
static java.lang.String STR_MVC_CLASS_NAME
          Name of this class
static java.lang.String TEMPLATING_APP
          String that getResultApp() returns for community templating items (whose subtypes are the same as those for portal items, but do not correspond to "real" portal objects)
static java.lang.String UNKNOWN_FOLDER_NAME
          Name of folder returned when db lookup of name fails- must be localized before displaying.
 
Constructor Summary
SearchResultModel()
           
 
Method Summary
 void ChangeSortOrder(java.lang.String sortOrder, java.lang.Object additionalInfo)
          Same as GoToPage but only changes sort order.
 void CleanupAllData()
          This method is called when an ActivitySpace is removed from the cache.
 void CleanupTempData()
          This method is called at the end of every HTTP request by the Interpreter.
 boolean CollabInstalled()
           
 boolean ContentInstalled()
           
static XPDateTime ConvertSearchDateTimeToXPDateTime(double searchTime)
           
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
protected  void doSearch(IPTSearchQuery additionalQuery, java.lang.String additionalBreadcrumb, java.lang.String newKey)
          doSearch() actually calls the COM side to do the search; this is called from any method that has made a change to the _request object and needs to update the search results.
 void Drilldown(java.lang.String keyOnPage, java.lang.String groupByField, int category)
          Drill down into the indicated category.
 void ExternalLightInitialization(IPTSearchResponse sr, AActivitySpace asSpace)
           
 void Filter(java.lang.String key, int filterId)
          Filter the search result based on the filterId
 int GetAbstractTypeRestrictions()
          Returns the abstract types the search was restricted to, if any.
 int[] GetAdminFolderRestrictions()
          Returns the admin folders the search was restricted to, if any.
 int GetApplicationRestrictions()
          Returns the applications the search was restricted to, if any.
 java.lang.String GetASConstraintOperator(int condition)
          If advanced search, returns the operator for the indicated property condition (localized).
 java.lang.String GetASConstraintProperty(int condition)
          If advanced search, returns the property name for the indicated property condition.
 java.lang.String GetASConstraintValue(int condition)
          If advanced search, returns the comparison value for the indicated property condition.
 int GetASNumPropertyConstraints()
          If advanced search, returns the number of property restrictions.
 boolean GetASPropertyClauseOperator()
          If advanced search, returns whether individual property conditions are ANDed or ORed together (true <-> AND).
 boolean GetASTopLevelOperator()
          If advanced search, returns whether text and property conditions (as a group) are ANDed or ORed together (true <-> AND).
 java.lang.String GetBreadcrumbKey(int step)
          Returns a key that may be used in ISearchResultModel.FollowBreadcrumb to use the indicated breadcrumb step (must be between 1 and getDrilldownDepth(), inclusive).
 java.lang.String GetBreadcrumbLabel(int step)
          Returns a displayable label for the indicated breadcrumb (must be between 2 and getDrilldownDepth(), inclusive).
 int[] GetCollabProjectRestrictions()
          Returns the Collab projects the search was restricted to, if any.
 java.lang.String GetCommunityNameForID(int id)
          Utility method to lookup the name of a community given its id.
 int[] GetCommunityRestrictions()
          Returns the communities the search was restricted to, if any.
 int GetCorrectionFrequency(int misspellingIndex, int correctionIndex)
          Returns the number of times the given correction actually matched a document.
 java.lang.String GetCurrentKey()
          Returns a key that should be attached to all URLs that access this model; this key allows the model to find the search result on which a URL was generated if the user hits the BACK button.
 XPDateFormat GetDateFormat(AActivitySpace owner)
           
static java.lang.String getDisplayableNameForType(AActivitySpace m_asOwner, int classId)
           
 int[] GetDocFolderRestrictions()
          Returns the document folders the search was restricted to, if any.
 int GetDrilldownDepth()
          Returns the number of drilldown steps the user has taken.
 SearchExecutionError GetError()
          Returns any SearchExecutionError that occurred during the last search.
 int GetFirstDisplayableItem()
          Returns the index of the first displayable item.
 java.lang.String GetFolderNameForID(int id, boolean isAdmin)
          Utility method to lookup the name of a folder given its id.
 java.lang.Object GetGroupIcon(int groupIdx)
          Returns an icon (actually an HTMLImg) for the indicated group, or null if there is no appropriate icon.
 java.lang.String GetGroupName(int groupIdx)
          Returns the name of the indicated group.
 XPHashtable GetGroupsForAncestorKey(java.lang.String ancestorKey)
          Special-case method for use only by DrilldownView.
 boolean GetHasBeenSaved()
          Returns true if this search has already been saved.
 boolean GetHasDisplayedObjects(int classID)
           
 int GetHeaderID(int nCommunityID)
          Return the headerID for the community; used when processing the style sheet.
 boolean GetIncludeSubfolders()
          Returns true if the folder restrictions included subfolders.
 int GetItemsPerPage()
          Returns the user's desired results per page.
 java.lang.String GetKWIC(int rank)
          Returns the keyword-in-context (KWIC) information for a result.
 java.lang.String GetLanguageRestriction()
          Returns the two-character code for the language restriction, if any, or null otherwise.
 java.lang.String GetLastDrilldownGroup()
          Special-case method for use only by DrilldownView.
 java.lang.String GetLastGroupByField()
          Returns the most recent categorization field
 java.lang.String GetMisspelledToken(int misspellingIndex)
          Returns a single misspelled token.
 java.lang.String GetName()
          Return the name of the MVC object.
 int GetNumCorrections(int misspellingIndex)
          Returns the number of corrections for the indicated misspelling.
 int GetNumDisplayableItems()
          Returns the number of results actually returned.
 int GetNumMisspelledTokens()
          Returns the number of misspelled tokens.
 int GetNumResultGroups()
          Returns the number of result groups.
 int[] GetObjectTypeRestrictions()
          Returns the types (as PT_CLASSIDs) the search was restricted to, if any.
 java.lang.String GetPageMode()
          SearchResultModel holds onto a "page mode" string for the benefit of client code..
 java.lang.String GetPortletNameForID(int id)
          Utility method to lookup the name of a portlet given its id.
 int[] GetPortletRestrictions()
          Returns the Content Server portlets the search was restricted to, if any.
 XPHashtable GetReconstructionArgs()
          Get URL arguments that are sufficient to reconstruct this search result if it has been flushed from the cache.
 XPHashtable GetReconstructionArgs(boolean wantPageContext)
          Same as getReconstructionArgs(), but if pageContext is false, omit any args that indicate what page the model is on - i.e.
 XPHashtable GetReconstructionArgs(java.lang.String prefix, boolean wantPageContext)
           
 SearchSettingCollection GetRemovableSettings()
          Returns settings that were used for this search, but that could be removed from followup searches if desired
 java.lang.String GetResultAbsType(int rank)
          Returns a result's abstract (app-independent) type: DOCUMENT, CONTAINER, or OTHER.
 java.lang.String GetResultApp(int rank)
          Returns a result's application: PTPORTAL, PTCOLLAB, PTCONTENT.
 java.lang.String GetResultBestBetKey(int rank)
          Returns an internal key used by Best Bets; do not call otherwise
 int GetResultClassID(int rank)
          Returns a result's class ID.
 HTMLAnchor GetResultClickthroughURL(int rank, boolean allowPopup)
          Returns a view link that may be used for clickthrough.
 HTMLAnchor GetResultClickthroughURL(int rank, boolean allowPopup, boolean editMode)
          Returns an URL that may be used for clickthrough.
 HTMLAnchor GetResultClickthroughURL(int rank, boolean allowPopup, boolean editMode, java.lang.String extraParams)
          Returns an URL that may be used for clickthrough.
 java.lang.String GetResultCollabProjectName(int rank)
          Special call for Collab Server results; returns the name of the item's containing project.
 java.lang.String GetResultCollabProjectURL(int rank)
          Special call for Collab Server results; returns the URL used to open the containing project.
 java.lang.String GetResultContentLastPubUser(int rank)
          Special call for Content Server results; returns the "last published by" username.
 int[] GetResultContentPortletIDs(int rank)
          Special call for Content Server results; returns the IDs of this result's parent portlets.
 XPDateTime GetResultCreated(int rank)
          Returns a result's creation date.
 HTMLAnchor GetResultEditLink(int rank, boolean allowPopup)
          Returns an edit link that may be used for clickthrough.
 java.lang.String GetResultEODField(int rank, int propertyId)
          Returns the value of an EOD property for a result.
 java.lang.Object GetResultEODFieldAsObject(int rank, int propertyId)
           
 int GetResultFolderID(int rank)
          Returns the ID of the folder in which this result is found.
 java.lang.Object GetResultIcon(int rank)
          Returns the icon corresponding to an item's application and class, and any other relevant info (i.e.
 XPDateTime GetResultLastModified(int rank)
          Returns a result's last-modified date.
 java.lang.String GetResultName(int rank)
          Returns a result's name.
 int GetResultObjectID(int rank)
          Returns a result's object ID.
 java.lang.String GetResultPath(int rank)
          Returns the full path to a result.
 java.lang.String GetResultPortletField(int rank, int fieldId)
          Returns the value of a gadget field for the result.
 HTMLAnchor GetResultPropertiesURL(int rank, boolean allowPopup)
          Returns an URL that may be used to open a "properties" page for the item, or null if there is no such page.
 int GetResultRank(int groupNum, int resultNum)
          Returns the overall relevance rank of a grouped result.
 int GetResultSize(int rank)
          Returns a result's size.
 java.lang.String GetResultStyleClass(java.lang.String subType)
           
 java.lang.String GetResultSubType(int rank)
          Returns a result's app-specific subtype: PTCARD, PTGADGET, etc.
 java.lang.String GetResultTypeUUID(int rank)
           
 int GetReturnedResultsInGroup(int groupIdx)
          Returns the number of results in the indicated group that were actually returned.
 int GetSavedSearchErrorCode()
          Returns an int that clients can set via ISaveSearchModel.setSavedSearchErrorCode() to communicate conditions like "a saved search already exists with that name".
 java.lang.String GetSavedSearchName()
          Returns the name of the search if the search has been saved, or null otherwise.
 XPHashtable GetSearchAgainArgs(boolean includeOptional)
          Returns arguments that can be used for a followup search with the same settings as the current search.
 java.lang.String GetSearchString()
          Returns the user's original search string.
 int GetSelectedTypeFilter()
           
 java.lang.String GetSortOrder()
          Gets the property id that is currently used as the order by property in the model.
 java.lang.String GetSpellingCorrection(int misspellingIndex, int correctionIndex)
          Returns a single corrected token for the indicated misspelling.
 java.lang.String GetStyleSheet(int nCommunityID)
          Return the stylesheet for the community; used when processing the style sheet.
 int GetTotalItems()
          Returns the total number of items, some of which may not currently be displayable.
 java.lang.String GetTotalResultsInGroup(int groupIdx)
          Returns the total number of results in the indicated group.
 SearchExecutionWarning GetWarning()
          Returns any SearchExecutionWarning that occurred during the last search.
 void GoToPage(java.lang.String sortOrder, int first, int pageSize, java.lang.Object additionalInfo)
          Go to another page.
 boolean hasDrilledDownIntoSingleCategory(java.lang.String orgType)
          Returns true if this model has been drilled down into a single category of the given organization scheme.
 void Init(AActivitySpace parent)
          This method initializes the model.
 boolean isAdvancedSearch()
          Returns true if this result was generated by an advanced search.
 boolean IsASTooComplexToSummarize()
          Returns true if this advanced search consists of a nested set of clauses that are too complex to easily summarize.
 boolean isEntireGroupReturned(int groupIdx)
          Returns true if all results in the group were returned.
 boolean IsInitialized()
          Returns true if the model has been initialized (i.e.
 boolean isResultBestBet(int rank)
          Returns true if a result is a Best Bet.
protected  java.lang.String localizeObjectTypeName(java.lang.String objType)
          Helper method to convert an indexed object type or abstract type to its localized equivalent
 void RefreshResults(java.lang.String keyOnPage)
          Rerun the search that generated the indicated page; call this following any action that may change the result set.
 void Reorganize(java.lang.String keyOnPage, java.lang.String groupByField)
          Perform a different categorization on the current result set
 void RestoreFromBreadcrumb(java.lang.String keyOfPageWhereLinkAppears, java.lang.String keyToRestore)
          Follow a breadcrumb link with the specified key.
protected  void restoreState(java.lang.String keyOnPage)
          If the user's hit the BACK button before clicking a link, this method restores our state to the way things were on the page where the user clicked the button.
 void Search(java.lang.String searchString, java.lang.String basicFields, IPTFilter advancedFilter, SearchSettingCollection settings)
          Initialize the model by running the provided query with the provided settings.
 void Search(java.lang.String searchString, java.lang.String basicFields, IPTFilter advancedFilter, SearchSettingCollection settings, SearchSettingCollection removableSettings)
          Initialize the model by running the provided query with the provided settings (allSettings).
 void SearchWithinResults(java.lang.String keyOnPage, java.lang.String additionalQuery)
          Search within results already generated for the indicated additional query string.
 void SetError(SearchExecutionError e)
          Tell the model that there was an error on the previous search.
 void SetPageMode(java.lang.String pageMode)
          SearchResultModel holds onto a "page mode" string for the benefit of client code..
 void SetSavedSearchErrorCode(int code)
          Sets an int that clients can use to communicate conditions like "a saved search already exists with that name".
 void SetSavedSearchName(java.lang.String name)
          Call to set a flag to indicate that this search has been saved, and the "save this search" link no longer should be displayed.
 void SetWarning(SearchExecutionWarning e)
          Tell the model that there was a warning on the previous search.
 boolean wasSpellCorrected()
          Returns true if the user's search phrase was spell-corrected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
Name of this class

See Also:
Constant Field Values

MODEL_MODE_INPUT

public static final java.lang.String MODEL_MODE_INPUT
See Also:
Constant Field Values

PORTAL_APP

public static final java.lang.String PORTAL_APP
String that getResultApp() returns for portal items

See Also:
Constant Field Values

TEMPLATING_APP

public static final java.lang.String TEMPLATING_APP
String that getResultApp() returns for community templating items (whose subtypes are the same as those for portal items, but do not correspond to "real" portal objects)

See Also:
Constant Field Values

COLLAB_APP

public static final java.lang.String COLLAB_APP
String that getResultApp() returns for Collab items

See Also:
Constant Field Values

CONTENT_APP

public static final java.lang.String CONTENT_APP
String that getResultApp() returns for Content items

See Also:
Constant Field Values

DOCUMENT_ABSTYPE

public static final java.lang.String DOCUMENT_ABSTYPE
String that getResultAbsType() returns for documents

See Also:
Constant Field Values

CONTAINER_ABSTYPE

public static final java.lang.String CONTAINER_ABSTYPE
String that getResultAbsType() returns for containers

See Also:
Constant Field Values

OTHER_ABSTYPE

public static final java.lang.String OTHER_ABSTYPE
String that getResultAbsType() returns for any other item

See Also:
Constant Field Values

SORTORDER_RELEVANCE

public static final java.lang.String SORTORDER_RELEVANCE
Supported sort orders. Note that any numeric or date property should work, but it's convenient to provide these simple definitions.

See Also:
Constant Field Values

SORTORDER_CREATED_ASC

public static final java.lang.String SORTORDER_CREATED_ASC
See Also:
Constant Field Values

SORTORDER_CREATED_DESC

public static final java.lang.String SORTORDER_CREATED_DESC
See Also:
Constant Field Values

SORTORDER_MODIFIED_ASC

public static final java.lang.String SORTORDER_MODIFIED_ASC
See Also:
Constant Field Values

SORTORDER_MODIFIED_DESC

public static final java.lang.String SORTORDER_MODIFIED_DESC
See Also:
Constant Field Values

SORTORDER_NAME_ASC

public static final java.lang.String SORTORDER_NAME_ASC
See Also:
Constant Field Values

SORTORDER_NAME_DESC

public static final java.lang.String SORTORDER_NAME_DESC
See Also:
Constant Field Values

GROUPBY_FOLDER

public static final java.lang.String GROUPBY_FOLDER
Built-in group-by string identifiers.

See Also:
Constant Field Values

GROUPBY_OBJECTTYPE

public static final java.lang.String GROUPBY_OBJECTTYPE
See Also:
Constant Field Values

GROUP_BY_PREFS_KEY

public static final java.lang.String GROUP_BY_PREFS_KEY
See Also:
Constant Field Values

UNKNOWN_FOLDER_NAME

public static final java.lang.String UNKNOWN_FOLDER_NAME
Name of folder returned when db lookup of name fails- must be localized before displaying. NOTE: this must be kept in sync with what is returned by PTSearch.dll

See Also:
Constant Field Values

_advancedFilter

protected IPTFilter _advancedFilter
User's original search filter


_initialSearchString

protected java.lang.String _initialSearchString
User's original search string


_initialBestBets

protected boolean _initialBestBets
Whether best bets were initially requested


_initialGroupBy

protected java.lang.String _initialGroupBy
Field that was used for group-by on the original search. This field will also be the default for group-by on any later drilldown, or after the user uses a breadcrumb control to undo the drilldown.


_savedSearchName

protected java.lang.String _savedSearchName
Name this search has been saved under


_swrFields

protected java.lang.String _swrFields
Fields that search-within-results queries will run against


_isAdvancedSearch

protected boolean _isAdvancedSearch
Whether the original search used a filter (i.e. advanced search)


_pageMode

protected java.lang.String _pageMode
The current "mode" that the client page is in. This class doesn't care about the contents; this is just a convenient holder for client code. See get/set methods below.


_pageSize

protected int _pageSize
User's desired number of results per page


_savedSearchErrorCode

protected int _savedSearchErrorCode
Integer that client views can use to get/set error conditions for saved search (or they can use the getError() mechanism, but this affects *all* views, not just the saved search view).


_swrCount

protected int _swrCount
Constructor Detail

SearchResultModel

public SearchResultModel()
Method Detail

IsASTooComplexToSummarize

public boolean IsASTooComplexToSummarize()
Description copied from interface: ISearchQueryRO
Returns true if this advanced search consists of a nested set of clauses that are too complex to easily summarize.

Specified by:
IsASTooComplexToSummarize in interface ISearchQueryRO
See Also:
com.plumtree.portalpages.search.ISearchQueryRO.IsASTooComplexToSummarize()

GetASConstraintOperator

public java.lang.String GetASConstraintOperator(int condition)
Description copied from interface: ISearchQueryRO
If advanced search, returns the operator for the indicated property condition (localized).

Specified by:
GetASConstraintOperator in interface ISearchQueryRO
See Also:
com.plumtree.portalpages.search.ISearchQueryRO.getASConstraintOperator()

GetASConstraintProperty

public java.lang.String GetASConstraintProperty(int condition)
Description copied from interface: ISearchQueryRO
If advanced search, returns the property name for the indicated property condition.

Specified by:
GetASConstraintProperty in interface ISearchQueryRO
See Also:
com.plumtree.portalpages.search.ISearchQueryRO.getASConstraintPropertyID()

GetASConstraintValue

public java.lang.String GetASConstraintValue(int condition)
Description copied from interface: ISearchQueryRO
If advanced search, returns the comparison value for the indicated property condition.

Specified by:
GetASConstraintValue in interface ISearchQueryRO
See Also:
com.plumtree.portalpages.search.ISearchQueryRO.getASConstraintValue()

GetASNumPropertyConstraints

public int GetASNumPropertyConstraints()
Description copied from interface: ISearchQueryRO
If advanced search, returns the number of property restrictions.

Specified by:
GetASNumPropertyConstraints in interface ISearchQueryRO
See Also:
com.plumtree.portalpages.search.ISearchQueryRO.getASNumPropertyConstraints()

GetASPropertyClauseOperator

public boolean GetASPropertyClauseOperator()
Description copied from interface: ISearchQueryRO
If advanced search, returns whether individual property conditions are ANDed or ORed together (true <-> AND).

Specified by:
GetASPropertyClauseOperator in interface ISearchQueryRO
See Also:
com.plumtree.portalpages.search.ISearchQueryRO.getASOverallPropertyOperator()

GetASTopLevelOperator

public boolean GetASTopLevelOperator()
Description copied from interface: ISearchQueryRO
If advanced search, returns whether text and property conditions (as a group) are ANDed or ORed together (true <-> AND).

Specified by:
GetASTopLevelOperator in interface ISearchQueryRO
See Also:
com.plumtree.portalpages.search.ISearchQueryRO.getASTopLevelOperator()

GetAbstractTypeRestrictions

public int GetAbstractTypeRestrictions()
Description copied from interface: IBaseSearchQueryRO
Returns the abstract types the search was restricted to, if any.

Specified by:
GetAbstractTypeRestrictions in interface IBaseSearchQueryRO
See Also:
com.plumtree.portalpages.search.IBaseSearchQueryRO.getAbstractTypeRestrictions()

GetAdminFolderRestrictions

public int[] GetAdminFolderRestrictions()
Description copied from interface: IBaseSearchQueryRO
Returns the admin folders the search was restricted to, if any.

Specified by:
GetAdminFolderRestrictions in interface IBaseSearchQueryRO
See Also:
com.plumtree.portalpages.search.IBaseSearchQueryRO.getAdminFolderRestrictions()

isAdvancedSearch

public boolean isAdvancedSearch()
Description copied from interface: ISearchQueryRO
Returns true if this result was generated by an advanced search.

Specified by:
isAdvancedSearch in interface ISearchQueryRO
See Also:
com.plumtree.portalpages.search.ISearchQueryRO.isAdvancedSearch()

GetApplicationRestrictions

public int GetApplicationRestrictions()
Description copied from interface: IBaseSearchQueryRO
Returns the applications the search was restricted to, if any.

Specified by:
GetApplicationRestrictions in interface IBaseSearchQueryRO
See Also:
com.plumtree.portalpages.search.IBaseSearchQueryRO.getApplicationRestrictions()

GetBreadcrumbKey

public java.lang.String GetBreadcrumbKey(int step)
Description copied from interface: ISearchResultModelRO
Returns a key that may be used in ISearchResultModel.FollowBreadcrumb to use the indicated breadcrumb step (must be between 1 and getDrilldownDepth(), inclusive).

Specified by:
GetBreadcrumbKey in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getBreadcrumbKey()

GetBreadcrumbLabel

public java.lang.String GetBreadcrumbLabel(int step)
Description copied from interface: ISearchResultModelRO
Returns a displayable label for the indicated breadcrumb (must be between 2 and getDrilldownDepth(), inclusive).

Specified by:
GetBreadcrumbLabel in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getBreadcrumbLabel()

GetCommunityNameForID

public java.lang.String GetCommunityNameForID(int id)
Description copied from interface: IBaseSearchQueryRO
Utility method to lookup the name of a community given its id.

Specified by:
GetCommunityNameForID in interface IBaseSearchQueryRO
See Also:
com.plumtree.portalpages.search.IBaseSearchQueryRO.getCommunityNameForID()

GetPortletNameForID

public java.lang.String GetPortletNameForID(int id)
Description copied from interface: IBaseSearchQueryRO
Utility method to lookup the name of a portlet given its id.

Specified by:
GetPortletNameForID in interface IBaseSearchQueryRO
See Also:
com.plumtree.portalpages.search.IBaseSearchQueryRO.GetPortletNameForID()

GetCommunityRestrictions

public int[] GetCommunityRestrictions()
Description copied from interface: IBaseSearchQueryRO
Returns the communities the search was restricted to, if any.

Specified by:
GetCommunityRestrictions in interface IBaseSearchQueryRO
See Also:
com.plumtree.portalpages.search.IBaseSearchQueryRO.getCommunityRestrictions()

GetPortletRestrictions

public int[] GetPortletRestrictions()
Description copied from interface: IBaseSearchQueryRO
Returns the Content Server portlets the search was restricted to, if any.

Specified by:
GetPortletRestrictions in interface IBaseSearchQueryRO
See Also:
com.plumtree.portalpages.search.IBaseSearchQueryRO.getPortletRestrictions()

GetCollabProjectRestrictions

public int[] GetCollabProjectRestrictions()
Description copied from interface: IBaseSearchQueryRO
Returns the Collab projects the search was restricted to, if any.

Specified by:
GetCollabProjectRestrictions in interface IBaseSearchQueryRO
See Also:
com.plumtree.portalpages.search.IBaseSearchQueryRO.getCollabProjectRestrictions()

GetStyleSheet

public java.lang.String GetStyleSheet(int nCommunityID)
Return the stylesheet for the community; used when processing the style sheet.


GetHeaderID

public int GetHeaderID(int nCommunityID)
Return the headerID for the community; used when processing the style sheet.


GetCorrectionFrequency

public int GetCorrectionFrequency(int misspellingIndex,
                                  int correctionIndex)
Description copied from interface: ISearchResultModelRO
Returns the number of times the given correction actually matched a document.

Specified by:
GetCorrectionFrequency in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getCorrectionFrequency()

GetCurrentKey

public java.lang.String GetCurrentKey()
Description copied from interface: ISearchResultModelRO
Returns a key that should be attached to all URLs that access this model; this key allows the model to find the search result on which a URL was generated if the user hits the BACK button.

Specified by:
GetCurrentKey in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getCurrentKey()

hasDrilledDownIntoSingleCategory

public boolean hasDrilledDownIntoSingleCategory(java.lang.String orgType)
Description copied from interface: ISearchResultModelRO
Returns true if this model has been drilled down into a single category of the given organization scheme.

Specified by:
hasDrilledDownIntoSingleCategory in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.hasDrilledDownIntoSingleCategory()

getDisplayableNameForType

public static java.lang.String getDisplayableNameForType(AActivitySpace m_asOwner,
                                                         int classId)
Parameters:
m_asOwner -
classId -
Returns:

GetDocFolderRestrictions

public int[] GetDocFolderRestrictions()
Description copied from interface: IBaseSearchQueryRO
Returns the document folders the search was restricted to, if any.

Specified by:
GetDocFolderRestrictions in interface IBaseSearchQueryRO
See Also:
com.plumtree.portalpages.search.IBaseSearchQueryRO.getDocFolderRestrictions()

GetDrilldownDepth

public int GetDrilldownDepth()
Description copied from interface: ISearchResultModelRO
Returns the number of drilldown steps the user has taken.

Specified by:
GetDrilldownDepth in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getDrilldownDepth()

isEntireGroupReturned

public boolean isEntireGroupReturned(int groupIdx)
Description copied from interface: ISearchResultModelRO
Returns true if all results in the group were returned.

Specified by:
isEntireGroupReturned in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.isEntireGroupReturned()

GetFolderNameForID

public java.lang.String GetFolderNameForID(int id,
                                           boolean isAdmin)
Description copied from interface: IBaseSearchQueryRO
Utility method to lookup the name of a folder given its id. Pass isAdmin = true for admin folders, false for doc folders.

Specified by:
GetFolderNameForID in interface IBaseSearchQueryRO
See Also:
com.plumtree.portalpages.search.IBaseSearchQueryRO.getFolderNameForID()

GetGroupName

public java.lang.String GetGroupName(int groupIdx)
Description copied from interface: ISearchResultModelRO
Returns the name of the indicated group.

Specified by:
GetGroupName in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getGroupName()

GetGroupIcon

public java.lang.Object GetGroupIcon(int groupIdx)
Description copied from interface: ISearchResultModelRO
Returns an icon (actually an HTMLImg) for the indicated group, or null if there is no appropriate icon.

Specified by:
GetGroupIcon in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.GetGroupIcon()

GetGroupsForAncestorKey

public XPHashtable GetGroupsForAncestorKey(java.lang.String ancestorKey)
Special-case method for use only by DrilldownView. Not exposed through ISearchResultModelRO interface. Returns the set of groups that was generated for some ancestor of the drilled-down response currently being shown. This is used to generate a view that lets the user jump to a sibling of the current response. For example, if the user has drilled down into the "Documents" category, such a view might let the user jump over to the (sibling) "Portlets" category. For now, this method only works if the requested ancestor was grouped by object type.


GetLastDrilldownGroup

public java.lang.String GetLastDrilldownGroup()
Special-case method for use only by DrilldownView. Not exposed through ISearchResultModelRO interface. Returns the ID of the last group we drilled down into. For example, if the initial search was grouped by Object Type, and the user selected Portlets (group 3) and drilled down, this would return "3".


GetHasBeenSaved

public boolean GetHasBeenSaved()
Description copied from interface: ISaveSearchModelRO
Returns true if this search has already been saved.

Specified by:
GetHasBeenSaved in interface ISaveSearchModelRO
See Also:
com.plumtree.portalpages.search.ISaveSearchModelRO.GetHasBeenSaved()

GetIncludeSubfolders

public boolean GetIncludeSubfolders()
Description copied from interface: IBaseSearchQueryRO
Returns true if the folder restrictions included subfolders.

Specified by:
GetIncludeSubfolders in interface IBaseSearchQueryRO
See Also:
com.plumtree.portalpages.search.IBaseSearchQueryRO.getIncludeSubfolders()

GetKWIC

public java.lang.String GetKWIC(int rank)
Description copied from interface: IBaseSearchResultModelRO
Returns the keyword-in-context (KWIC) information for a result. This method html-encodes always returns an html-encoded result, except that keywords are surrounded by highlighting tags. Note that html-encoding is NOT applied to the return value of any other method from this interface.

Specified by:
GetKWIC in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getKWIC()

GetLanguageRestriction

public java.lang.String GetLanguageRestriction()
Description copied from interface: IBaseSearchQueryRO
Returns the two-character code for the language restriction, if any, or null otherwise.

Specified by:
GetLanguageRestriction in interface IBaseSearchQueryRO
See Also:
com.plumtree.portalpages.search.IBaseSearchQueryRO.getLanguageRestriction()

GetLastGroupByField

public java.lang.String GetLastGroupByField()
Description copied from interface: ISearchResultModelRO
Returns the most recent categorization field

Specified by:
GetLastGroupByField in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getLastGroupByField()

SetPageMode

public void SetPageMode(java.lang.String pageMode)
Description copied from interface: ISearchResultModel
SearchResultModel holds onto a "page mode" string for the benefit of client code.. it doesn't care about the contents.

Specified by:
SetPageMode in interface ISearchResultModel
See Also:
com.plumtree.portaluiinfrastructure.search.ISearchResultModel.SetPageMode()

GetPageMode

public java.lang.String GetPageMode()
Description copied from interface: ISearchResultModelRO
SearchResultModel holds onto a "page mode" string for the benefit of client code.. it doesn't care about the contents.

Specified by:
GetPageMode in interface ISearchResultModelRO
See Also:
com.plumtree.portaluiinfrastructure.search.ISearchResultModelRO.GetPageMode()

GetMisspelledToken

public java.lang.String GetMisspelledToken(int misspellingIndex)
Description copied from interface: ISearchResultModelRO
Returns a single misspelled token.

Specified by:
GetMisspelledToken in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getMisspelledToken()

GetNumCorrections

public int GetNumCorrections(int misspellingIndex)
Description copied from interface: ISearchResultModelRO
Returns the number of corrections for the indicated misspelling.

Specified by:
GetNumCorrections in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getNumCorrections()

GetNumMisspelledTokens

public int GetNumMisspelledTokens()
Description copied from interface: ISearchResultModelRO
Returns the number of misspelled tokens.

Specified by:
GetNumMisspelledTokens in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getNumMisspelledTokens()

GetNumResultGroups

public int GetNumResultGroups()
Description copied from interface: ISearchResultModelRO
Returns the number of result groups.

Specified by:
GetNumResultGroups in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getNumResultGroups()

GetObjectTypeRestrictions

public int[] GetObjectTypeRestrictions()
Description copied from interface: IBaseSearchQueryRO
Returns the types (as PT_CLASSIDs) the search was restricted to, if any.

Specified by:
GetObjectTypeRestrictions in interface IBaseSearchQueryRO
See Also:
com.plumtree.portalpages.search.IBaseSearchQueryRO.getObjectTypeRestrictions()

GetReconstructionArgs

public XPHashtable GetReconstructionArgs()
Description copied from interface: ISearchResultModelRO
Get URL arguments that are sufficient to reconstruct this search result if it has been flushed from the cache. These are returned as an XPHashtable from a String key to an array of String values.

Specified by:
GetReconstructionArgs in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getReconstructionArgs()

GetReconstructionArgs

public XPHashtable GetReconstructionArgs(boolean wantPageContext)
Description copied from interface: ISearchResultModelRO
Same as getReconstructionArgs(), but if pageContext is false, omit any args that indicate what page the model is on - i.e. the model will come back on page 1 with the default sort order and organization.

Specified by:
GetReconstructionArgs in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getReconstructionArgs()

GetReconstructionArgs

public XPHashtable GetReconstructionArgs(java.lang.String prefix,
                                         boolean wantPageContext)
Specified by:
GetReconstructionArgs in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getReconstructionArgs()

GetResultAbsType

public java.lang.String GetResultAbsType(int rank)
Description copied from interface: IBaseSearchResultModelRO
Returns a result's abstract (app-independent) type: DOCUMENT, CONTAINER, or OTHER.

Specified by:
GetResultAbsType in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultAbsType()

GetResultApp

public java.lang.String GetResultApp(int rank)
Description copied from interface: IBaseSearchResultModelRO
Returns a result's application: PTPORTAL, PTCOLLAB, PTCONTENT.

Specified by:
GetResultApp in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultApp()

isResultBestBet

public boolean isResultBestBet(int rank)
Description copied from interface: IBaseSearchResultModelRO
Returns true if a result is a Best Bet.

Specified by:
isResultBestBet in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultName()

GetResultBestBetKey

public java.lang.String GetResultBestBetKey(int rank)
Description copied from interface: ISearchResultModelRO
Returns an internal key used by Best Bets; do not call otherwise

Specified by:
GetResultBestBetKey in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultBestBetKey()

GetResultClassID

public int GetResultClassID(int rank)
Description copied from interface: IBaseSearchResultModelRO
Returns a result's class ID. Defined for portal objects only, returns -1 for other types.

Specified by:
GetResultClassID in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultClassID()

GetResultEditLink

public HTMLAnchor GetResultEditLink(int rank,
                                    boolean allowPopup)
                             throws SearchModelException
Returns an edit link that may be used for clickthrough.

Specified by:
GetResultEditLink in interface ISearchResultModelRO
Throws:
SearchModelException

GetResultClickthroughURL

public HTMLAnchor GetResultClickthroughURL(int rank,
                                           boolean allowPopup)
Returns a view link that may be used for clickthrough.

Specified by:
GetResultClickthroughURL in interface ISearchResultModelRO

GetResultClickthroughURL

public HTMLAnchor GetResultClickthroughURL(int rank,
                                           boolean allowPopup,
                                           boolean editMode)
Description copied from interface: ISearchResultModelRO
Returns an URL that may be used for clickthrough.

Specified by:
GetResultClickthroughURL in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultClickthroughURL()

GetResultClickthroughURL

public HTMLAnchor GetResultClickthroughURL(int rank,
                                           boolean allowPopup,
                                           boolean editMode,
                                           java.lang.String extraParams)
Description copied from interface: ISearchResultModelRO
Returns an URL that may be used for clickthrough.

Specified by:
GetResultClickthroughURL in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultClickthroughURL()

GetResultCollabProjectName

public java.lang.String GetResultCollabProjectName(int rank)
Description copied from interface: ISearchResultModelRO
Special call for Collab Server results; returns the name of the item's containing project.

Specified by:
GetResultCollabProjectName in interface ISearchResultModelRO
See Also:
com.plumtree.portaluiinfrastructure.search.ISearchResultModelRO.GetResultCollabProjectName()

GetResultCollabProjectURL

public java.lang.String GetResultCollabProjectURL(int rank)
Description copied from interface: ISearchResultModelRO
Special call for Collab Server results; returns the URL used to open the containing project.

Specified by:
GetResultCollabProjectURL in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultCollabProjectURL()

GetResultPortletField

public java.lang.String GetResultPortletField(int rank,
                                              int fieldId)
Description copied from interface: IBaseSearchResultModelRO
Returns the value of a gadget field for the result. Portlet fields are a small set of special case fields: PT_SEARCH_INTERNAL_FIELD.PT_SEARCH_IF_GADGET_TYPE PT_SEARCH_INTERNAL_FIELD.PT_SEARCH_IF_GADGET_ALIGNMENT PT_SEARCH_INTERNAL_FIELD.PT_SEARCH_IF_GADGET_USER_INTERFACES

Specified by:
GetResultPortletField in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.IBaseSearchResultModelRO.GetResultPortletField()

GetResultContentLastPubUser

public java.lang.String GetResultContentLastPubUser(int rank)
Description copied from interface: ISearchResultModelRO
Special call for Content Server results; returns the "last published by" username.

Specified by:
GetResultContentLastPubUser in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultContentLastPubUser()

GetResultContentPortletIDs

public int[] GetResultContentPortletIDs(int rank)
Description copied from interface: ISearchResultModelRO
Special call for Content Server results; returns the IDs of this result's parent portlets.

Specified by:
GetResultContentPortletIDs in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultContentPortletIDs()

GetResultCreated

public XPDateTime GetResultCreated(int rank)
Description copied from interface: IBaseSearchResultModelRO
Returns a result's creation date.

Specified by:
GetResultCreated in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultCreated()

GetResultEODField

public java.lang.String GetResultEODField(int rank,
                                          int propertyId)
Description copied from interface: IBaseSearchResultModelRO
Returns the value of an EOD property for a result.

Specified by:
GetResultEODField in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultField()

GetResultEODFieldAsObject

public java.lang.Object GetResultEODFieldAsObject(int rank,
                                                  int propertyId)

GetResultFolderID

public int GetResultFolderID(int rank)
Description copied from interface: IBaseSearchResultModelRO
Returns the ID of the folder in which this result is found.

Specified by:
GetResultFolderID in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultFolderID()

ExternalLightInitialization

public void ExternalLightInitialization(IPTSearchResponse sr,
                                        AActivitySpace asSpace)

GetResultIcon

public java.lang.Object GetResultIcon(int rank)
Description copied from interface: IBaseSearchResultModelRO
Returns the icon corresponding to an item's application and class, and any other relevant info (i.e. file extension) This actually returns an HTMLImg.

Specified by:
GetResultIcon in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultIcon()

GetResultLastModified

public XPDateTime GetResultLastModified(int rank)
Description copied from interface: IBaseSearchResultModelRO
Returns a result's last-modified date.

Specified by:
GetResultLastModified in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultLastModified()

GetResultName

public java.lang.String GetResultName(int rank)
Description copied from interface: IBaseSearchResultModelRO
Returns a result's name.

Specified by:
GetResultName in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultName()

GetResultObjectID

public int GetResultObjectID(int rank)
Description copied from interface: IBaseSearchResultModelRO
Returns a result's object ID. Defined for portal objects only, returns -1 for other types.

Specified by:
GetResultObjectID in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultObjectID()

GetResultPath

public java.lang.String GetResultPath(int rank)
Description copied from interface: IBaseSearchResultModelRO
Returns the full path to a result.

Specified by:
GetResultPath in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultPath()

GetResultPropertiesURL

public HTMLAnchor GetResultPropertiesURL(int rank,
                                         boolean allowPopup)
Description copied from interface: ISearchResultModelRO
Returns an URL that may be used to open a "properties" page for the item, or null if there is no such page.

Specified by:
GetResultPropertiesURL in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultPropertiesURL()

GetResultRank

public int GetResultRank(int groupNum,
                         int resultNum)
Description copied from interface: ISearchResultModelRO
Returns the overall relevance rank of a grouped result.

Specified by:
GetResultRank in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultRank()

GetResultSize

public int GetResultSize(int rank)
Description copied from interface: IBaseSearchResultModelRO
Returns a result's size.

Specified by:
GetResultSize in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultSize()

GetResultSubType

public java.lang.String GetResultSubType(int rank)
Description copied from interface: IBaseSearchResultModelRO
Returns a result's app-specific subtype: PTCARD, PTGADGET, etc.

Specified by:
GetResultSubType in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getResultSubType()

GetResultStyleClass

public java.lang.String GetResultStyleClass(java.lang.String subType)
Specified by:
GetResultStyleClass in interface ISearchResultModelRO
See Also:
ISearchResultModelRO.GetResultStyleClass(java.lang.String)

GetResultTypeUUID

public java.lang.String GetResultTypeUUID(int rank)
Parameters:
rank -
Returns:

GetReturnedResultsInGroup

public int GetReturnedResultsInGroup(int groupIdx)
Description copied from interface: ISearchResultModelRO
Returns the number of results in the indicated group that were actually returned.

Specified by:
GetReturnedResultsInGroup in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getReturnedResultsInGroup()

SetSavedSearchErrorCode

public void SetSavedSearchErrorCode(int code)
Description copied from interface: ISaveSearchModel
Sets an int that clients can use to communicate conditions like "a saved search already exists with that name".

Specified by:
SetSavedSearchErrorCode in interface ISaveSearchModel
See Also:
com.plumtree.portalpages.search.ISaveSearchModel.SetSavedSearchErrorCode()

GetSavedSearchErrorCode

public int GetSavedSearchErrorCode()
Description copied from interface: ISaveSearchModelRO
Returns an int that clients can set via ISaveSearchModel.setSavedSearchErrorCode() to communicate conditions like "a saved search already exists with that name". Default is zero.

Specified by:
GetSavedSearchErrorCode in interface ISaveSearchModelRO
See Also:
com.plumtree.portalpages.search.ISaveSearchModelRO.GetSavedSearchErrorCode()

SetSavedSearchName

public void SetSavedSearchName(java.lang.String name)
Description copied from interface: ISaveSearchModel
Call to set a flag to indicate that this search has been saved, and the "save this search" link no longer should be displayed.

Specified by:
SetSavedSearchName in interface ISaveSearchModel
See Also:
com.plumtree.portalpages.search.ISaveSearchModel.SetSavedSearchName()

GetSavedSearchName

public java.lang.String GetSavedSearchName()
Description copied from interface: ISaveSearchModelRO
Returns the name of the search if the search has been saved, or null otherwise.

Specified by:
GetSavedSearchName in interface ISaveSearchModelRO
See Also:
com.plumtree.portalpages.search.ISaveSearchModelRO.GetSavedSearchName()

GetSearchAgainArgs

public XPHashtable GetSearchAgainArgs(boolean includeOptional)
Description copied from interface: ISearchResultModelRO
Returns arguments that can be used for a followup search with the same settings as the current search. If removeOptional is true, then any settings that are in the "removable" set (as returned by GetRemovableSettings()) are not included in the returned XPHashtable.

Specified by:
GetSearchAgainArgs in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getSearchAgainArgs()

GetSearchString

public java.lang.String GetSearchString()
Description copied from interface: IBaseSearchQueryRO
Returns the user's original search string.

Specified by:
GetSearchString in interface IBaseSearchQueryRO
See Also:
com.plumtree.portalpages.search.IBaseSearchQueryRO.getSearchString()

GetSpellingCorrection

public java.lang.String GetSpellingCorrection(int misspellingIndex,
                                              int correctionIndex)
Description copied from interface: ISearchResultModelRO
Returns a single corrected token for the indicated misspelling.

Specified by:
GetSpellingCorrection in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getSpellingCorrection()

GetTotalResultsInGroup

public java.lang.String GetTotalResultsInGroup(int groupIdx)
Description copied from interface: ISearchResultModelRO
Returns the total number of results in the indicated group. The total may be an estimate of the form "~ 100".

Specified by:
GetTotalResultsInGroup in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.getTotalResultsInGroup()

CleanupTempData

public void CleanupTempData()
Description copied from interface: IModel
This method is called at the end of every HTTP request by the Interpreter. The Interpreter calls AActivitySpace.CleanupTempData(), which calls this method on all IModels registered using AActivitySpace.RegisterModel(). This method is intended for cleaning up temporary data that is only used for the lifetime of a single request, like DB query results.

Specified by:
CleanupTempData in interface IModel
See Also:
IModel.CleanupTempData()

CleanupAllData

public void CleanupAllData()
Description copied from interface: IModel
This method is called when an ActivitySpace is removed from the cache. The Interpreter calls AActivitySpace.CleanupAllData(), which calls this method on all IModels registered using AActivitySpace.RegisterModel(). This method is intended for releasing data stored in the server when the activity space is no longer needed, such as search objects that need to be maintained as long as the user is clicking through the search, but should be freed when the space can no longer be used. This can be used to prevent Java references to COM memory from hanging around in the long lived Java heap without cleaning up the underlying COM memory. The Java reference will still stay in the long lived heap until it gets garbage collected (which could be a while), but the COM memory should get released here. This method will not be called if an HTTPSession times out. CleanupTempData will be called before CleanupAllData.

Specified by:
CleanupAllData in interface IModel
See Also:
IModel.CleanupAllData()

Create

public java.lang.Object Create()
Description copied from interface: IManagedObject
This method is used by the ASManager to return new instances of managed objects.

Specified by:
Create in interface IManagedObject
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()

Drilldown

public void Drilldown(java.lang.String keyOnPage,
                      java.lang.String groupByField,
                      int category)
               throws SearchExecutionException
Description copied from interface: ISearchResultModel
Drill down into the indicated category. Pass in the groupby field that was used to generate the set of categories you are using; the model should validate that it is using the right categories.

Specified by:
Drilldown in interface ISearchResultModel
Throws:
SearchExecutionException
See Also:
com.plumtree.portalpages.search.ISearchResultModel.Drilldown()

GetError

public SearchExecutionError GetError()
Description copied from interface: IBaseSearchResultModelRO
Returns any SearchExecutionError that occurred during the last search. If this is non-null, then no search results are available (and calling any of the getResultXXX methods will result in throwing another exception). This error should be displayed to the user in some way.

Specified by:
GetError in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.IBaseSearchResultModelRO.GetError()

GetFirstDisplayableItem

public int GetFirstDisplayableItem()
Description copied from interface: IPaginationRO
Returns the index of the first displayable item. On the first page of results, this will be 1; on subsequent pages it will be 11, 21, and so on (if there are 10 items per page).

Specified by:
GetFirstDisplayableItem in interface IPaginationRO
See Also:
IPaginationRO.GetFirstDisplayableItem()

GetItemsPerPage

public int GetItemsPerPage()
Description copied from interface: IPaginationRO
Returns the user's desired results per page. This may differ from the number of currently displayable items if the total number of items is short or if the user is looking at the last page. or if the user is looking at the last result page.

Specified by:
GetItemsPerPage in interface IPaginationRO
See Also:
IPaginationRO.GetItemsPerPage()

GetName

public java.lang.String GetName()
Description copied from interface: IMVCObject
Return the name of the MVC object.

Specified by:
GetName in interface IMVCObject
Returns:
the name of the object.
See Also:
com.plumtree.portaluiinfrastructure.activityspace.IModelRO#GetName()

GetNumDisplayableItems

public int GetNumDisplayableItems()
Description copied from interface: IPaginationRO
Returns the number of results actually returned.

Specified by:
GetNumDisplayableItems in interface IPaginationRO
See Also:
IPaginationRO.GetNumDisplayableItems()

GetRemovableSettings

public SearchSettingCollection GetRemovableSettings()
Description copied from interface: ISearchResultModelRO
Returns settings that were used for this search, but that could be removed from followup searches if desired

Specified by:
GetRemovableSettings in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.GetRemovableSettings()

GetSortOrder

public java.lang.String GetSortOrder()
Description copied from interface: ISearchResultModel
Gets the property id that is currently used as the order by property in the model.

Specified by:
GetSortOrder in interface ISearchResultModel
Specified by:
GetSortOrder in interface IPaginationRO
Returns:
Property Id as a string
See Also:
IPaginationRO.GetItemsPerPage()

GetTotalItems

public int GetTotalItems()
Description copied from interface: IPaginationRO
Returns the total number of items, some of which may not currently be displayable.

Specified by:
GetTotalItems in interface IPaginationRO
See Also:
IPaginationRO.GetTotalItems()

GetWarning

public SearchExecutionWarning GetWarning()
Description copied from interface: IBaseSearchResultModelRO
Returns any SearchExecutionWarning that occurred during the last search. If this is non-null, then the warning should be displayed to the user, but some search results are still available (they may not be complete or may not match the user's expectations).

Specified by:
GetWarning in interface IBaseSearchResultModelRO
See Also:
com.plumtree.portalpages.search.IBaseSearchResultModelRO.GetWarning()

RefreshResults

public void RefreshResults(java.lang.String keyOnPage)
Description copied from interface: ISearchResultModel
Rerun the search that generated the indicated page; call this following any action that may change the result set.

Specified by:
RefreshResults in interface ISearchResultModel
See Also:
com.plumtree.portalpages.search.ISearchResultModel.RefreshResults()

GetHasDisplayedObjects

public boolean GetHasDisplayedObjects(int classID)

ChangeSortOrder

public void ChangeSortOrder(java.lang.String sortOrder,
                            java.lang.Object additionalInfo)
Same as GoToPage but only changes sort order. Called from SortOrderControl

Specified by:
ChangeSortOrder in interface ISearchResultModel
Parameters:
sortOrder -
additionalInfo -

GoToPage

public void GoToPage(java.lang.String sortOrder,
                     int first,
                     int pageSize,
                     java.lang.Object additionalInfo)
Description copied from interface: IPagination
Go to another page.

Specified by:
GoToPage in interface IPagination
Parameters:
sortOrder - Sort order in which firstItemOnPage should be interpreted
first - First item to appear on page (1-based)
pageSize - Desired number of items on page
additionalInfo - Additional application-specific info, if needed
See Also:
IPagination.GoToPage(java.lang.String, int, int, java.lang.Object)

Init

public void Init(AActivitySpace parent)
Description copied from interface: IModel
This method initializes the model. This is called automatically when AActivitySpace.RegisterModel() is called.

Specified by:
Init in interface IModel
Parameters:
parent - the parent Activity Space
See Also:
com.plumtree.portaluiinfrastructure.activityspace.IModel#Init(AActivitySpace)

IsInitialized

public boolean IsInitialized()
Description copied from interface: IBaseSearchResultModelRO
Returns true if the model has been initialized (i.e. if a search has been run).

Specified by:
IsInitialized in interface IBaseSearchResultModelRO
Specified by:
IsInitialized in interface ISearchResultModel
See Also:
com.plumtree.portalpages.search.ISearchResultModel.isInitialized()

Reorganize

public void Reorganize(java.lang.String keyOnPage,
                       java.lang.String groupByField)
                throws SearchExecutionException
Description copied from interface: ISearchResultModel
Perform a different categorization on the current result set

Specified by:
Reorganize in interface ISearchResultModel
Throws:
SearchExecutionException
See Also:
com.plumtree.portalpages.search.ISearchResultModel.Reorganize

RestoreFromBreadcrumb

public void RestoreFromBreadcrumb(java.lang.String keyOfPageWhereLinkAppears,
                                  java.lang.String keyToRestore)
                           throws SearchExecutionException
Description copied from interface: ISearchResultModel
Follow a breadcrumb link with the specified key.

Specified by:
RestoreFromBreadcrumb in interface ISearchResultModel
Throws:
SearchExecutionException
See Also:
com.plumtree.portalpages.search.ISearchResultModel.RestoreFromBreadcrumb()

Search

public void Search(java.lang.String searchString,
                   java.lang.String basicFields,
                   IPTFilter advancedFilter,
                   SearchSettingCollection settings)
            throws SearchExecutionException
Description copied from interface: ISearchResultModel
Initialize the model by running the provided query with the provided settings.

Specified by:
Search in interface ISearchResultModel
Throws:
SearchExecutionException
See Also:
com.plumtree.portalpages.search.ISearchResultModel.Search()

Search

public void Search(java.lang.String searchString,
                   java.lang.String basicFields,
                   IPTFilter advancedFilter,
                   SearchSettingCollection settings,
                   SearchSettingCollection removableSettings)
            throws SearchExecutionException
Description copied from interface: ISearchResultModel
Initialize the model by running the provided query with the provided settings (allSettings). removableSettings, if non-null, are those settings that may be removed on a followup search.

Specified by:
Search in interface ISearchResultModel
Throws:
SearchExecutionException
See Also:
com.plumtree.portalpages.search.ISearchResultModel.Search()

SearchWithinResults

public void SearchWithinResults(java.lang.String keyOnPage,
                                java.lang.String additionalQuery)
                         throws SearchExecutionException
Description copied from interface: ISearchResultModel
Search within results already generated for the indicated additional query string.

Specified by:
SearchWithinResults in interface ISearchResultModel
Throws:
SearchExecutionException
See Also:
com.plumtree.portalpages.search.ISearchResultModel.SearchWithinResults()

SetError

public void SetError(SearchExecutionError e)
Description copied from interface: ISearchResultModel
Tell the model that there was an error on the previous search.

Specified by:
SetError in interface ISearchResultModel
See Also:
com.plumtree.portalpages.search.ISearchResultModel.SetError()

SetWarning

public void SetWarning(SearchExecutionWarning e)
Description copied from interface: ISearchResultModel
Tell the model that there was a warning on the previous search.

Specified by:
SetWarning in interface ISearchResultModel
See Also:
com.plumtree.portalpages.search.ISearchResultModel.SetError()

wasSpellCorrected

public boolean wasSpellCorrected()
Description copied from interface: ISearchResultModelRO
Returns true if the user's search phrase was spell-corrected.

Specified by:
wasSpellCorrected in interface ISearchResultModelRO
See Also:
com.plumtree.portalpages.search.ISearchResultModelRO.wasSpellCorrected()

doSearch

protected void doSearch(IPTSearchQuery additionalQuery,
                        java.lang.String additionalBreadcrumb,
                        java.lang.String newKey)
                 throws SearchExecutionException
doSearch() actually calls the COM side to do the search; this is called from any method that has made a change to the _request object and needs to update the search results. doSearch() also handles the various caches.

Throws:
SearchExecutionException

localizeObjectTypeName

protected java.lang.String localizeObjectTypeName(java.lang.String objType)
Helper method to convert an indexed object type or abstract type to its localized equivalent


restoreState

protected void restoreState(java.lang.String keyOnPage)
                     throws SearchExecutionException
If the user's hit the BACK button before clicking a link, this method restores our state to the way things were on the page where the user clicked the button.

Throws:
SearchExecutionException

ConvertSearchDateTimeToXPDateTime

public static XPDateTime ConvertSearchDateTimeToXPDateTime(double searchTime)

GetDateFormat

public XPDateFormat GetDateFormat(AActivitySpace owner)
Specified by:
GetDateFormat in interface ISearchResultModelRO

Filter

public void Filter(java.lang.String key,
                   int filterId)
Description copied from interface: ISearchResultModel
Filter the search result based on the filterId

Specified by:
Filter in interface ISearchResultModel

ContentInstalled

public boolean ContentInstalled()
Specified by:
ContentInstalled in interface ISearchResultModelRO

CollabInstalled

public boolean CollabInstalled()
Specified by:
CollabInstalled in interface ISearchResultModelRO

GetSelectedTypeFilter

public int GetSelectedTypeFilter()
Specified by:
GetSelectedTypeFilter in interface ISearchResultModelRO



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.