com.plumtree.portalpages.admin.ptutilities.diagnostic.relatedservers
Class RelatedServersModel

java.lang.Object
  extended by com.plumtree.portalpages.admin.ptutilities.diagnostic.relatedservers.RelatedServersModel
All Implemented Interfaces:
IManagedObject, IModel, IModelRO, IMVCObject

public class RelatedServersModel
extends java.lang.Object
implements IModel, IModelRO

This model initializes the Server List with related servers, such as the Search, Automation, and Collaboration Servers.

Author:
DonH

Field Summary
protected  AActivitySpace m_asOwner
           
protected  XPHashtable m_htInitialPortletStatus
           
static int PORTLET_TIMEOUT
           
static int SERVER_TYPE_AUTOMATION
           
static int SERVER_TYPE_COLLAB
           
static int SERVER_TYPE_CONTENT
           
static int SERVER_TYPE_SEARCH
           
static java.lang.String STR_MVC_CLASS_NAME
          Class name for the activity space
 
Constructor Summary
RelatedServersModel()
           
 
Method Summary
protected  void AddSearchServerToData(java.lang.String _strHostName, java.lang.String _strServerDescription, SearchServerStatusInfo _oStatus, java.lang.Object[][] _oData, int nIndex)
          Helper method to add the search server data to the array.
 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.
protected  java.lang.String ConvertServerStatus(int _nAutomationServerStatus, boolean _bHasJobFolder)
          This helper method converts from an Automation Server status code to a ServerList status light code.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
protected  HTMLAnchor GetAutomationServerAnchor(java.lang.String _strName)
          Helper method that creates an HTML Anchor to a pop-up page viewing automation server details.
protected  java.lang.Object[][] GetAutomationServerData()
          Helper method to generate the data for the Automation Servers.
static HTMLAnchor GetCollabServerAnchor(java.lang.String _strName, java.lang.String _strBaseURL)
          Helper method that creates an HTML Anchor to a pop-up page viewing the Collaboration Server Diagnostic Page.
static java.lang.Object[][] GetCollabServerUUIDFilter()
          This helper method creates a filter array to filter for Collaboration Server's unique UUID when querying Gadget Content Servers.
static HTMLAnchor GetContentServerAnchor(java.lang.String _strName, java.lang.String _strBaseURL)
          Helper method that creates an HTML Anchor to a pop-up page viewing the Content Server Diagnostic Page.
static java.lang.Object[][] GetContentServerUUIDFilter()
          This helper method creates a filter array to filter for Content Server's unique UUID when querying Gadget Content Servers.
protected  java.lang.Object[][] GetInstalledServerData(int _nServerType)
          Helper method to generate the data for the Collab and Content Servers.
 java.lang.String GetName()
          Return the name of the MVC object.
protected  HTMLAnchor GetSearchServerAnchor(java.lang.String _strName)
          Helper method that creates an HTML Anchor to a pop-up page viewing automation server details.
protected  java.lang.Object[][] GetSearchServerData()
          Helper method to generate the data for the Search Servers.
 void Init(AActivitySpace parent)
          This method initializes the model.
 void PopulateServerList()
          Helper method to populate the Server List.
 void StartServerList()
          Helper method to start the Server List.
 
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 activity space

See Also:
Constant Field Values

m_asOwner

protected AActivitySpace m_asOwner

SERVER_TYPE_SEARCH

public static final int SERVER_TYPE_SEARCH
See Also:
Constant Field Values

SERVER_TYPE_AUTOMATION

public static final int SERVER_TYPE_AUTOMATION
See Also:
Constant Field Values

SERVER_TYPE_COLLAB

public static final int SERVER_TYPE_COLLAB
See Also:
Constant Field Values

SERVER_TYPE_CONTENT

public static final int SERVER_TYPE_CONTENT
See Also:
Constant Field Values

m_htInitialPortletStatus

protected XPHashtable m_htInitialPortletStatus

PORTLET_TIMEOUT

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

RelatedServersModel

public RelatedServersModel()
Method Detail

StartServerList

public void StartServerList()
Helper method to start the Server List.


PopulateServerList

public void PopulateServerList()
Helper method to populate the Server List.


GetSearchServerData

protected java.lang.Object[][] GetSearchServerData()
Helper method to generate the data for the Search Servers.

Returns:
Object[][] The Search Server data.

AddSearchServerToData

protected void AddSearchServerToData(java.lang.String _strHostName,
                                     java.lang.String _strServerDescription,
                                     SearchServerStatusInfo _oStatus,
                                     java.lang.Object[][] _oData,
                                     int nIndex)
Helper method to add the search server data to the array.

Parameters:
_strHostName -
_strServerDescription -
_oStatus -
_strData -
nIndex -

GetSearchServerAnchor

protected HTMLAnchor GetSearchServerAnchor(java.lang.String _strName)
Helper method that creates an HTML Anchor to a pop-up page viewing automation server details.

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

GetAutomationServerData

protected java.lang.Object[][] GetAutomationServerData()
Helper method to generate the data for the Automation Servers.

Returns:
Object[][] The Automation Server data.

GetAutomationServerAnchor

protected HTMLAnchor GetAutomationServerAnchor(java.lang.String _strName)
Helper method that creates an HTML Anchor to a pop-up page viewing automation server details.

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

ConvertServerStatus

protected java.lang.String ConvertServerStatus(int _nAutomationServerStatus,
                                               boolean _bHasJobFolder)
This helper method converts from an Automation Server status code to a ServerList status light code.

Parameters:
_nAutomationServerStatus - The Automation Server status code.
Returns:
String The corresponding ServerList status light code.

GetInstalledServerData

protected java.lang.Object[][] GetInstalledServerData(int _nServerType)
Helper method to generate the data for the Collab and Content Servers.

Returns:
Object[][] The Collab or Content Server data.

GetCollabServerUUIDFilter

public static java.lang.Object[][] GetCollabServerUUIDFilter()
This helper method creates a filter array to filter for Collaboration Server's unique UUID when querying Gadget Content Servers.

Returns:
The collab UUID filter.

GetContentServerUUIDFilter

public static java.lang.Object[][] GetContentServerUUIDFilter()
This helper method creates a filter array to filter for Content Server's unique UUID when querying Gadget Content Servers.

Returns:
The collab UUID filter.

GetCollabServerAnchor

public static HTMLAnchor GetCollabServerAnchor(java.lang.String _strName,
                                               java.lang.String _strBaseURL)
Helper method that creates an HTML Anchor to a pop-up page viewing the Collaboration Server Diagnostic Page.

Parameters:
_strName - The name of the server.
_strBaseURL - The base url to the collab server.
Returns:
HTMLAnchor The HTML Anchor.

GetContentServerAnchor

public static HTMLAnchor GetContentServerAnchor(java.lang.String _strName,
                                                java.lang.String _strBaseURL)
Helper method that creates an HTML Anchor to a pop-up page viewing the Content Server Diagnostic Page.

Parameters:
_strName - The name of the server.
_strBaseURL - The base url to the collab server.
Returns:
HTMLAnchor The HTML Anchor.

Init

public void Init(AActivitySpace parent)
Description copied from interface: IModel
This method initializes the model. This is called automatically when AActivitySpace.RegisterModel() is called.

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

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
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
See Also:
IModel.CleanupAllData()

Create

public java.lang.Object Create()
Description copied from interface: IManagedObject
This method is used by the ASManager to return new instances of managed objects.

Specified by:
Create in interface IManagedObject
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 interface: IMVCObject
Return the name of the MVC object.

Specified by:
GetName in interface IMVCObject
Returns:
the name of the object.
See Also:
IMVCObject.GetName()



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