com.plumtree.uiinfrastructure.activityspace
Class ASManager

java.lang.Object
  extended by com.plumtree.uiinfrastructure.activityspace.ASManager

public class ASManager
extends java.lang.Object

The ASManager is a singleton class that returns Activity Spaces, Models, Views, & Controls. This uses dynamic discovery to import all of the IActivitySpace, IModel, IView, and IControl objects in certain locations, and then maintain a hashmap of clones, with possible resource pooling. The maps are initialized at startup, and are then assumed to be read only from that point on. Therefore, they should not need to be locked.

Author:
Don Hayler

Field Summary
static ASManager INSTANCE
          Use this class static to access the one and only instance of ActivitySpaceManager.
 boolean m_bSystemStartupSuccesful
          whether or not the system was able to start up correctly.
 java.lang.Exception m_StartupFailure
          The exception that caused the system to fail startup.
 
Method Summary
 IControl GetControl(java.lang.String controlName)
          Create the requested Control.
 boolean GetControlExists(java.lang.String controlName)
          Checks to determine if specified control has been loaded by dynamic discovery into the hashtable of controls.
 IModel GetModel(java.lang.String modelName)
          Create the Model specified by the model name.
 boolean GetModelExists(java.lang.String modelName)
          Checks to determine if specified model has been loaded by dynamic discovery into the hashtable of models.
 int GetNumCustomControls()
          This method returns the number of custom Controls currently loaded.
 int GetNumCustomModels()
          This method returns the number of custom Models currently loaded.
 int GetNumCustomPageControls()
          This method returns the number of custom Page Controls currently loaded.
 int GetNumCustomSpaces()
          This method returns the number of custom Activity Spaces currently loaded.
 int GetNumCustomViews()
          This method returns the number of custom Views currently loaded.
 IPageControl GetPageControl(java.lang.String pageControlName)
          Create the page control specified by the pagecontrol name.
 boolean GetPageControlExists(java.lang.String pageControlName)
          Checks to determine if specified page control has been loaded by dynamic discovery into the hashtable of pagecontrols.
 XPHashtable GetPageControlTable()
          Get the table containing the page controls
 AActivitySpace GetSpace(java.lang.String spaceName)
          Create the requested Activity Space.
 boolean GetSpaceExists(java.lang.String spaceName)
          Checks to determine if specified activity space has been loaded by dynamic discovery into the hashtable of activity spaces.
 IView GetView(java.lang.String viewName)
          Create the view specified by the view name.
 boolean GetViewExists(java.lang.String viewName)
          Checks to determine if specified view has been loaded by dynamic discovery into the hashtable of views.
 void LoadClasses(java.lang.String strLibDir, java.lang.String strConfigFile)
          This method initializes the ASManager and should only be called by the warmup servlet.
 void LoadCustomClasses(java.lang.String strLibDir, java.lang.String strConfigFile)
          This method initializes the ASManager with custom lib files to overwrite the original ones and should only be called by the warmup servlet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_StartupFailure

public java.lang.Exception m_StartupFailure
The exception that caused the system to fail startup.


INSTANCE

public static final ASManager INSTANCE
Use this class static to access the one and only instance of ActivitySpaceManager.


m_bSystemStartupSuccesful

public boolean m_bSystemStartupSuccesful
whether or not the system was able to start up correctly.

Method Detail

GetControl

public IControl GetControl(java.lang.String controlName)
Create the requested Control. This method should not be called by developers. It is only for AActivitySpace.

Parameters:
controlName - The name of the control to create
Returns:
The control, null on failure

GetControlExists

public boolean GetControlExists(java.lang.String controlName)
Checks to determine if specified control has been loaded by dynamic discovery into the hashtable of controls.

Parameters:
controlName - Control name
Returns:
True if exists. Otherwise false.

GetPageControlTable

public XPHashtable GetPageControlTable()
Get the table containing the page controls

Returns:
XPHashtable

GetModel

public IModel GetModel(java.lang.String modelName)
Create the Model specified by the model name. This method should not be called by developers. It is only for AActivitySpace.

Parameters:
modelName - The name of the model to be created
Returns:
the requested model, null on failure

GetModelExists

public boolean GetModelExists(java.lang.String modelName)
Checks to determine if specified model has been loaded by dynamic discovery into the hashtable of models.

Parameters:
modelName - Model name
Returns:
True if exists. Otherwise false.

GetSpace

public AActivitySpace GetSpace(java.lang.String spaceName)
Create the requested Activity Space. This method should not be called by developers. It is only for the Interpreter.

Parameters:
spaceName - The name of the space to create
Returns:
The requested space, null on failure

GetSpaceExists

public boolean GetSpaceExists(java.lang.String spaceName)
Checks to determine if specified activity space has been loaded by dynamic discovery into the hashtable of activity spaces.

Parameters:
spaceName - Activity space name
Returns:
True if exists. Otherwise false.

GetView

public IView GetView(java.lang.String viewName)
Create the view specified by the view name. This method should not be called by developers. It is only for AActivitySpace.

Parameters:
viewName - The name of the view to create
Returns:
the requested view, null on failure

GetViewExists

public boolean GetViewExists(java.lang.String viewName)
Checks to determine if specified view has been loaded by dynamic discovery into the hashtable of views.

Parameters:
viewName - View name
Returns:
True if exists. Otherwise false.

GetPageControl

public IPageControl GetPageControl(java.lang.String pageControlName)
Create the page control specified by the pagecontrol name. This method should not be called by developers. It is only for AActivitySpace.

Parameters:
pagecontrolName - The name of the pagecontrol to create
Returns:
the requested pagecontrol, null on failure

GetPageControlExists

public boolean GetPageControlExists(java.lang.String pageControlName)
Checks to determine if specified page control has been loaded by dynamic discovery into the hashtable of pagecontrols.

Parameters:
pageControlName - pagecontrol name
Returns:
True if exists. Otherwise false.

LoadClasses

public void LoadClasses(java.lang.String strLibDir,
                        java.lang.String strConfigFile)
This method initializes the ASManager and should only be called by the warmup servlet. This method can only be called once.

Parameters:
strLibDir - The file directory where jars and dlls can be found
strConfigFile - the name of the config file

LoadCustomClasses

public void LoadCustomClasses(java.lang.String strLibDir,
                              java.lang.String strConfigFile)
This method initializes the ASManager with custom lib files to overwrite the original ones and should only be called by the warmup servlet.

Parameters:
strLibDir - The file directory where jars and dlls can be found
strConfigFile - the name of the custom config file

GetNumCustomControls

public int GetNumCustomControls()
This method returns the number of custom Controls currently loaded. This number is reset every time custom objects are loaded.

Returns:
The number of custom Controls currently loaded.

GetNumCustomModels

public int GetNumCustomModels()
This method returns the number of custom Models currently loaded. This number is reset every time custom objects are loaded.

Returns:
The number of custom Models currently loaded.

GetNumCustomPageControls

public int GetNumCustomPageControls()
This method returns the number of custom Page Controls currently loaded. This number is reset every time custom objects are loaded.

Returns:
The number of custom Page Controls currently loaded.

GetNumCustomSpaces

public int GetNumCustomSpaces()
This method returns the number of custom Activity Spaces currently loaded. This number is reset every time custom objects are loaded.

Returns:
The number of custom Activity Spaces currently loaded.

GetNumCustomViews

public int GetNumCustomViews()
This method returns the number of custom Views currently loaded. This number is reset every time custom objects are loaded.

Returns:
The number of custom Views currently loaded.



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