com.plumtree.portalpages.browsing.editors.editportletprefs
Class EditPortletPrefsModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorModel
      extended by com.plumtree.portalpages.browsing.editors.editportletprefs.EditPortletPrefsModel
All Implemented Interfaces:
IPortletPreferencesModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IEditorModelRO, IRepostModel

public class EditPortletPrefsModel
extends EditorModel
implements IEditorModelRO, IPortletPreferencesModelRO

This class keeps an up-to-date state of all the settings. It contains the set and get methods for those settings. It contains the start, save and finish methods. This class is used by the Section Misc2View (to get the latest value of the settings to display) and by the Control Misc2RepostControl (to perform the repost actions).

Author:
RobertZ, Bridget Frey

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
EditPortletPrefsModel()
           
 
Method Summary
 void ActionOnRepost()
          Modifies the object name on repost.
 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.
 boolean DisplayTitleBarColumn()
           
 void Finish()
          Implement some code to execute when the user clicks on "Finish".
 int GetCommunityID()
           
 java.lang.String GetName()
          Returns the Class name.
 int GetPageCount()
           
 int GetPageID(int nPageIndex)
           
 java.lang.String GetPageName(int nPageIndex)
           
 PTSortedArrayWrapper GetPortletPreferencesList(int iPageID)
           
 Redirect GetRedirectAfterFinish()
          Returns the Obj Manager Redirect object (this is were we need to go at the end of the Editor).
 boolean IsCommunityEditor()
          If this is the community editor, then we link to the community prefs page; if it's a community page but we're not in the community editor, then we link to the user-gadget-community prefs page.
 void ReversePortletPrefsSort(XPHashtable _htFormData)
          Reverses the sort order of one of the pages of gadget prefs.
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
 
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, 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
 

Field Detail

STR_MVC_CLASS_NAME

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

EditPortletPrefsModel

public EditPortletPrefsModel()
Method Detail

ActionOnRepost

public void ActionOnRepost()
Modifies the object name on repost.


CheckEditorAccessAndStart

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

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

DisplayTitleBarColumn

public boolean DisplayTitleBarColumn()
Specified by:
DisplayTitleBarColumn in interface IPortletPreferencesModelRO
Returns:

Finish

public void Finish()
Implement some code to execute when the user clicks on "Finish".

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

GetCommunityID

public int GetCommunityID()
Specified by:
GetCommunityID in interface IPortletPreferencesModelRO
Returns:

GetPortletPreferencesList

public PTSortedArrayWrapper GetPortletPreferencesList(int iPageID)
Specified by:
GetPortletPreferencesList in interface IPortletPreferencesModelRO
Parameters:
iPageID -
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

GetPageCount

public int GetPageCount()
Specified by:
GetPageCount in interface IPortletPreferencesModelRO
Returns:

GetPageID

public int GetPageID(int nPageIndex)
Specified by:
GetPageID in interface IPortletPreferencesModelRO
Returns:
See Also:
IPortletPreferencesModelRO.GetPageID(int)

GetPageName

public java.lang.String GetPageName(int nPageIndex)
Specified by:
GetPageName in interface IPortletPreferencesModelRO
Parameters:
nPageIndex -
Returns:

IsCommunityEditor

public boolean IsCommunityEditor()
Description copied from interface: IPortletPreferencesModelRO
If this is the community editor, then we link to the community prefs page; if it's a community page but we're not in the community editor, then we link to the user-gadget-community prefs page.

Specified by:
IsCommunityEditor in interface IPortletPreferencesModelRO
Returns:
True if this is the community editor.
See Also:
IPortletPreferencesModelRO#IsCommunityEditor()

ReversePortletPrefsSort

public void ReversePortletPrefsSort(XPHashtable _htFormData)
Reverses the sort order of one of the pages of gadget prefs.

Parameters:
_htFormData -

GetRedirectAfterFinish

public Redirect GetRedirectAfterFinish()
Returns the Obj Manager Redirect object (this is were we need to go at the end of the Editor).

Specified by:
GetRedirectAfterFinish in interface IRepostModel
Overrides:
GetRedirectAfterFinish in class EditorModel
Returns:
Redirect

SavePage

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



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