com.plumtree.portalpages.admin.editors.webservice.plugins
Class RemoteServerPluginModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.portalpages.admin.editors.webservice.plugins.RemoteServerPluginModel
All Implemented Interfaces:
IWSSubModel, IRemoteServerPluginModelRO, IManagedObject, IModel, IModelRO, IMVCObject

public class RemoteServerPluginModel
extends EditorHelperModel
implements IRemoteServerPluginModelRO, IWSSubModel

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_nRemoteServerObjectID
          Tree Data for the Remote Server for this Web Service (Remote Server)
protected  java.lang.String m_strBaseURL
           
protected  java.lang.String m_strRemoteServerName
           
static java.lang.String STR_MVC_CLASS_NAME
           
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
m_asOwner
 
Constructor Summary
RemoteServerPluginModel()
           
 
Method Summary
 void ClearRemoteServer()
          This method clears the selected items from the tree.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DoTaskBeforeWSStore()
          Sub models are expected to store themselves to the ptWebService object passed in in InitWSModel during this call.
 void DoTaskOnRemoteServerUpdate(java.lang.String strRemoteServerID, java.lang.String strRemoteServerName, java.lang.String strRemoteServerBaseURL)
          Called when the Remote Server is changed.
 void DoTaskOnWSModeUpdate(int nNewWSMode)
          Called when the Web Service type is changed.
 java.lang.String GetData(java.lang.String name)
           
 java.lang.String GetName()
          Returns the Class name.
 java.lang.String GetRemoteServerBaseURL()
           
 java.lang.String GetRemoteServerName()
          Returns the name of the Remote Server
 int GetRemoteServerObjectID()
          Returns the name of the Remote Server
 java.lang.String GetRemoteServerPath()
          Returns the folder path that the remote server is stored in.
 java.lang.String GetValidationFunction()
          This returns the name of the client-side validation function that the model wants added to the page-level validation funtion.
 void InitWSModel(IPTWebService ptWebService)
          Initializes the sub-model.
 boolean IsReadOnly()
          Returns whether or not this view should be read-only.
 void RefreshItemFromTree()
          This method gets the selected items from the tree.
 int SaveSection(XPHashtable _htFormData)
          Code to save the section represented by this Model.
 void SetIsReadOnly(boolean _bIsReadOnly)
          Set whether this model is read only or not.
 
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_strBaseURL

protected java.lang.String m_strBaseURL

m_strRemoteServerName

protected java.lang.String m_strRemoteServerName

m_nRemoteServerObjectID

protected int m_nRemoteServerObjectID
Tree Data for the Remote Server for this Web Service (Remote Server)

Constructor Detail

RemoteServerPluginModel

public RemoteServerPluginModel()
Method Detail

ClearRemoteServer

public void ClearRemoteServer()
This method clears the selected items from the tree.


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

DoTaskBeforeWSStore

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

Specified by:
DoTaskBeforeWSStore in interface IWSSubModel
See Also:
IWSSubModel.DoTaskBeforeWSStore()

DoTaskOnRemoteServerUpdate

public void DoTaskOnRemoteServerUpdate(java.lang.String strRemoteServerID,
                                       java.lang.String strRemoteServerName,
                                       java.lang.String strRemoteServerBaseURL)
Description copied from interface: IWSSubModel
Called when the Remote Server is changed. This is mostly used to update the base-url displayed before URL edit boxes.

Specified by:
DoTaskOnRemoteServerUpdate in interface IWSSubModel
See Also:
IWSSubModel.DoTaskOnRemoteServerUpdate(String, String, String)

DoTaskOnWSModeUpdate

public void DoTaskOnWSModeUpdate(int nNewWSMode)
Description copied from interface: IWSSubModel
Called when the Web Service type is changed.

Specified by:
DoTaskOnWSModeUpdate in interface IWSSubModel
See Also:
IWSSubModel.DoTaskOnWSModeUpdate(int)

GetData

public java.lang.String GetData(java.lang.String name)
Specified by:
GetData in interface IRemoteServerPluginModelRO
Returns:
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()

GetRemoteServerBaseURL

public java.lang.String GetRemoteServerBaseURL()
Returns:
Returns the base URL of the currently selected Remote Server

GetRemoteServerName

public java.lang.String GetRemoteServerName()
Returns the name of the Remote Server

Specified by:
GetRemoteServerName in interface IRemoteServerPluginModelRO
Returns:
String

GetRemoteServerObjectID

public int GetRemoteServerObjectID()
Returns the name of the Remote Server

Specified by:
GetRemoteServerObjectID in interface IRemoteServerPluginModelRO
Returns:
String

GetRemoteServerPath

public java.lang.String GetRemoteServerPath()
Description copied from interface: IRemoteServerPluginModelRO
Returns the folder path that the remote server is stored in.

Specified by:
GetRemoteServerPath in interface IRemoteServerPluginModelRO
See Also:
IRemoteServerPluginModelRO.GetRemoteServerPath()

GetValidationFunction

public java.lang.String GetValidationFunction()
Description copied from interface: IWSSubModel
This returns the name of the client-side validation function that the model wants added to the page-level validation funtion. Models return null or "" if they don't have a validation function.

Specified by:
GetValidationFunction in interface IWSSubModel
See Also:
IWSSubModel.GetValidationFunction()

InitWSModel

public void InitWSModel(IPTWebService ptWebService)
Description copied from interface: IWSSubModel
Initializes the sub-model. Provides an opportunity for the submodel to load it's state from the WebService.

Specified by:
InitWSModel in interface IWSSubModel
See Also:
IWSSubModel.InitWSModel(IPTWebService)

IsReadOnly

public boolean IsReadOnly()
Description copied from interface: IRemoteServerPluginModelRO
Returns whether or not this view should be read-only.

Specified by:
IsReadOnly in interface IRemoteServerPluginModelRO
See Also:
IRemoteServerPluginModelRO.IsReadOnly()

SetIsReadOnly

public void SetIsReadOnly(boolean _bIsReadOnly)
Set whether this model is read only or not.

Parameters:
_bIsReadOnly - whether this model is read only or not.

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.