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

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

public class PChooseModel
extends EditorHelperModel
implements IPChooseModelRO, 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  int m_nNextPMode
          The Portlet Mode to continue the editor in (either create, or create from template).
protected  int m_nTemplateObjectID
          The portlet template that is currently chosen.
protected  java.lang.String m_strTemplateName
          Name of template (null means nothing selected)
static java.lang.String STR_MVC_CLASS_NAME
           
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
m_asOwner
 
Constructor Summary
PChooseModel()
           
 
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.
 java.lang.String GetData(java.lang.String name)
           
 java.lang.String GetName()
          Returns the Class name.
 int GetNextPMode()
          Returns the mode that this editor will be changed to when the user clicks finish.
 int GetObjectIDOfTemplate()
           
 java.lang.String GetPortletTemplateName()
          Returns the name value from m_strPortletTemplateTreeData.
 void InitPModel(IPTGadget ptPortlet)
          Initializes the sub-model.
 void RefreshItemFromTree()
          This method gets the selected items from the tree.
 int SaveSection(XPHashtable _htFormData)
          Code to save the section represented by this Model.
 
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_strTemplateName

protected java.lang.String m_strTemplateName
Name of template (null means nothing selected)


m_nNextPMode

protected int m_nNextPMode
The Portlet Mode to continue the editor in (either create, or create from template).


m_nTemplateObjectID

protected int m_nTemplateObjectID
The portlet template that is currently chosen.

Constructor Detail

PChooseModel

public PChooseModel()
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.


GetData

public java.lang.String GetData(java.lang.String name)
Specified by:
GetData in interface IPChooseModelRO
See Also:
com.plumtree.portalpagessample.form.ISampleFormModelRO#GetData(String)

GetName

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

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

GetNextPMode

public int GetNextPMode()
Returns the mode that this editor will be changed to when the user clicks finish.

Specified by:
GetNextPMode in interface IPChooseModelRO

GetObjectIDOfTemplate

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

GetPortletTemplateName

public java.lang.String GetPortletTemplateName()
Returns the name value from m_strPortletTemplateTreeData.

Specified by:
GetPortletTemplateName in interface IPChooseModelRO
Returns:
String

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)

RefreshItemFromTree

public void RefreshItemFromTree()
This method gets the selected items from the tree.


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)



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