com.plumtree.uiinfrastructure.pagecontrols.framework
Class PageMgr

java.lang.Object
  extended by com.plumtree.uiinfrastructure.pagecontrols.framework.PageMgr

public class PageMgr
extends java.lang.Object

The page manager (PageMgr) class aggregates all of the comoponent managers for a given page. It also page-scope information such as locale and time zone. It has some convenience methods that act on all ComponenteMgrs registered with the PageMgr and all their Page Controls -- StoreAllUserInput and Validate.

Author:
John Osborne

Constructor Summary
PageMgr(AccessStyles _asAccessStyle, XPLocale _xpLocale, XPTimeZone _xpTimeZone, java.lang.String _strImageServerBaseURL, java.lang.String _strImageServerConnectionURL)
          Creates a new PageMgr object.
 
Method Summary
 void AddErrorMessage(java.lang.String _strErrorNum, java.lang.String _strFileName)
          Adds the error message to the array containing the rest of the error messages.
 IPageControl AddPageControl(java.lang.String _strMVCPageControlName)
          Retreives an instance of a Page Control specified by _strMVCPageControlName and returns it.
 void AddToValidationFunction(AFormDP _ptAFormDP)
           
 ComponentMgr GetComponentMgr(java.lang.String _strMVCPageControlName)
          Return a ComponentMgr of the correct type for the given Page Control.
 java.lang.String GetErrorMessages(AActivitySpace _asOwner)
          Returns all the error messages for the Activity Apace
 java.lang.String GetImageServerConnectionURL()
          Return the ImageServerConnectionURL member variable.
 java.lang.String GetImgSvrBaseURL()
          Returns the image server base URL.
 java.lang.String GetJSValidationCode()
          This method provides js validation code for all Page Controls owned by this PageMgr.
 java.lang.String GetLangID()
          Returns the language ID for this page.
 XPLocale GetLocale()
          Returns the locale that is being used by this page manager.
 int GetNumComponentMgrs()
          Returns the number of component managers currently registered with this page manager.
 IPageControl GetPageControl(java.lang.String _strMVCPageControlName, java.lang.String _strUniqueInstanceID)
          Return the Page Control of the type specified by _strMVCPageControlName (i.e.
 XPTimeZone GetTimeZone()
          Returns the timezone being used by this page manager.
 void RegisterComponentMgr(ComponentMgr _ptComponentMgr)
          This method allows you to register a component manager with the page manager.
 int StoreAllUserInput(XPHashtable _htRequestParameters)
          This method stores all data entered by users to controls on this page.
 XPArrayList Validate()
          This method validates all Page Controls owned by this PageMgr.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageMgr

public PageMgr(AccessStyles _asAccessStyle,
               XPLocale _xpLocale,
               XPTimeZone _xpTimeZone,
               java.lang.String _strImageServerBaseURL,
               java.lang.String _strImageServerConnectionURL)
Creates a new PageMgr object. At the time of creation, the page manager has no component managers; they must be registered. If the locale or time zone is null, the default is used. The image server base URL cannot be null or emppty string.

Parameters:
_asAccessStyle - The access mode for this page
_xpLocale - The locale for this page.
_xpTimeZone - The time-zone for this page.
_strImageServerBaseURL - The base URL to the image server.
_strImageConnectionBaseURL - The connection URL to the image server
Method Detail

GetImgSvrBaseURL

public java.lang.String GetImgSvrBaseURL()
Returns the image server base URL.

Returns:
The image server base url.

GetLangID

public java.lang.String GetLangID()
Returns the language ID for this page. (It is derived from the locale the client used when the

Returns:
The language ID (i.e. "en").

GetLocale

public XPLocale GetLocale()
Returns the locale that is being used by this page manager.

Returns:
The XPLocale for this page.

GetNumComponentMgrs

public int GetNumComponentMgrs()
Returns the number of component managers currently registered with this page manager.

Returns:
An int that tells the clinent how many component managers are registered.

GetTimeZone

public XPTimeZone GetTimeZone()
Returns the timezone being used by this page manager.

Returns:
The timezone.

RegisterComponentMgr

public void RegisterComponentMgr(ComponentMgr _ptComponentMgr)
This method allows you to register a component manager with the page manager. The order in which you register components is the order in which calls will be made when doing any looping operation--storing or printing. If you attempt to re-register the same component, it will overwrite the one that existed there before.

Parameters:
_ptComponentMgr - The component manger that you wish to register.

StoreAllUserInput

public int StoreAllUserInput(XPHashtable _htRequestParameters)
This method stores all data entered by users to controls on this page. It does so by looping through the registered component mangers and asking them to save themselves. (The component managers, in turn, loop through the components and ask them to save themselves. The order in which the save is called is the same as the order in which the component managers were registered.

Parameters:
_htRequestParameters - A hashtable of the request parameters.

Validate

public XPArrayList Validate()
This method validates all Page Controls owned by this PageMgr. It does so by looping through all registered ComponentMgrs which in turn loop through all their registered components (Page Controls). It returns an XPArrayList of all UIError messages generated by the various Page Controls.

Returns:
XPArrayList of UIError objects.

GetJSValidationCode

public java.lang.String GetJSValidationCode()
This method provides js validation code for all Page Controls owned by this PageMgr. It does so by looping through all registered ComponentMgrs which in turn loop through all their registered components (Page Controls) to return their validation code.

Returns:
XPArrayList of UIError objects.

AddToValidationFunction

public void AddToValidationFunction(AFormDP _ptAFormDP)

AddErrorMessage

public void AddErrorMessage(java.lang.String _strErrorNum,
                            java.lang.String _strFileName)
Adds the error message to the array containing the rest of the error messages.

Parameters:
_strErrorMsg -

GetErrorMessages

public java.lang.String GetErrorMessages(AActivitySpace _asOwner)
Returns all the error messages for the Activity Apace

Returns:
String - collection of error messages

AddPageControl

public IPageControl AddPageControl(java.lang.String _strMVCPageControlName)
Retreives an instance of a Page Control specified by _strMVCPageControlName and returns it. Registers that Page Control with the ComponentMgr appropriate for it which is registered with this PageMgr instance. If no ComponentMgr of that type exists the Page Control creates a ComponentMgr of the correct type and that ComponentMgr is registered with the PageMgr.

Parameters:
_strMVCPageControlName - the name of the Page Control (i.e. HTMLTextBox)
Returns:
IPageControl an instance of the Page Control Object

GetPageControl

public IPageControl GetPageControl(java.lang.String _strMVCPageControlName,
                                   java.lang.String _strUniqueInstanceID)
Return the Page Control of the type specified by _strMVCPageControlName (i.e. HTMLTextBox) with the unique instance ID specified by _strUniqueInstanceID.

Parameters:
_strMVCPageControlName - the name of the Page Control (i.e. HTMLTextBox)
_strUniqueInstanceID -
Returns:
IPageControl

GetComponentMgr

public ComponentMgr GetComponentMgr(java.lang.String _strMVCPageControlName)
Return a ComponentMgr of the correct type for the given Page Control.

Parameters:
_strMVCPageControlName - the name of the Page Control (i.e. HTMLTextBox)
Returns:
The ComponentMgr of the correct type for the Page Control

GetImageServerConnectionURL

public java.lang.String GetImageServerConnectionURL()
Return the ImageServerConnectionURL member variable.

Returns:
The image server connectin URL as a string



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