com.plumtree.portalpages.admin.ptutilities.diagnostic.remotehosts.hostservices
Class HostServicesModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorModel
      extended by com.plumtree.portalpages.admin.ptutilities.diagnostic.remotehosts.hostservices.HostServicesModel
All Implemented Interfaces:
IManagedObject, IModel, IModelRO, IMVCObject, IEditorModelRO, IRepostModel

public class HostServicesModel
extends EditorModel

Displays a list of all the portlet web services associated with a given host machine.

Author:
DonH

Field Summary
static java.lang.String STR_MVC_CLASS_NAME
          Class name for the model
static int WEB_SERVICE_TYPE_PORTLET
           
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
m_asOwner, m_bCloseOnDone, m_bDeleteOnCancel, m_bEnableApplyButton, m_bHideLeftNav, m_bIsEditorReadOnly, m_bUserHasAccessToEditor, m_nEditorType
 
Constructor Summary
HostServicesModel()
           
 
Method Summary
 boolean CheckEditorAccessAndStart(XPHashtable _htFormData)
          Implements some actions to perform on start.
 void CleanupAllData()
          This method is called when an ActivitySpace is removed from the cache.
 void CleanupTempData()
          This method is called at the end of every HTTP request by the Interpreter.
 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".
 java.lang.String GetName()
          Returns the Class name.
protected  HTMLAnchor GetWebServiceAnchor(java.lang.String _strName, int _nWebServiceID)
          Helper method that creates an HTML Anchor to a pop-up page viewing remote host details.
protected  java.lang.Object[][] GetWebServiceData()
          Helper method to generate the data for the Web Services for this remote host.
protected  XPHashtable GetWebServicePortletMapping()
          Helper method to generate a list of portlet webservices for the remote host.
 void Init(AActivitySpace _parent)
          Inits the Model with the Activity Space.
 void PopulateWebServiceList()
          Helper method to populate the Web Service List.
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
protected  void SetPortletStatus(XPArrayList _alPortletIDs, java.lang.Object[][] _oData)
          This method filles in the data array with String representations of int status codes, optional messages (disabled, timeout, etc..), and error messages (404, server not found, etc...).
 void StartWebServiceList()
          Helper method to start the Web Service List.
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
Cancel, DoTaskAfterStore, DoTaskBeforeStore, DoTaskOnChangePage, DoTaskOnComeBackFromSubEditor, DoTaskOnStartEditor, GetCloseOnDone, GetCurrentRepostAction, GetDeleteOnCancel, GetEditorType, GetEnableApplyButton, GetHideLeftNav, GetIsEditorReadOnly, GetRedirectAfterFinish, 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
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
Class name for the model

See Also:
Constant Field Values

WEB_SERVICE_TYPE_PORTLET

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

HostServicesModel

public HostServicesModel()
Method Detail

StartWebServiceList

public void StartWebServiceList()
Helper method to start the Web Service List.


PopulateWebServiceList

public void PopulateWebServiceList()
Helper method to populate the Web Service List.


GetWebServiceData

protected java.lang.Object[][] GetWebServiceData()
Helper method to generate the data for the Web Services for this remote host.

Returns:
Object[][] The Web Service data.

GetWebServicePortletMapping

protected XPHashtable GetWebServicePortletMapping()
Helper method to generate a list of portlet webservices for the remote host.

Returns:
XPHashtable The Web Service Portlet Mapping

SetPortletStatus

protected void SetPortletStatus(XPArrayList _alPortletIDs,
                                java.lang.Object[][] _oData)
This method filles in the data array with String representations of int status codes, optional messages (disabled, timeout, etc..), and error messages (404, server not found, etc...). The optional messages and error messages can be null. The 2 arrays must have the same length.

Parameters:
_htPortletIDs - The ids of the portlets to check.
_oData - Filled in with int status codes, optional messages, and errors.

GetWebServiceAnchor

protected HTMLAnchor GetWebServiceAnchor(java.lang.String _strName,
                                         int _nWebServiceID)
Helper method that creates an HTML Anchor to a pop-up page viewing remote host details.

Parameters:
_strName - The name of the server.
Returns:
HTMLAnchor The HTML Anchor.

CleanupTempData

public void CleanupTempData()
Description copied from interface: IModel
This method is called at the end of every HTTP request by the Interpreter. The Interpreter calls AActivitySpace.CleanupTempData(), which calls this method on all IModels registered using AActivitySpace.RegisterModel(). This method is intended for cleaning up temporary data that is only used for the lifetime of a single request, like DB query results.

Specified by:
CleanupTempData in interface IModel
Overrides:
CleanupTempData in class EditorModel
See Also:
IModel.CleanupTempData()

CleanupAllData

public void CleanupAllData()
Description copied from interface: IModel
This method is called when an ActivitySpace is removed from the cache. The Interpreter calls AActivitySpace.CleanupAllData(), which calls this method on all IModels registered using AActivitySpace.RegisterModel(). This method is intended for releasing data stored in the server when the activity space is no longer needed, such as search objects that need to be maintained as long as the user is clicking through the search, but should be freed when the space can no longer be used. This can be used to prevent Java references to COM memory from hanging around in the long lived Java heap without cleaning up the underlying COM memory. The Java reference will still stay in the long lived heap until it gets garbage collected (which could be a while), but the COM memory should get released here. This method will not be called if an HTTPSession times out. CleanupTempData will be called before CleanupAllData.

Specified by:
CleanupAllData in interface IModel
Overrides:
CleanupAllData in class EditorModel
See Also:
IModel.CleanupAllData()

CheckEditorAccessAndStart

public boolean CheckEditorAccessAndStart(XPHashtable _htFormData)
Description copied from class: EditorModel
Implements some actions to perform on start. Use the Editor Type if needed.

Specified by:
CheckEditorAccessAndStart in class EditorModel
Returns:
boolean Is true if the current user has the rights to access this Editor.
See Also:
com.plumtree.uiinfrastructure.editor.EditorModel#CheckEditorAccessAndStart(com.plumtree.openfoundation.util.XPHashtable)

Finish

public void Finish()
Description copied from class: EditorModel
Implement some code to execute when the user clicks on "Finish".

Specified by:
Finish in interface IRepostModel
Specified by:
Finish in class EditorModel
See Also:
IRepostModel.Finish()

SavePage

public int SavePage(java.lang.String _sPageName,
                    XPHashtable _htFormData)
Description copied from class: EditorModel
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
Returns:
int Page status for server side validation
See Also:
com.plumtree.uiinfrastructure.form.IRepostModel#SavePage(java.lang.String, com.plumtree.openfoundation.util.XPHashtable)

Init

public void Init(AActivitySpace _parent)
Description copied from class: EditorModel
Inits the Model with the Activity Space.

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

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

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:
IMVCObject.GetName()



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