com.plumtree.portalpages.admin.serversettings.search
Class SearchServerTuningEditorModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorModel
      extended by com.plumtree.portalpages.admin.serversettings.search.SearchServerTuningEditorModel
All Implemented Interfaces:
ISearchServerTuningEditorModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IEditorModelRO, IRepostModel

public class SearchServerTuningEditorModel
extends EditorModel
implements ISearchServerTuningEditorModelRO

Author:
SamirM

Nested Class Summary
static class SearchServerTuningEditorModel.AliasElement
           
 
Field Summary
static java.lang.String STR_MVC_CLASS_NAME
           
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
isReadAccessAvailable, m_asOwner, m_bCloseOnDone, m_bDeleteOnCancel, m_bEnableApplyButton, m_bEnableCancelButton, m_bHideLeftNav, m_bIsEditorReadOnly, m_bUserHasAccessToEditor, m_nEditorType
 
Constructor Summary
SearchServerTuningEditorModel()
           
 
Method Summary
 void ActionOnRepost()
           
 void AddAliasTerm(XPHashtable lastUserVals)
           
 AActivitySpace asOwner()
           
protected  void BuildAliasFromElements()
           
protected  boolean CheckBannerAliasAndDelocalizeWeights()
           
 boolean CheckDuplicateBestBetQuery(java.lang.String originalTrigger, java.lang.String strTrigger, boolean bNewlyAdded)
           
 boolean CheckEditorAccessAndStart(XPHashtable _htFormData)
          Implements some actions to perform on start.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DeleteBestBets(int[] ids)
           
 void DeleteTheseAliasTerms(int[] indices, XPHashtable lastUserVals)
           
 void DoApplyChanges(XPHashtable lastUserVals)
           
 void Finish()
          Implement some code to execute when the user clicks on "Finish".
 java.lang.String GetBestBetSearchString()
           
 java.lang.String GetBestBetSetupString(int i)
           
 int GetBestBetStartCount()
           
 IXPList GetBestBetTargets(int i)
           
 java.lang.String GetBestBetTrigger(int i)
           
 java.lang.Object[] GetCurrentAliasElements()
           
 XPStringBuilder GetErrorString()
           
protected  java.lang.String GetFieldAliasFromServer()
           
 boolean GetIsShowAllBestBets()
           
 char GetLocalizedDecimalSeperator()
          GetLocalizedDecimalSeperator - Returns the locale specific decimal seperator.
 java.lang.String GetName()
          Returns the Class name.
 int GetNumAddedBestBets()
           
 int GetNumBestBetsAskedFor()
           
 int GetNumBestBetsOnPage()
           
 int GetNumDeletedBestBets()
           
 boolean GetShowNextBestBet()
           
 boolean GetShowPreviousBestBet()
           
 boolean GetSpellCheckOn()
           
 boolean GetThesaurusOn()
           
 int GetTotalBestBetCount()
           
 boolean HasBestBetBeenDeleted(int i)
           
 boolean HasBestBetBeenNewlyAdded(int i)
           
 boolean HasBestBetStringBeenDeleted(java.lang.String trigger)
           
 void Init(AActivitySpace parent)
          Inits the Model with the Activity Space.
protected  void InitSpellCheckThesaurus()
           
 void LoadLastUserVals(XPHashtable lastUserVals)
           
 java.lang.String LocalizeFloat(java.lang.String strFloatVal)
          LocalizeFloat - Converts internal string representation of floating point number into the locale specific string representation.
 boolean OkToDeleteThisManyAliasTerms(int number)
          Returns true if a sufficient number of terms (1) would be left after the delete.
 void PaginateBestBets(int startCount, int numResultsPerPage)
           
protected  SearchServerTuningEditorModel.AliasElement[] ParseAlias(java.lang.String alias)
           
protected  int RaiseBannerAliasError(java.lang.String message)
           
protected  void RecalculatePercentages(SearchServerTuningEditorModel.AliasElement[] elements)
           
 void RestoreDefaultFieldAlias()
          Restore banner search field alias to default value.
protected  int SaveBannerAlias(XPHashtable _htFormData)
          END - BEST BET RELATED METHODS
protected  void SaveFieldAliasToServer()
           
protected  int SaveMainPage(XPHashtable _htFormData)
           
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
protected  void SaveThesaurusFromForm(XPHashtable _htFormData)
           
protected  void SaveThesaurusSpellToServer()
           
 void SearchBestBets(java.lang.String str)
           
 void SetBestBetStartCount(int n)
           
 void SetNumBestBetsAskedFor(int n)
           
 void SetSpellCheckOn(boolean tf)
          Set spell checking on if tf is true.
 void SetThesaurusOn(boolean tf)
          Set thesaurus usage on if tf is true.
 void ShowAllBestBets()
           
protected  void TraceDebug(java.lang.String msg)
          Trace a message if debug tracing is enabled for the UI component.
 void UpdateBestBetFromSubEditor(java.lang.String originalTrigger, boolean bModifiedBBWasFromDB, java.lang.String strTrigger, java.lang.String setup, IXPList arrTargets)
           
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
Cancel, CleanupAllData, CleanupTempData, DoTaskAfterStore, DoTaskBeforeStore, DoTaskOnChangePage, DoTaskOnComeBackFromSubEditor, DoTaskOnStartEditor, GetAccessToEditorPriviledges, GetCloseOnDone, GetCurrentRepostAction, GetDeleteOnCancel, GetEditorType, GetEnableApplyButton, GetEnableCancelButton, GetHideLeftNav, GetIsEditorReadOnly, GetRedirectAfterFinish, GetUserHasAccessToEditor, SetCloseOnDone, SetDeleteOnCancel, SetEditorType, SetEnableApplyButton, SetHideLeftNav, SetPageStatus, SetUserHasAccessToEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.plumtree.uiinfrastructure.editor.IEditorModelRO
GetEditorType, GetEnableApplyButton, GetEnableCancelButton, GetHideLeftNav, GetIsEditorReadOnly
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
See Also:
Constant Field Values
Constructor Detail

SearchServerTuningEditorModel

public SearchServerTuningEditorModel()
Method Detail

Init

public void Init(AActivitySpace parent)
Description copied from class: EditorModel
Inits the Model with the Activity Space.

Specified by:
Init in interface IModel
Overrides:
Init in class EditorModel
Parameters:
parent - the parent Activity Space

InitSpellCheckThesaurus

protected void InitSpellCheckThesaurus()

GetErrorString

public XPStringBuilder GetErrorString()

CheckEditorAccessAndStart

public boolean CheckEditorAccessAndStart(XPHashtable _htFormData)
Description copied from class: EditorModel
Implements some actions to perform on start. Use the Editor Type if needed.

Specified by:
CheckEditorAccessAndStart in class EditorModel
Returns:
boolean Is true if the current user has the rights to access this Editor.

Create

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

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

Finish

public void Finish()
Description copied from class: EditorModel
Implement some code to execute when the user clicks on "Finish".

Specified by:
Finish in interface IRepostModel
Specified by:
Finish in class EditorModel

DoApplyChanges

public void DoApplyChanges(XPHashtable lastUserVals)

GetName

public java.lang.String GetName()
Description copied from class: EditorModel
Returns the Class name.

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class EditorModel
Returns:

SavePage

public int SavePage(java.lang.String _sPageName,
                    XPHashtable _htFormData)
Description copied from class: EditorModel
Calls the right save function according to the page name passed in argument.

Specified by:
SavePage in interface IRepostModel
Specified by:
SavePage in class EditorModel
Parameters:
_sPageName -
_htFormData -
Returns:

GetBestBetSearchString

public java.lang.String GetBestBetSearchString()
Specified by:
GetBestBetSearchString in interface ISearchServerTuningEditorModelRO

GetIsShowAllBestBets

public boolean GetIsShowAllBestBets()
Specified by:
GetIsShowAllBestBets in interface ISearchServerTuningEditorModelRO

GetNumBestBetsAskedFor

public int GetNumBestBetsAskedFor()
Specified by:
GetNumBestBetsAskedFor in interface ISearchServerTuningEditorModelRO

GetNumBestBetsOnPage

public int GetNumBestBetsOnPage()
Specified by:
GetNumBestBetsOnPage in interface ISearchServerTuningEditorModelRO

GetBestBetStartCount

public int GetBestBetStartCount()
Specified by:
GetBestBetStartCount in interface ISearchServerTuningEditorModelRO

GetShowPreviousBestBet

public boolean GetShowPreviousBestBet()
Specified by:
GetShowPreviousBestBet in interface ISearchServerTuningEditorModelRO

GetShowNextBestBet

public boolean GetShowNextBestBet()
Specified by:
GetShowNextBestBet in interface ISearchServerTuningEditorModelRO

GetTotalBestBetCount

public int GetTotalBestBetCount()
Specified by:
GetTotalBestBetCount in interface ISearchServerTuningEditorModelRO

GetNumDeletedBestBets

public int GetNumDeletedBestBets()
Specified by:
GetNumDeletedBestBets in interface ISearchServerTuningEditorModelRO

GetNumAddedBestBets

public int GetNumAddedBestBets()
Specified by:
GetNumAddedBestBets in interface ISearchServerTuningEditorModelRO

UpdateBestBetFromSubEditor

public void UpdateBestBetFromSubEditor(java.lang.String originalTrigger,
                                       boolean bModifiedBBWasFromDB,
                                       java.lang.String strTrigger,
                                       java.lang.String setup,
                                       IXPList arrTargets)
Specified by:
UpdateBestBetFromSubEditor in interface ISearchServerTuningEditorModelRO

GetBestBetTrigger

public java.lang.String GetBestBetTrigger(int i)
Specified by:
GetBestBetTrigger in interface ISearchServerTuningEditorModelRO

GetBestBetSetupString

public java.lang.String GetBestBetSetupString(int i)
Specified by:
GetBestBetSetupString in interface ISearchServerTuningEditorModelRO

GetBestBetTargets

public IXPList GetBestBetTargets(int i)
Specified by:
GetBestBetTargets in interface ISearchServerTuningEditorModelRO

HasBestBetBeenDeleted

public boolean HasBestBetBeenDeleted(int i)
Specified by:
HasBestBetBeenDeleted in interface ISearchServerTuningEditorModelRO

HasBestBetStringBeenDeleted

public boolean HasBestBetStringBeenDeleted(java.lang.String trigger)

HasBestBetBeenNewlyAdded

public boolean HasBestBetBeenNewlyAdded(int i)
Specified by:
HasBestBetBeenNewlyAdded in interface ISearchServerTuningEditorModelRO

CheckDuplicateBestBetQuery

public boolean CheckDuplicateBestBetQuery(java.lang.String originalTrigger,
                                          java.lang.String strTrigger,
                                          boolean bNewlyAdded)
Specified by:
CheckDuplicateBestBetQuery in interface ISearchServerTuningEditorModelRO

SetNumBestBetsAskedFor

public void SetNumBestBetsAskedFor(int n)

SetBestBetStartCount

public void SetBestBetStartCount(int n)

DeleteBestBets

public void DeleteBestBets(int[] ids)

SearchBestBets

public void SearchBestBets(java.lang.String str)

ShowAllBestBets

public void ShowAllBestBets()

PaginateBestBets

public void PaginateBestBets(int startCount,
                             int numResultsPerPage)

SaveBannerAlias

protected int SaveBannerAlias(XPHashtable _htFormData)
END - BEST BET RELATED METHODS


CheckBannerAliasAndDelocalizeWeights

protected boolean CheckBannerAliasAndDelocalizeWeights()

AddAliasTerm

public void AddAliasTerm(XPHashtable lastUserVals)

OkToDeleteThisManyAliasTerms

public boolean OkToDeleteThisManyAliasTerms(int number)
Description copied from interface: ISearchServerTuningEditorModelRO
Returns true if a sufficient number of terms (1) would be left after the delete.

Specified by:
OkToDeleteThisManyAliasTerms in interface ISearchServerTuningEditorModelRO
Parameters:
number - of terms to delete
Returns:

DeleteTheseAliasTerms

public void DeleteTheseAliasTerms(int[] indices,
                                  XPHashtable lastUserVals)

LoadLastUserVals

public void LoadLastUserVals(XPHashtable lastUserVals)

BuildAliasFromElements

protected void BuildAliasFromElements()

SaveFieldAliasToServer

protected void SaveFieldAliasToServer()

RaiseBannerAliasError

protected int RaiseBannerAliasError(java.lang.String message)

asOwner

public AActivitySpace asOwner()
Returns:

TraceDebug

protected void TraceDebug(java.lang.String msg)
Trace a message if debug tracing is enabled for the UI component. This method could be moved into the EditorModel base class, along with trace() and traceEnabled().


ActionOnRepost

public void ActionOnRepost()

SaveMainPage

protected int SaveMainPage(XPHashtable _htFormData)
Parameters:
_htFormData -
Returns:

SaveThesaurusFromForm

protected void SaveThesaurusFromForm(XPHashtable _htFormData)

SaveThesaurusSpellToServer

protected void SaveThesaurusSpellToServer()

GetFieldAliasFromServer

protected java.lang.String GetFieldAliasFromServer()

ParseAlias

protected SearchServerTuningEditorModel.AliasElement[] ParseAlias(java.lang.String alias)

RestoreDefaultFieldAlias

public void RestoreDefaultFieldAlias()
Description copied from interface: ISearchServerTuningEditorModelRO
Restore banner search field alias to default value.

Specified by:
RestoreDefaultFieldAlias in interface ISearchServerTuningEditorModelRO

GetCurrentAliasElements

public java.lang.Object[] GetCurrentAliasElements()
Specified by:
GetCurrentAliasElements in interface ISearchServerTuningEditorModelRO
Returns:
set of AliasElement objects defining terms of banner field alias.

RecalculatePercentages

protected void RecalculatePercentages(SearchServerTuningEditorModel.AliasElement[] elements)

GetThesaurusOn

public boolean GetThesaurusOn()
Specified by:
GetThesaurusOn in interface ISearchServerTuningEditorModelRO
Returns:
true if thesaurus usage is on.

SetThesaurusOn

public void SetThesaurusOn(boolean tf)
Description copied from interface: ISearchServerTuningEditorModelRO
Set thesaurus usage on if tf is true.

Specified by:
SetThesaurusOn in interface ISearchServerTuningEditorModelRO

GetSpellCheckOn

public boolean GetSpellCheckOn()
Specified by:
GetSpellCheckOn in interface ISearchServerTuningEditorModelRO
Returns:
true if spell checking is on.

SetSpellCheckOn

public void SetSpellCheckOn(boolean tf)
Description copied from interface: ISearchServerTuningEditorModelRO
Set spell checking on if tf is true.

Specified by:
SetSpellCheckOn in interface ISearchServerTuningEditorModelRO

GetLocalizedDecimalSeperator

public char GetLocalizedDecimalSeperator()
GetLocalizedDecimalSeperator - Returns the locale specific decimal seperator. This method is public since it is used by the view. Helper method that deals with localization of floating point #s in the UI.

Returns:

LocalizeFloat

public java.lang.String LocalizeFloat(java.lang.String strFloatVal)
LocalizeFloat - Converts internal string representation of floating point number into the locale specific string representation. This method is public since it is used by the view. Helper method that deals with localization of floating point #s in the UI.

Parameters:
strFloatVal -
Returns:



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