com.plumtree.portalpages.admin.editors.portlet.plugins
Class PSelectTemplateModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.portalpages.admin.editors.portlet.plugins.PSelectTemplateModel
All Implemented Interfaces:
IPSubModel, IPSelectTemplateModelRO, IManagedObject, IModel, IModelRO, IMVCObject

public class PSelectTemplateModel
extends EditorHelperModel
implements IPSelectTemplateModelRO, IPSubModel

Author:
AdolfoC

Field Summary
static java.lang.String DEFAULTDATA
          This member defines a static string used to identify when m_htFormData has been initialized.
protected  boolean m_bShowFreeForm
          Determines if freeform templates should be shown.
protected  boolean m_bShowHeaderAndFooter
          Determines if header and footer templates should be shown.
protected  int m_nTemplateObjectID
          The portlet template that is currently chosen.
static java.lang.String STR_MVC_CLASS_NAME
           
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
m_asOwner
 
Constructor Summary
PSelectTemplateModel()
           
 
Method Summary
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DoTaskBeforePStore()
          Sub models are expected to store themselves to the ptWebService object passed in in InitWSModel during this call.
 void DoTaskOnPModeUpdate(int nNewWSMode)
          Called when the Portlet editor mode is changed.
 void DoTaskOnWebServiceUpdate(IPTWebService ptWebService)
          Called when the Remote Server is changed.
 void FinalizeCreation()
          This function actually commits the changes that forces our editor into the normal create or create from template modes.
 PTObjectManagerQueryWrapper GetAvailableTemplates()
          Returns the array of currently available templates.
 java.lang.String GetName()
          Returns the Class name.
 int GetObjectIDOfTemplate()
           
 int GetPortletTemplateID()
          Returns the ID of the currently selected portlet template or 0 if nothing is selected.
 boolean GetShowFreeForm()
          Returns a boolean indicating whether to show freeform templates.
 boolean GetShowHeaderAndFooter()
          Returns a boolean indicating whether to show header and footer templates.
 void InitPModel(IPTGadget ptPortlet)
          Initializes the sub-model.
 int SaveSection(XPHashtable _htFormData)
          Code to save the section represented by this Model.
 void SetShowFreeForm(boolean bShowFreeForm)
           
 void SetShowHeaderAndFooter(boolean bShowHeaderAndFooter)
           
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
CleanupAllData, CleanupTempData, Init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_MVC_CLASS_NAME

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

DEFAULTDATA

public static final java.lang.String DEFAULTDATA
This member defines a static string used to identify when m_htFormData has been initialized.

See Also:
Constant Field Values

m_nTemplateObjectID

protected int m_nTemplateObjectID
The portlet template that is currently chosen.


m_bShowFreeForm

protected boolean m_bShowFreeForm
Determines if freeform templates should be shown.


m_bShowHeaderAndFooter

protected boolean m_bShowHeaderAndFooter
Determines if header and footer templates should be shown.

Constructor Detail

PSelectTemplateModel

public PSelectTemplateModel()
Method Detail

Create

public java.lang.Object Create()
Description copied from class: EditorHelperModel
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 EditorHelperModel
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()

DoTaskBeforePStore

public void DoTaskBeforePStore()
Description copied from interface: IPSubModel
Sub models are expected to store themselves to the ptWebService object passed in in InitWSModel during this call.

Specified by:
DoTaskBeforePStore in interface IPSubModel
See Also:
IPSubModel.DoTaskBeforePStore()

DoTaskOnPModeUpdate

public void DoTaskOnPModeUpdate(int nNewWSMode)
Description copied from interface: IPSubModel
Called when the Portlet editor mode is changed.

Specified by:
DoTaskOnPModeUpdate in interface IPSubModel
See Also:
com.plumtree.portalpages.admin.editors.portlet.IPSubModel#DoTaskOnWSModeUpdate(int)

DoTaskOnWebServiceUpdate

public void DoTaskOnWebServiceUpdate(IPTWebService ptWebService)
Description copied from interface: IPSubModel
Called when the Remote Server is changed. This is mostly used to update the base-url displayed before URL edit boxes.

Specified by:
DoTaskOnWebServiceUpdate in interface IPSubModel
See Also:
com.plumtree.portalpages.admin.editors.portlet.IPSubModel#DoTaskOnWebServiceUpdate(String, String)

FinalizeCreation

public void FinalizeCreation()
This function actually commits the changes that forces our editor into the normal create or create from template modes. It is called by the Portlet Repost Control if "Done" is clicked during PRECREATE mode.


GetName

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

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

GetObjectIDOfTemplate

public int GetObjectIDOfTemplate()
See Also:
com.plumtree.portaluiinfrastructure.editor.ITemplateChooserModelRO#GetObjectIDOfTemplate()

InitPModel

public void InitPModel(IPTGadget ptPortlet)
Description copied from interface: IPSubModel
Initializes the sub-model. Provides an opportunity for the submodel to load it's state from the WebService.

Specified by:
InitPModel in interface IPSubModel
See Also:
com.plumtree.portalpages.admin.editors.portlet.IPSubModel#InitPModel(IPTWebService)

SaveSection

public int SaveSection(XPHashtable _htFormData)
Description copied from class: EditorHelperModel
Code to save the section represented by this Model.

Specified by:
SaveSection in class EditorHelperModel
Parameters:
_htFormData - Form posted data.
Returns:
int Status for server side validation
See Also:
EditorHelperModel.SaveSection(XPHashtable)

GetAvailableTemplates

public PTObjectManagerQueryWrapper GetAvailableTemplates()
Description copied from interface: IPSelectTemplateModelRO
Returns the array of currently available templates.

Specified by:
GetAvailableTemplates in interface IPSelectTemplateModelRO
Returns:
XPArrayList
See Also:
IPSelectTemplateModelRO.GetAvailableTemplates()

GetPortletTemplateID

public int GetPortletTemplateID()
Description copied from interface: IPSelectTemplateModelRO
Returns the ID of the currently selected portlet template or 0 if nothing is selected.

Specified by:
GetPortletTemplateID in interface IPSelectTemplateModelRO
Returns:
String
See Also:
IPSelectTemplateModelRO.GetPortletTemplateID()

GetShowFreeForm

public boolean GetShowFreeForm()
Description copied from interface: IPSelectTemplateModelRO
Returns a boolean indicating whether to show freeform templates.

Specified by:
GetShowFreeForm in interface IPSelectTemplateModelRO
Returns:
boolean

SetShowFreeForm

public void SetShowFreeForm(boolean bShowFreeForm)

GetShowHeaderAndFooter

public boolean GetShowHeaderAndFooter()
Description copied from interface: IPSelectTemplateModelRO
Returns a boolean indicating whether to show header and footer templates.

Specified by:
GetShowHeaderAndFooter in interface IPSelectTemplateModelRO
Returns:
boolean

SetShowHeaderAndFooter

public void SetShowHeaderAndFooter(boolean bShowHeaderAndFooter)



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