com.plumtree.portalpages.admin.editors.bestbets
Class BestBetModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorModel
      extended by com.plumtree.portalpages.admin.editors.bestbets.BestBetModel
All Implemented Interfaces:
IBestBetModel, IBestBetModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IEditorModelRO, IRepostModel

public class BestBetModel
extends EditorModel
implements IBestBetModelRO, IBestBetModel

Author:
CraigS, based on JulieF template

Field Summary
protected  XPArrayList m_arrListTargets
           
protected  boolean m_bIsBestBetInDB
           
protected  java.lang.String m_originalSearchString
           
protected  java.lang.String m_searchString
           
protected  java.lang.String m_setupSearchString
           
static int MAX_TARGETS
           
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
BestBetModel()
           
 
Method Summary
 void ActionOnRepost()
           
 void AddTarget(java.lang.String newTargId, java.lang.String newTargApp, java.lang.String newTargName)
           
 boolean CheckEditorAccessAndStart(XPHashtable formData)
          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 DeleteTarget(int id)
           
 void Finish()
          Implements actions when the user clicks on "Finish".
 int GetMaxTargets()
           
 java.lang.String GetName()
          Returns the Class name.
 int GetNumTargets()
           
 java.lang.String GetSearchString()
           
 java.lang.String GetSetupSearchString()
           
 java.lang.String GetTargetApp(int id)
           
 java.lang.String GetTargetId(int id)
           
 java.lang.String GetTargetName(int id)
           
 void MoveTargetDown(int id)
           
 void MoveTargetUp(int id)
           
 void MoveToBottom(int id)
           
 void MoveToTop(int id)
           
protected  int SaveMainPage(XPHashtable formData)
          Saves the data on the Main page.
 int SavePage(java.lang.String pageName, XPHashtable formData)
          Calls the right save function according to the page name passed in argument.
 void SetTargetApp(int id, java.lang.String newApp)
           
 void SetTargetId(int id, java.lang.String newID)
           
 void SetTargetName(int id, java.lang.String newName)
           
protected  void SwapTarget(int id1, int id2)
           
 void updateParentSpaceOnSubEditorClose()
          Called (via Finish()) when the Done button is pressed, when this editor is running as a subeditor of the SearchServerSettings editor.
 
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, Init, 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
 
Methods inherited from interface com.plumtree.uiinfrastructure.activityspace.IModel
CleanupAllData, CleanupTempData, Init
 

Field Detail

STR_MVC_CLASS_NAME

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

MAX_TARGETS

public static final int MAX_TARGETS
See Also:
Constant Field Values

m_originalSearchString

protected java.lang.String m_originalSearchString

m_searchString

protected java.lang.String m_searchString

m_setupSearchString

protected java.lang.String m_setupSearchString

m_arrListTargets

protected XPArrayList m_arrListTargets

m_bIsBestBetInDB

protected boolean m_bIsBestBetInDB
Constructor Detail

BestBetModel

public BestBetModel()
Method Detail

ActionOnRepost

public void ActionOnRepost()

AddTarget

public void AddTarget(java.lang.String newTargId,
                      java.lang.String newTargApp,
                      java.lang.String newTargName)
Specified by:
AddTarget in interface IBestBetModel

CheckEditorAccessAndStart

public boolean CheckEditorAccessAndStart(XPHashtable formData)
Implements some actions to perform on start.

Specified by:
CheckEditorAccessAndStart in class EditorModel
Parameters:
formData -
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()

DeleteTarget

public void DeleteTarget(int id)
Specified by:
DeleteTarget in interface IBestBetModel
Parameters:
id -

MoveTargetUp

public void MoveTargetUp(int id)

MoveTargetDown

public void MoveTargetDown(int id)

MoveToTop

public void MoveToTop(int id)

MoveToBottom

public void MoveToBottom(int id)

SwapTarget

protected void SwapTarget(int id1,
                          int id2)

Finish

public void Finish()
Implements actions when the user clicks on "Finish".

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

GetMaxTargets

public int GetMaxTargets()
Specified by:
GetMaxTargets in interface IBestBetModelRO
Returns:

GetName

public java.lang.String GetName()
Returns the Class name.

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

GetNumTargets

public int GetNumTargets()
Specified by:
GetNumTargets in interface IBestBetModelRO
Returns:

GetSearchString

public java.lang.String GetSearchString()
Specified by:
GetSearchString in interface IBestBetModelRO
Returns:

GetSetupSearchString

public java.lang.String GetSetupSearchString()
Specified by:
GetSetupSearchString in interface IBestBetModelRO
Returns:

GetTargetApp

public java.lang.String GetTargetApp(int id)
Specified by:
GetTargetApp in interface IBestBetModelRO
Parameters:
id -
Returns:

GetTargetId

public java.lang.String GetTargetId(int id)
Specified by:
GetTargetId in interface IBestBetModelRO
Parameters:
id -
Returns:

GetTargetName

public java.lang.String GetTargetName(int id)
Specified by:
GetTargetName in interface IBestBetModelRO
Parameters:
id -
Returns:

SetTargetApp

public void SetTargetApp(int id,
                         java.lang.String newApp)

SetTargetName

public void SetTargetName(int id,
                          java.lang.String newName)

SetTargetId

public void SetTargetId(int id,
                        java.lang.String newID)

SavePage

public int SavePage(java.lang.String pageName,
                    XPHashtable formData)
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:
pageName -
formData -
Returns:
int Page status for server side validation

updateParentSpaceOnSubEditorClose

public void updateParentSpaceOnSubEditorClose()
Called (via Finish()) when the Done button is pressed, when this editor is running as a subeditor of the SearchServerSettings editor. Informs the parent editor of the changes that have been made.


SaveMainPage

protected int SaveMainPage(XPHashtable formData)
Saves the data on the Main page.

Parameters:
_formData -



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