|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPTSearchBestBetMaintenance
Interface for an object used to maintain search Best Bets. Best Bets are mappings from user search queries to (up to) 20 top-ranked results; they allow an administrator to hardwire certain common searches to known good results that wouldn't necessarily rank at the top otherwise.
The main underlying Best Bet store is the database. Best Bets are also added to the search server (which is how they are retrieved during a search). There is no limit to the # of Best Bets - there could be thousands or 10s of thousands of entries, so this class gives you a view into the Best Bets list. Call "SetStartCount" to set the start count (first item is 1, not 0), and "SetNumResultsAskedFor" to set the location and size of the window. (defaults are startCount = 1 & numResultsAskedFor = 10). This window is called the "display list" The call "RefreshDisplayList()" fills in the display list using the two parameters above. The list of Best Bets is sorted in ascending alphabetical order by trigger id. Making "Add" and "Delete" calls in this class does not update the database & search server right away. The changes are kept in memory until "ApplyChanges()" is called. In order to be able to calculate the view window into the list of Best Bets, the display list has the following quirks:
Method Summary | |
---|---|
void |
AddBestBet(java.lang.String strTrigger,
java.lang.String strSetupString,
com.plumtree.openfoundation.util.IXPList arrTargets)
Add a new Best Bet to the add list. |
void |
ApplyChanges()
Saves all changes to the database and commits to the search server. |
boolean |
CanAddBestBet(java.lang.String oldTrigger,
java.lang.String newTrigger,
boolean bIsNewlyAdded)
Checks wether a particular Best Bet is addable or not. |
void |
CancelChanges()
Undoes all changes made. |
void |
DeleteAll()
Deletes all Best Bets. |
void |
DeleteByTriggerString(java.lang.String[] triggers)
Takes a list of trigger string, and deletes those triggers. |
void |
DeleteFromDisplayedList(int[] ids)
Takes a list of indices into the displayed list array, and marks the best bets for deletion. |
IPTSResult |
FindFirstTargetForTrigger(java.lang.String trigger,
IPTSField[] arrFieldsToReturn)
Like the other Find calls, this method should not strictly be here. |
com.plumtree.openfoundation.util.IXPList |
FindTriggersContainingTarget(java.lang.String id,
java.lang.String type)
This method should not strictly be here since it has little to do with maintenance. |
com.plumtree.openfoundation.util.IXPList |
FindTriggersWithFirstTarget(java.lang.String id,
java.lang.String type)
This method should not strictly be here since it has little to do with maintenance. |
int |
GetAddedCount()
Get a count of the # of items added since the last commit. |
int |
GetDeletedCount()
Get a count of the # of items deleted since the last commit. |
int |
GetDisplayedCount()
Get the # of displayed items. |
java.lang.String |
GetDisplayedItemSetupString(int i)
Get the item setup string. |
com.plumtree.openfoundation.util.IXPList |
GetDisplayedItemTargets(int i)
Gets an IXPList of IPTBestBetTarget items. |
java.lang.String |
GetDisplayedItemTrigger(int i)
Get the item's trigger string. |
boolean |
GetShowingAll()
Determine of there is a query restriction or if all Best Bets are being displayed. |
int |
GetTotalCount()
Get the total count of Best Bets. |
boolean |
HasBestBetBeenDeleted(java.lang.String trigger)
Returns true if the Best Bet with the given trigger string has been deleted since the last "ApplyChanges()" call. |
boolean |
HasDisplayedItemBeenDeleted(int i)
Returns true if the display item at the given index has been deleted since the last "ApplyChanges()" call. |
boolean |
HasDisplayedItemBeenNewlyAdded(int i)
Returns true if the display item at the given index was newly added since the last "ApplyChanges()" call. |
void |
RefreshDisplayList()
Call to refresh the display list. |
void |
SetNumResultsAskedFor(int nResults)
Set the number of items to get when fetching Best Bets (size of view window). |
void |
SetSearchString(java.lang.String strSearch)
Set the search string to use to limit the display list. |
void |
SetShowingAll(boolean bShowAllBBs)
When set to true, removes any search restriction that exists. |
void |
SetStartCount(int nStartCount)
Set the start count (starting at 1) to use when fetching Best Bets. |
void |
UpdateBestBet(java.lang.String strOldTrigger,
boolean bIsFromDB,
java.lang.String strTrigger,
java.lang.String strSetupString,
com.plumtree.openfoundation.util.IXPList arrTargets)
Update an existing Best Bet. |
Methods inherited from interface com.plumtree.server.IPTUnknown |
---|
GetInterfaces |
Method Detail |
---|
boolean CanAddBestBet(java.lang.String oldTrigger, java.lang.String newTrigger, boolean bIsNewlyAdded)
void DeleteFromDisplayedList(int[] ids)
void DeleteByTriggerString(java.lang.String[] triggers)
void DeleteAll()
void AddBestBet(java.lang.String strTrigger, java.lang.String strSetupString, com.plumtree.openfoundation.util.IXPList arrTargets)
void UpdateBestBet(java.lang.String strOldTrigger, boolean bIsFromDB, java.lang.String strTrigger, java.lang.String strSetupString, com.plumtree.openfoundation.util.IXPList arrTargets)
void ApplyChanges()
void CancelChanges()
void RefreshDisplayList()
int GetAddedCount()
int GetDeletedCount()
int GetDisplayedCount()
int GetTotalCount()
boolean GetShowingAll()
java.lang.String GetDisplayedItemSetupString(int i)
java.lang.String GetDisplayedItemTrigger(int i)
com.plumtree.openfoundation.util.IXPList GetDisplayedItemTargets(int i)
IXPList
of IPTBestBetTarget
items.
boolean HasDisplayedItemBeenDeleted(int i)
i
-
boolean HasDisplayedItemBeenNewlyAdded(int i)
i
-
boolean HasBestBetBeenDeleted(java.lang.String trigger)
trigger
-
void SetSearchString(java.lang.String strSearch)
strSearch
- void SetStartCount(int nStartCount)
nStartCount
- void SetNumResultsAskedFor(int nResults)
nResults
- void SetShowingAll(boolean bShowAllBBs)
bShowAllBBs
- com.plumtree.openfoundation.util.IXPList FindTriggersContainingTarget(java.lang.String id, java.lang.String type)
id
- id of target documenttype
- type of target document
com.plumtree.openfoundation.util.IXPList FindTriggersWithFirstTarget(java.lang.String id, java.lang.String type)
id
- id of target documenttype
- type of target document
IPTSResult FindFirstTargetForTrigger(java.lang.String trigger, IPTSField[] arrFieldsToReturn)
trigger
- - Query stringarrFieldsToReturn
- - Array of fields to return.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |