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

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

public class SelectWebServiceModel
extends EditorHelperModel
implements ISelectWebServiceModelRO, 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.
static int NO_ACCESS_WS
           
static java.lang.String STR_MVC_CLASS_NAME
           
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
m_asOwner
 
Constructor Summary
SelectWebServiceModel()
           
 
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.
 java.lang.String GetAdminPrefsURL()
          Steps to generating an AdminPrefsURL: #0 Web Service Selected? If not, just return null.
 java.lang.String GetData(java.lang.String name)
           
 java.lang.String GetIntrinsicPortletClass()
          Return intrinsic portlet class
 java.lang.String GetName()
          Returns the Class name.
 int GetWebServiceID()
          Returns the selected web service ID.
 java.lang.String GetWebServiceName()
          Returns the name value from m_strWebServiceTreeData.
 java.lang.String GetWebServicePath()
          Returns the path value from m_strWebServiceTreeData.
 IPTWebService GetWSObject()
          Call this method to set the WebServiceObject to a new one.
 void InitPModel(IPTGadget ptPortlet)
          Initializes the sub-model.
 boolean IsReadOnly()
          Returns whether or not the WebService should be changeable in the view.
 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

NO_ACCESS_WS

public static final int NO_ACCESS_WS
See Also:
Constant Field Values
Constructor Detail

SelectWebServiceModel

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

GetData

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

GetName

public java.lang.String GetName()
Description copied from class: EditorHelperModel
Returns the Class name.

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class EditorHelperModel
Returns:
String
See Also:
IMVCObject.GetName()

GetWSObject

public IPTWebService GetWSObject()
Call this method to set the WebServiceObject to a new one.


GetWebServiceName

public java.lang.String GetWebServiceName()
Returns the name value from m_strWebServiceTreeData.

Specified by:
GetWebServiceName in interface ISelectWebServiceModelRO
Returns:
String

GetWebServiceID

public int GetWebServiceID()
Returns the selected web service ID.

Specified by:
GetWebServiceID in interface ISelectWebServiceModelRO
Returns:
int

GetWebServicePath

public java.lang.String GetWebServicePath()
Returns the path value from m_strWebServiceTreeData.

Specified by:
GetWebServicePath in interface ISelectWebServiceModelRO
Returns:
String

GetIntrinsicPortletClass

public java.lang.String GetIntrinsicPortletClass()
Return intrinsic portlet class

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)

IsReadOnly

public boolean IsReadOnly()
Description copied from interface: ISelectWebServiceModelRO
Returns whether or not the WebService should be changeable in the view.

Specified by:
IsReadOnly in interface ISelectWebServiceModelRO
Returns:
boolean
See Also:
com.plumtree.portalpages.admin.editors.webservice.plugins.ISelectWebServiceModelRO#IsReadOnly()

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)

GetAdminPrefsURL

public java.lang.String GetAdminPrefsURL()
Steps to generating an AdminPrefsURL: #0 Web Service Selected? If not, just return null. #1 Remote. Force all of the views to PreStore their data (the gateway needs an up-to-date portlet to work from). #2 Do we even have an AdminPrefsURL? (make sure we check if we are editing a template or not): x. Nope, return null: #3 Intrinsic or Non? (Check the PMODE) x. If intrinsic, construct URL from info stored in web service object. #4 Put the darned portlet on the Session for the Gateway to get to. #5 Ask the gateway to generate an AdminPrefsURL for us and return it.

Specified by:
GetAdminPrefsURL in interface ISelectWebServiceModelRO
Returns:
String



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