com.plumtree.portalpages.browsing.layoutselection
Class LayoutSelectionModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorModel
      extended by com.plumtree.portalpages.browsing.layoutselection.LayoutSelectionModel
All Implemented Interfaces:
ILayoutSelectionModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IEditorModelRO, IRepostModel

public class LayoutSelectionModel
extends EditorModel
implements ILayoutSelectionModelRO

Author:
michaeld

Field Summary
protected  IPTQueryResult m_layouts
           
static java.lang.String STR_MVC_CLASS_NAME
          Object 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
LayoutSelectionModel()
           
 
Method Summary
 void ActionOnRepost()
          Modifies the object name on repost.
 boolean CheckEditorAccessAndStart(XPHashtable _htFormData)
          Implements some actions to perform on start.
 java.lang.String CheckSafeName(java.lang.String _strName)
          A utility method that checks if the parameter name is safe to protect against cross-site scripting attacks.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void Finish()
          Implement some code to execute when the user clicks on "Finish".
 IPTQueryResult GetAdaptiveLayouts()
           
 int GetLayoutColumnCount()
          Get the count of columns to display on the select layout page.
 java.lang.String GetName()
          Returns the Class name.
 boolean GetPageHasFreeFormPortlet()
           
 boolean GetPageSupportsFreeFormSection()
           
 java.lang.String GetParentFormName()
          Get the name of the parent window's form.
 java.lang.String GetParentFormSelectInput()
          Get the name of the form element for selected items.
 java.lang.String GetParentFormSpaceID()
          Get the string that is the parent form space ID.
 java.lang.String GetParentFormSubmitFunction()
          Get the string that is the parent form submit function.
 Redirect GetRedirectAfterFinish()
          Returns the Redirect object (this is were we need to go at the end of the Editor).
 int GetSelectedLayout()
          Get the currently selected layout.
 void Init(AActivitySpace owner)
          Initializes the list of layouts
 void RefreshHasFreeFormPortlet(XPHashtable _htFormData)
          Method RefreshHasFreeFormPortlet.
protected  void SaveMainPage(XPHashtable _htFormData)
          Saves the data on the Main page.
 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, 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
Object name

See Also:
Constant Field Values

m_layouts

protected IPTQueryResult m_layouts
Constructor Detail

LayoutSelectionModel

public LayoutSelectionModel()
Method Detail

ActionOnRepost

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


Init

public void Init(AActivitySpace owner)
Initializes the list of layouts

Specified by:
Init in interface IModel
Overrides:
Init in class EditorModel
Parameters:
owner - the parent Activity Space
See Also:
EditorModel.Init(com.plumtree.uiinfrastructure.activityspace.AActivitySpace)

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()

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

GetLayoutColumnCount

public int GetLayoutColumnCount()
Description copied from interface: ILayoutSelectionModelRO
Get the count of columns to display on the select layout page.

Specified by:
GetLayoutColumnCount in interface ILayoutSelectionModelRO
Returns:
int nLayoutColumnCount
See Also:
ILayoutSelectionModelRO.GetLayoutColumnCount()

GetPageHasFreeFormPortlet

public boolean GetPageHasFreeFormPortlet()
Specified by:
GetPageHasFreeFormPortlet in interface ILayoutSelectionModelRO
Returns:
whether the page has a content canvas portlet on it
See Also:
ILayoutSelectionModelRO.GetPageHasFreeFormPortlet()

GetPageSupportsFreeFormSection

public boolean GetPageSupportsFreeFormSection()
Specified by:
GetPageSupportsFreeFormSection in interface ILayoutSelectionModelRO
Returns:
whether the page supports a content canvas section
See Also:
ILayoutSelectionModelRO.GetPageSupportsFreeFormSection()

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:
String
See Also:
com.plumtree.portaluiinfrastructure.activityspace.IModelRO#GetName()

GetParentFormName

public java.lang.String GetParentFormName()
Description copied from interface: ILayoutSelectionModelRO
Get the name of the parent window's form.

Specified by:
GetParentFormName in interface ILayoutSelectionModelRO
Returns:
String
See Also:
ILayoutSelectionModelRO.GetParentFormName()

GetParentFormSelectInput

public java.lang.String GetParentFormSelectInput()
Description copied from interface: ILayoutSelectionModelRO
Get the name of the form element for selected items.

Specified by:
GetParentFormSelectInput in interface ILayoutSelectionModelRO
Returns:
String
See Also:
ILayoutSelectionModelRO.GetParentFormSelectInput()

GetParentFormSpaceID

public java.lang.String GetParentFormSpaceID()
Description copied from interface: ILayoutSelectionModelRO
Get the string that is the parent form space ID.

Specified by:
GetParentFormSpaceID in interface ILayoutSelectionModelRO
Returns:
String
See Also:
ILayoutSelectionModelRO.GetParentFormSpaceID()

GetParentFormSubmitFunction

public java.lang.String GetParentFormSubmitFunction()
Description copied from interface: ILayoutSelectionModelRO
Get the string that is the parent form submit function.

Specified by:
GetParentFormSubmitFunction in interface ILayoutSelectionModelRO
Returns:
String
See Also:
ILayoutSelectionModelRO.GetParentFormSubmitFunction()

GetRedirectAfterFinish

public Redirect GetRedirectAfterFinish()
Description copied from class: EditorModel
Returns the Redirect object (this is were we need to go at the end of the Editor). By default this is going to the previous AS (the one that opened this one). But Editors can override that method if they need to redirect somewhere else.

Specified by:
GetRedirectAfterFinish in interface IRepostModel
Overrides:
GetRedirectAfterFinish in class EditorModel
Returns:
Redirect
See Also:
IRepostModel.GetRedirectAfterFinish()

GetSelectedLayout

public int GetSelectedLayout()
Description copied from interface: ILayoutSelectionModelRO
Get the currently selected layout.

Specified by:
GetSelectedLayout in interface ILayoutSelectionModelRO
Returns:
nSelectedLayout
See Also:
ILayoutSelectionModelRO.GetSelectedLayout()

RefreshHasFreeFormPortlet

public void RefreshHasFreeFormPortlet(XPHashtable _htFormData)
Method RefreshHasFreeFormPortlet. Refreshes the available choices based upon whether the opening page has a freeform layout or not.

Parameters:
_htFormData -

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

SaveMainPage

protected void SaveMainPage(XPHashtable _htFormData)
Saves the data on the Main page.

Parameters:
_htFormData -

CheckSafeName

public java.lang.String CheckSafeName(java.lang.String _strName)
A utility method that checks if the parameter name is safe to protect against cross-site scripting attacks.

Parameters:
_strName - The name to check.
Returns:
The safe name.
Throws:
XPIllegalArgumentException - if the name is not safe.

GetAdaptiveLayouts

public IPTQueryResult GetAdaptiveLayouts()
Specified by:
GetAdaptiveLayouts in interface ILayoutSelectionModelRO
Returns:
Available portlet page layouts, null if adaptive page layouts are disabled



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