com.plumtree.uiinfrastructure.activityspace
Class AActivitySpace

java.lang.Object
  extended by com.plumtree.uiinfrastructure.activityspace.AActivitySpace
All Implemented Interfaces:
IManagedObject, IMVCObject, IEnvironment
Direct Known Subclasses:
AFormAS, BaseOpenerAS, ChoosePageDevicesAS_HTML32, ChoosePageDevicesAS_WML, ErrorDevicesAS_HTML32, ErrorDevicesAS_WML, HelpFrameAS, KDDocumentDataStoreAS, KDFolderDataStoreAS, LoginDevicesAS_HTML32, LoginDevicesAS_WML, LogoffDevicesAS_HTML32, LogoffDevicesAS_WML, MyPageDevicesAS_HTML32, MyPageDevicesAS_WML, OpenDocAS, PEIAS, PortletDevicesAS_HTML32, PortletDevicesAS_WML, PTLoginHelperAS, SearchServerStatusAS, UserIdLookupAS, UserRESTAS

public abstract class AActivitySpace
extends java.lang.Object
implements IMVCObject, IManagedObject, IEnvironment

AActivitySpaces contain the MVC setup for a set of Display Pages, as well as the Display Pages themselves. All objects should come to their parent AActivitySpace for access to other objects, such as IModels, IViews, and user objects like IPTSession and UserPreferences. Activity spaces setup and manage the interaction between the different MVC objects and the IDisplayPage. They initialize all of the objects, and can get and set data on the Models if necessary. Activity Spaces are not subject to the strict data/logic/presentation separation that MVC components are. This class provides helper implementations of the methods to get MVC Objects and manages them automatically (IModel, IView, IControl, IDisplayPage). Just register things and then call GetModel, etc... to access them. It also provides base implementations of some of the common AActivitySpace functionality.

Author:
Don Hayler

Field Summary
protected  XPHashtable m_stringReferences
          This hashtable is used to store references to extremely long query string parameters.
 
Constructor Summary
AActivitySpace()
           
 
Method Summary
 void ChangeSubSpaceKey(java.lang.String subSpaceKey, java.lang.String subSpaceNewKey)
          Changes the key of a sub space.
abstract  boolean CheckBasicAccess(java.lang.String strPage, java.lang.String strControl, boolean bSameSpace)
          This method is called by the Interpreter at the beginning of every HTTP request to determine whether or not the current user has the security privileges necessary to view the requested page.
 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.
abstract  java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DeleteSubSpace(java.lang.String subSpaceKey)
          Delete the specified Sub-space and remove it from the Activity Space cache.
 AccessStyles GetAccessStyle()
          This method returns the current access style (i.e.
 IApplication GetApplication()
          Return the Application.
 IControl GetControl(java.lang.String controlName)
          Return the requested Control.
 boolean GetControlExists(java.lang.String controlName)
          This method checks whether or not a specific control exists in this AActivitySpace.
 IXPEnumerator GetControlsEnumerator()
          Return an Enumerator for the registered controls.
 XPHashtable GetCurrentFormData()
          JF- Returns the current name/value pairs from the Request.
 IXPRequest GetCurrentHTTPRequest()
          Return the HTTP Request for the current request.
 IXPResponse GetCurrentHTTPResponse()
          Return the HTTP Response for the current request.
 java.lang.String GetCurrentNormalizedBaseURL()
          Return the normalized base url of the current request.
 IDisplayPage GetCurrentPage()
          Return the most recent DisplayPage.
 java.lang.String GetCurrentRequestURL()
          Return the full url of the current request.
 java.lang.String GetHelpTopic()
           
 boolean GetIsAccessStyleNonStandard()
          Return true if the current access style is not STANDARD (it is SECTION_508 or LOW_BANDWIDTH) otherwise return false.
 boolean GetIsAccessStyleStandard()
          Return true if the current access style is STANDARD otherwise return false.
 boolean GetIsInPlaceRefreshDisplayOn()
          This method is used to return whether Display Pages should currently be displaying in place content instead of their normal content.
 boolean GetIsInPlaceRefreshEnabled()
          This method is used to return whether this Activity Space has in place refresh enabled.
 boolean GetIsSecuredSpace()
          This method is used to return whether or not this space is secured (SSL) or not (regular HTTP).
 java.lang.String GetLanguage()
          Gets the current language of the user.
 java.lang.String GetLocale()
          Gets the current locale of the user.
 IModel GetModel(java.lang.String modelName)
          Return the requested Model.
 boolean GetModelExists(java.lang.String modelName)
          This method checks whether or not a specific model exists in this AActivitySpace.
 IXPEnumerator GetModelsEnumerator()
          Return an Enumerator for the registered models.
abstract  java.lang.String GetName()
          This method is used to identify the type of this space.
 IDisplayPage GetPage(java.lang.String pageName)
          Return the requested DisplayPage.
 boolean GetPageExists(java.lang.String pageName)
          This method checks whether or not a specific page exists in this AActivitySpace.
 IXPEnumerator GetPagesEnumerator()
          Return an Enumerator for the registered pages.
 AActivitySpace GetParentSpace()
          Return the parent AActivitySpace.
 java.lang.String GetParentSpaceID()
          Return the space ID of the parent AActivitySpace.
 java.lang.String GetParentSpaceName()
          Return the name of the parent AActivitySpace.
 ISessionManager GetPersistentSubSession()
          Returns the persistent subsession that the AActivitySpace can use to store cross-space data for use across multiple login/logout cycles.
 XPResourceManager GetResourceManager()
          Return the XPResourceManager AActivitySpace.GetString() and the static method XPResourceManager.FormatString() should be used instead.
 java.lang.String GetSpaceID()
          Return the unique space ID for this AActivitySpace.
 java.lang.String GetString(int _nStringID, java.lang.String _strResourceFileName)
          This method gets localized strings for an internationalized string file based on the user's locale.
 HTMLElementCollection GetStyleSheetLinks()
          Figure out the style sheet; this method can be overriden by classes that require a special style sheet.
 ISessionManager GetSubSession()
          Returns the subsession that the AActivitySpace can use to store cross-space data.
 AActivitySpace GetSubSpace(java.lang.String subSpaceKey)
          Return the requested Sub-space.
 boolean GetSubSpaceExists(java.lang.String subSpaceKey)
          This method checks whether or not a specific sub-space exists in this AActivitySpace.
 java.lang.String GetSubSpaceKey()
          Returns the sub-space key.
 IXPEnumerator GetSubSpacesEnumerator()
          Return an Enumerator for the registered sub-spaces.
 java.lang.String GetTimeZone()
          Gets the time zone of the current user.
 java.lang.Object GetUserSession()
          Return the user's Session.
 IVarPack GetVarPack(java.lang.String strVarPack)
          Helper method to access Variable Packages.
 IView GetView(java.lang.String viewName)
          Return the requested View.
 boolean GetViewExists(java.lang.String viewName)
          This method checks whether or not a specific view exists in this AActivitySpace.
 IXPEnumerator GetViewsEnumerator()
          Return an Enumerator for the registered views.
 void Init()
          Initialize the Activity Space.
 boolean IsSubSpace()
          Returns whether or not this space is a sub-space.
 java.lang.String refString(java.lang.String value)
          This creates a reference to a long query string parameter.
 boolean RegisterControl(java.lang.String controlName, IModel model)
          This method registers the control so the AActivitySpace can manage it automatically.
 boolean RegisterControl(java.lang.String controlName, java.lang.String storageName, IModel model)
          This method registers the control so the AActivitySpace can manage it automatically.
 boolean RegisterModel(java.lang.String modelName)
          This method registers and initializes the model so the AActivitySpace can manage it automatically.
 boolean RegisterModel(java.lang.String modelName, java.lang.String storageName)
          This method registers and initializes the model so the AActivitySpace can manage it automatically.
 boolean RegisterPage(IDisplayPage page)
          This method registers the IDisplayPage so the AActivitySpace can manage it automatically.
 boolean RegisterPage(IDisplayPage page, java.lang.String strStorageName)
          This method registers the IDisplayPage so the AActivitySpace can manage it automatically.
 boolean RegisterSubSpace(AActivitySpace subSpace, java.lang.String storageName)
          Registers the Sub-space.
 boolean RegisterView(java.lang.String viewName, IModelRO model)
          This method registers the view so the AActivitySpace can manage it automatically.
 boolean RegisterView(java.lang.String viewName, java.lang.String storageName, IModelRO model)
          This method registers the view so the AActivitySpace can manage it automatically.
 void ReInit()
          Re-Initialize the Activity Space in case models are holding on to an old session.
 void SetApplication(IApplication application)
          Sets the Application.
 void SetCurrentFormData(XPHashtable _htFormData)
          JF- Sets the hastable with the name/value pairs from XPRequest.
 void SetCurrentHTTPRequestResponseObjects(IXPRequest xpRequest, IXPResponse xpResponse)
          Sets the HTTP Request and Response Objects for the current request.
 void SetCurrentPage(IDisplayPage page)
          Set the current page for this AActivitySpace.
 void SetCurrentRequestURL(java.lang.String strCurrentRequestURL)
          Sets the current Request URL and computes the normalized base url.
 void SetHelpTopic(java.lang.String s)
           
 void SetIsASSecured(boolean _bIsSecured)
          Should be set to the request secure flag (IsSecureConnection).
 void SetIsInPlaceRefreshDisplayOn(boolean IsInPlaceRefreshDisplayOn)
          This method is used to determin whether Display Pages should currently be displaying in place content instead of their normal content.
 void SetIsInPlaceRefreshEnabled(boolean IsInPlaceRefreshEnabled)
          This method is used to determine whether this Activity Space has in place refresh enabled.
 void SetOverWriteSubSpaces(boolean bOverWrite)
          This method turns on and off overwriting of sub-spaces when they register with this AActivitySpace.
 void SetParentSpace(java.lang.String spaceName, java.lang.String spaceID)
          Set the name and ID of the parent AActivitySpace (i.e.
 void SetPersistentSubSession(ISessionManager session)
          Sets the persistent subsession that the AActivitySpace can use to store cross-space data across multiple login/logout cycles.
 void SetSpaceID(java.lang.String spaceID)
          Sets the unique space ID for this AActivitySpace.
 void SetSubSession(ISessionManager session)
          Sets the subsession that the AActivitySpace can use to store cross-space data.
 void SetSubSpaceKey(java.lang.String sSubSpaceKey)
          Sets the sub-space key.
 void SetTrackCurrentPage(boolean bTrack)
          This method turns on and off automatic tracking of the current IDisplayPage.
 void SetUserSession(java.lang.Object userSession)
          Set the user's Session.
 java.lang.String unrefString(java.lang.String key)
          This unreferences a key to a long query string parameter
 void UnRegisterControl(java.lang.String controlName)
          Un-registers the requested control (removes it from AActivitySpace)
 void UnRegisterModel(java.lang.String modelName)
          Un-registers the requested model (removes it from AActivitySpace)
 void UnRegisterPage(java.lang.String pageName)
          Un-registers the requested view (removes it from AActivitySpace)
 void UnRegisterView(java.lang.String viewName)
          Un-registers the requested view (removes it from AActivitySpace)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_stringReferences

protected XPHashtable m_stringReferences
This hashtable is used to store references to extremely long query string parameters. e.g. hide lists to tree control Only certain parts of the tree control know how to use this.

Constructor Detail

AActivitySpace

public AActivitySpace()
Method Detail

CheckBasicAccess

public abstract boolean CheckBasicAccess(java.lang.String strPage,
                                         java.lang.String strControl,
                                         boolean bSameSpace)
This method is called by the Interpreter at the beginning of every HTTP request to determine whether or not the current user has the security privileges necessary to view the requested page. This method is designed for checking whether or not a particular user has any access to the space, page, and control. More detailed checking (of query string parameters, for instance), should be done in the IControl.CheckActionSecurityAndExecute() method. For Plumtree portal applications (IPTActivitySpaces), since the IPTSession is guaranteed to be set before Init() & CheckBasicAccess() are called, you can check access as follows: return (GetIPTSession().GetSessionInfo().CheckForActivityRight (new Integer(PT_ACTIVITY_RIGHTS.PT_ACTIVITY_RIGHT_ACCESS_ADMINISTRATION)) == 1);

Parameters:
String - the requested IDisplayPage name (may be null for default)
String - the requested IControl name (may be null if not used)
boolean - true implies this is from an internal redirect from the same space false implies this is an URL from the user, or a redirect from another space.
Returns:
boolean true implies access is allowed, false implies access is denied

Create

public abstract java.lang.Object Create()
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();)

GetName

public abstract java.lang.String GetName()
This method is used to identify the type of this space.

Specified by:
GetName in interface IMVCObject
Returns:
String the name of this AActivitySpace

SetHelpTopic

public void SetHelpTopic(java.lang.String s)

GetHelpTopic

public java.lang.String GetHelpTopic()

ChangeSubSpaceKey

public void ChangeSubSpaceKey(java.lang.String subSpaceKey,
                              java.lang.String subSpaceNewKey)
Changes the key of a sub space.

Parameters:
String - the key of the sub-space to change the key
String - the new key for that sub space

DeleteSubSpace

public void DeleteSubSpace(java.lang.String subSpaceKey)
Delete the specified Sub-space and remove it from the Activity Space cache. This is permanent! The sub-space key is different from the space ID.

Parameters:
String - the sub-space key of the Sub-space to delete

GetAccessStyle

public AccessStyles GetAccessStyle()
This method returns the current access style (i.e. Section 508 compliance, low bandwidth, or standard).

Specified by:
GetAccessStyle in interface IEnvironment
Returns:
AccessStyles The access style
See Also:
AccessStyles

GetIsAccessStyleStandard

public boolean GetIsAccessStyleStandard()
Return true if the current access style is STANDARD otherwise return false.

Returns:
true if the access style is STANDARD

GetIsAccessStyleNonStandard

public boolean GetIsAccessStyleNonStandard()
Return true if the current access style is not STANDARD (it is SECTION_508 or LOW_BANDWIDTH) otherwise return false.

Returns:
true if the access style is not STANDARD

GetIsSecuredSpace

public boolean GetIsSecuredSpace()
This method is used to return whether or not this space is secured (SSL) or not (regular HTTP).

Returns:
boolean true implies secured

GetApplication

public IApplication GetApplication()
Return the Application.

Returns:
the application

GetControl

public IControl GetControl(java.lang.String controlName)
Return the requested Control. This method should probably wrap control objects in aggregating control objects to do page specific tasks. In other words, the default package control should have no page specific knowledge.

Parameters:
String - the name of the control to get
Returns:
IControl the requested control

GetControlExists

public boolean GetControlExists(java.lang.String controlName)
This method checks whether or not a specific control exists in this AActivitySpace.

Parameters:
String - the name of the control to check
Returns:
boolean whether or not the control exists

GetControlsEnumerator

public IXPEnumerator GetControlsEnumerator()
Return an Enumerator for the registered controls.

Returns:
IXPEnumerator the registered controls

GetCurrentPage

public IDisplayPage GetCurrentPage()
Return the most recent DisplayPage.

Returns:
the most recent page

GetCurrentRequestURL

public java.lang.String GetCurrentRequestURL()
Return the full url of the current request.

Specified by:
GetCurrentRequestURL in interface IEnvironment
Returns:
the url of the current request

GetCurrentNormalizedBaseURL

public java.lang.String GetCurrentNormalizedBaseURL()
Return the normalized base url of the current request. The normalized base url is essentially the request url up to and including the '?'.

Specified by:
GetCurrentNormalizedBaseURL in interface IEnvironment
Returns:
The normalized base url of the current request
See Also:
com.plumtree.uiinfrastructure.statichelpers.ConfigHelpers#GetNormalizedBaseURL(String)

GetCurrentHTTPRequest

public IXPRequest GetCurrentHTTPRequest()
Return the HTTP Request for the current request.

Specified by:
GetCurrentHTTPRequest in interface IEnvironment
Returns:
the current request

GetCurrentHTTPResponse

public IXPResponse GetCurrentHTTPResponse()
Return the HTTP Response for the current request.

Specified by:
GetCurrentHTTPResponse in interface IEnvironment
Returns:
the current response

GetCurrentFormData

public XPHashtable GetCurrentFormData()
JF- Returns the current name/value pairs from the Request. (This for PEI use only.)

Returns:
XPHashtable

GetLanguage

public java.lang.String GetLanguage()
Gets the current language of the user. I.E. en, fr, jp

Specified by:
GetLanguage in interface IEnvironment
Returns:
The current language of the user

GetLocale

public java.lang.String GetLocale()
Gets the current locale of the user. I.E. en-us, en-gb, fr-fr, jp-jp

Specified by:
GetLocale in interface IEnvironment
Returns:
The current locale of the user.

GetModel

public IModel GetModel(java.lang.String modelName)
Return the requested Model.

Parameters:
String - the name of the model to get
Returns:
IModel the requested model

GetModelExists

public boolean GetModelExists(java.lang.String modelName)
This method checks whether or not a specific model exists in this AActivitySpace.

Parameters:
String - the name of the model to check
Returns:
boolean whether or not the model exists

GetModelsEnumerator

public IXPEnumerator GetModelsEnumerator()
Return an Enumerator for the registered models.

Returns:
IXPEnumerator the registered models

GetPage

public IDisplayPage GetPage(java.lang.String pageName)
Return the requested DisplayPage.

Parameters:
String - the name of the IDisplayPage to get
Returns:
IDisplayPage the requested page

GetPageExists

public boolean GetPageExists(java.lang.String pageName)
This method checks whether or not a specific page exists in this AActivitySpace.

Parameters:
String - the name of the page to check
Returns:
boolean whether or not the page exists

GetPagesEnumerator

public IXPEnumerator GetPagesEnumerator()
Return an Enumerator for the registered pages.

Returns:
IXPEnumerator the registered pages

GetParentSpace

public AActivitySpace GetParentSpace()
Return the parent AActivitySpace. If there is no parent space, this will return null.

Returns:
AActivitySpace the parent AActivitySpace. null if there is no parent space.

GetParentSpaceID

public java.lang.String GetParentSpaceID()
Return the space ID of the parent AActivitySpace. If there is no parent space, this will return null.

Returns:
String the space ID of the parent AActivitySpace. null if there is no parent space.

GetParentSpaceName

public java.lang.String GetParentSpaceName()
Return the name of the parent AActivitySpace. If there is no parent space, this will return null.

Returns:
String the name of the parent AActivitySpace. null if there is no parent space.

GetResourceManager

public XPResourceManager GetResourceManager()
Return the XPResourceManager AActivitySpace.GetString() and the static method XPResourceManager.FormatString() should be used instead.

Returns:
the Resource manager

GetSpaceID

public java.lang.String GetSpaceID()
Return the unique space ID for this AActivitySpace.

Returns:
String the unique space ID for this AActivitySpace

GetString

public java.lang.String GetString(int _nStringID,
                                  java.lang.String _strResourceFileName)
This method gets localized strings for an internationalized string file based on the user's locale. Available string files:

Specified by:
GetString in interface IEnvironment
Parameters:
_nID - The ID of the string to retrieve
_strStringFile - The name of the string file to use
Returns:
String The localized string
See Also:
Custom string files can also be added to the portal.

GetStyleSheetLinks

public HTMLElementCollection GetStyleSheetLinks()
Figure out the style sheet; this method can be overriden by classes that require a special style sheet.

Returns:
An HTMLCollection that contains one or more PTStyleSheetLink objects (almost always just one)

GetTimeZone

public java.lang.String GetTimeZone()
Gets the time zone of the current user. I.E. TODO

Specified by:
GetTimeZone in interface IEnvironment
Returns:
The time zone of the user.

CleanupTempData

public void CleanupTempData()
This method is called at the end of every HTTP request by the Interpreter. This method then calls IModel.CleanupTempData() on all IModels registered using 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.


CleanupAllData

public void CleanupAllData()
This method is called when an ActivitySpace is removed from the cache. This method then calls IModel.CleanupAllData() on all IModels registered using 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.


GetSubSession

public ISessionManager GetSubSession()
Returns the subsession that the AActivitySpace can use to store cross-space data. This also provides access to the ASCache object (ASConstants.SANDBOXASCACHE). This SubSession is cleared of all data on logout.

Returns:
ISessionManager the subsession that the AActivitySpace can use to store cross-space data.

GetPersistentSubSession

public ISessionManager GetPersistentSubSession()
Returns the persistent subsession that the AActivitySpace can use to store cross-space data for use across multiple login/logout cycles. This SubSession is not cleared of its data on logout, so be sure not to cache anything on this session that could be considered a security risk if it was leaked to another user. Most developers should use the normal subsession (GetSubSession()) for cross-space data storage. This is currently only used when editing the default profiles.

Returns:
ISessionManager the persistent subsession that the AActivitySpace can use to store cross-space data across multiple login/logout cycles.

GetSubSpace

public AActivitySpace GetSubSpace(java.lang.String subSpaceKey)
Return the requested Sub-space. The sub-space key is different from the space ID.

Parameters:
String - the sub-space key of the Sub-space to get
Returns:
AActivitySpace the requested Sub-space

GetSubSpaceExists

public boolean GetSubSpaceExists(java.lang.String subSpaceKey)
This method checks whether or not a specific sub-space exists in this AActivitySpace.

Parameters:
String - the name of the sub-space to check
Returns:
boolean whether or not the sub-space exists

GetSubSpaceKey

public java.lang.String GetSubSpaceKey()
Returns the sub-space key. If this is null, this is not a sub-space. This key is used by the parent AActivitySpace to identify sub-spaces (in case there are multiple instances of the same type of sub-space). The sub-space key is different from the space ID.

Returns:
String the sub-space key

GetSubSpacesEnumerator

public IXPEnumerator GetSubSpacesEnumerator()
Return an Enumerator for the registered sub-spaces.

Returns:
IXPEnumerator the registered sub-spaces

GetUserSession

public java.lang.Object GetUserSession()
Return the user's Session. This is a generic Object that can be used for different kinds of sessions. This will have to be cast to the correct type of session (IPTSession for the portal).

Specified by:
GetUserSession in interface IEnvironment
Returns:
Object the user's session

GetVarPack

public IVarPack GetVarPack(java.lang.String strVarPack)
Helper method to access Variable Packages.

Specified by:
GetVarPack in interface IEnvironment
Returns:
IVarPack the requested VarPack

GetView

public IView GetView(java.lang.String viewName)
Return the requested View.

Parameters:
String - the name of the view to get
Returns:
IView the requested view

GetViewExists

public boolean GetViewExists(java.lang.String viewName)
This method checks whether or not a specific view exists in this AActivitySpace.

Parameters:
String - the name of the view to check
Returns:
boolean whether or not the view exists

GetViewsEnumerator

public IXPEnumerator GetViewsEnumerator()
Return an Enumerator for the registered views.

Returns:
IXPEnumerator the registered views

Init

public void Init()
Initialize the Activity Space. This method is called after common attributes like ID, parent, session, application, etc... are set. Get methods are not valid until this method is called. This method should be overridden and called as super.Init();


ReInit

public void ReInit()
Re-Initialize the Activity Space in case models are holding on to an old session.


IsSubSpace

public boolean IsSubSpace()
Returns whether or not this space is a sub-space.

Returns:
boolean true implies this is a sub-space

RegisterControl

public boolean RegisterControl(java.lang.String controlName,
                               IModel model)
This method registers the control so the AActivitySpace can manage it automatically. It also initializes it with the IModel argument. This operation will fail and return false if the control is null or if there is already a control with the same name registered with the AActivitySpace.

Parameters:
String - controlName the name of the IControl to register
IModel - the model to initialize this IControl with
Returns:
boolean true implies success false implies failure

RegisterControl

public boolean RegisterControl(java.lang.String controlName,
                               java.lang.String storageName,
                               IModel model)
This method registers the control so the AActivitySpace can manage it automatically. This method allows the client to store the control under a name other than the one returned by IControl.GetName(). This allows the client to use more than one control of the same type in a single AActivitySpace. It also initializes it with the IModel argument. This operation will fail and return false if the control is null or if there is already a control with the same name registered with the AActivitySpace. If you register a control with a storage name of "" (the empty string), this will be used as the default control in your space. This means that anytime an URL does not have a control specified in it, this default control will be used.

Parameters:
String - controlName the name of the IControl to register
String - storageName the name to store this IControl under
IModel - the model to initialize this IControl with
Returns:
boolean true implies success false implies failure

RegisterModel

public boolean RegisterModel(java.lang.String modelName)
This method registers and initializes the model so the AActivitySpace can manage it automatically. This operation will fail and return false if the model is null or if there is already a model with the same name registered with the AActivitySpace.

Parameters:
String - modelName the name of the IModel to register
Returns:
boolean true implies success false implies failure

RegisterModel

public boolean RegisterModel(java.lang.String modelName,
                             java.lang.String storageName)
This method registers and initializes the model so the AActivitySpace can manage it automatically. This method allows the user to use a name other than the model name returned by IModel.GetName(), which allows the user to have multiple models of the same type in one AActivitySpace. This operation will fail and return false if the model is null or if there is already a model with the same name registered with the AActivitySpace.

Parameters:
String - modelName the name of the IModel to register
String - storageName the name to store the IModel under
Returns:
boolean true implies success false implies failure

RegisterSubSpace

public boolean RegisterSubSpace(AActivitySpace subSpace,
                                java.lang.String storageName)
Registers the Sub-space. The sub-space key is different from the space ID.

Parameters:
String - the key of the Sub-space to register
AActivitySpace - the sub-space to register
Returns:
true if registration succesful

RegisterView

public boolean RegisterView(java.lang.String viewName,
                            IModelRO model)
This method registers the view so the AActivitySpace can manage it automatically. It also initializes it with the IModel and AActivitySpace arguments. This operation will fail and return false if the view is null or if there is already a view with the same name registered with the AActivitySpace.

Parameters:
String - viewName the name of the IView to register
IModel - the model to initialize this IView with
Returns:
boolean true implies success false implies failure

RegisterView

public boolean RegisterView(java.lang.String viewName,
                            java.lang.String storageName,
                            IModelRO model)
This method registers the view so the AActivitySpace can manage it automatically. This method allows the user to store the view with a name other than the one returned by IView.GetName(). This allows the user to use multiple views of the same type in one AActivitySpace. It also initializes it with the IModel and AActivitySpace arguments. This operation will fail and return false if the view is null or if there is already a view with the same name registered with the AActivitySpace.

Parameters:
String - viewName the name of the IView to register
String - storageName the name to store this IView under
IModel - the model to initialize this IView with
Returns:
boolean true implies success false implies failure

SetApplication

public void SetApplication(IApplication application)
Sets the Application. This method must be called before Init();

Parameters:
the - application

SetCurrentRequestURL

public void SetCurrentRequestURL(java.lang.String strCurrentRequestURL)
Sets the current Request URL and computes the normalized base url. This method must be called at the beginning of every request.

Parameters:
the - current request url

SetCurrentHTTPRequestResponseObjects

public void SetCurrentHTTPRequestResponseObjects(IXPRequest xpRequest,
                                                 IXPResponse xpResponse)
Sets the HTTP Request and Response Objects for the current request. This method must be called at the beginning of every request.

Parameters:
The - current XPRequest
The - current XPResponse

SetCurrentFormData

public void SetCurrentFormData(XPHashtable _htFormData)
JF- Sets the hastable with the name/value pairs from XPRequest. (This for PEI use only.) This method must be called at the beginning of every request.

Parameters:
_htFormData -

SetCurrentPage

public void SetCurrentPage(IDisplayPage page)
Set the current page for this AActivitySpace. If this AActivitySpace only has one IDisplayPage, the current page will automatically be set to that IDisplayPage. If current page tracking is on (off by default), the Interpeter will set the current page to be the most recently accessed page.

Parameters:
IDisplayPage - the current Display Page

SetIsASSecured

public void SetIsASSecured(boolean _bIsSecured)
Should be set to the request secure flag (IsSecureConnection). This method must be called before Init();

Parameters:
_bIsSecured -

SetOverWriteSubSpaces

public void SetOverWriteSubSpaces(boolean bOverWrite)
This method turns on and off overwriting of sub-spaces when they register with this AActivitySpace. If bOverWrite is false, the space will give an error and ignore requests to overwrite a sub-space. This is the default state.

Parameters:
boolean - true implies allow overwriting of sub-space false implies ignore attempts to overwrite a sub-space (default)

SetParentSpace

public void SetParentSpace(java.lang.String spaceName,
                           java.lang.String spaceID)
Set the name and ID of the parent AActivitySpace (i.e. the one that launched this space). If there is no parent space, then this method does not need to be called.

Parameters:
String - spaceName the name of the parent space
String - spaceID the ID of the parent space

SetSpaceID

public void SetSpaceID(java.lang.String spaceID)
Sets the unique space ID for this AActivitySpace. This method must be called before Init();

Parameters:
the - unique space ID for this AActivitySpace

SetSubSession

public void SetSubSession(ISessionManager session)
Sets the subsession that the AActivitySpace can use to store cross-space data. This SubSession will be cleared on logout. This method must be called before Init();

Parameters:
the - subsession that the AActivitySpace can use to store cross-space data.

SetPersistentSubSession

public void SetPersistentSubSession(ISessionManager session)
Sets the persistent subsession that the AActivitySpace can use to store cross-space data across multiple login/logout cycles. This SubSession will not be cleared on logout. This method must be called before Init();

Parameters:
the - subsession that the AActivitySpace can use to store cross-space data.

SetSubSpaceKey

public void SetSubSpaceKey(java.lang.String sSubSpaceKey)
Sets the sub-space key. If this is null, this is not a sub-space. By default, spaces are not sub-spaces. This key is used by the parent AActivitySpace to identify sub-spaces (in case there are multiple instances of the same type of sub-space). The sub-space key is different from the space ID.

Parameters:
String - sub-space key

SetTrackCurrentPage

public void SetTrackCurrentPage(boolean bTrack)
This method turns on and off automatic tracking of the current IDisplayPage. The Interpreter calls SetCurrentPage at the end of every request with the most recently viewed IDisplayPage. If bTrack is false, MainAS will ignore this information. This is the default state.

Parameters:
boolean - true implies track current page information false implies ignore page tracking information (default)

SetUserSession

public void SetUserSession(java.lang.Object userSession)
Set the user's Session. This is a generic object that can be used for different kinds of user sessions. For the portal it is an IPTSession. This will be called before Init() and CheckBasicAccess() are called.

Parameters:
Object - userSession to be set

UnRegisterPage

public void UnRegisterPage(java.lang.String pageName)
Un-registers the requested view (removes it from AActivitySpace)

Parameters:
String - the name of the view to un register

UnRegisterView

public void UnRegisterView(java.lang.String viewName)
Un-registers the requested view (removes it from AActivitySpace)

Parameters:
String - the name of the view to un register

UnRegisterControl

public void UnRegisterControl(java.lang.String controlName)
Un-registers the requested control (removes it from AActivitySpace)

Parameters:
String - the name of the control to unregister

UnRegisterModel

public void UnRegisterModel(java.lang.String modelName)
Un-registers the requested model (removes it from AActivitySpace)

Parameters:
String - the name of the model to unregister

RegisterPage

public boolean RegisterPage(IDisplayPage page)
This method registers the IDisplayPage so the AActivitySpace can manage it automatically. It also initializes it with the AActivitySpace argument. This operation will fail and return false if the IDisplayPage is null or if there is already a IDisplayPage with the same name registered with the AActivitySpace. The first DisplayPage will be set as the current IDisplayPage.

Parameters:
IDisplayPage - page to register
Returns:
boolean true implies success false implies failure

RegisterPage

public boolean RegisterPage(IDisplayPage page,
                            java.lang.String strStorageName)
This method registers the IDisplayPage so the AActivitySpace can manage it automatically. It also initializes it with the AActivitySpace argument. This operation will fail and return false if the IDisplayPage is null or if there is already a IDisplayPage with the same name registered with the AActivitySpace. The first DisplayPage will be set as the current IDisplayPage.

Parameters:
IDisplayPage - page to register
String - storageName the name to store the IDisplayPage under
Returns:
boolean true implies success false implies failure

refString

public java.lang.String refString(java.lang.String value)
This creates a reference to a long query string parameter. Currently only the tree knows how to unreference this for certain parameters.

Parameters:
value -
Returns:
returns the key that is used to unref the value - This needs to be preceded with "@" for this to be used.

unrefString

public java.lang.String unrefString(java.lang.String key)
This unreferences a key to a long query string parameter

Parameters:
key - -- This must not have the "@" in front of it
Returns:
returns value or null if there was no value

GetIsInPlaceRefreshEnabled

public boolean GetIsInPlaceRefreshEnabled()
This method is used to return whether this Activity Space has in place refresh enabled. If it is enabled, then we can, for example, include the JavaScript for JSXML. This method should be used carefully in shared components because if shared components use this method, then any time you add any in-place to an AS, you will have to implement it for all the shared components. Shared components that require you to implement a partial content display method should use another way to determine if they should be enabled or not.

Returns:
boolean True if this AS has enabled in place refresh.

SetIsInPlaceRefreshEnabled

public void SetIsInPlaceRefreshEnabled(boolean IsInPlaceRefreshEnabled)
This method is used to determine whether this Activity Space has in place refresh enabled. If it is enabled, then we can, for example, include the JavaScript for JSXML. This method should be used carefully in shared components because if shared components use this method, then any time you add any in-place to an AS, you will have to implement it for all the shared components. Shared components that require you to implement a partial content display method should use another way to determine if they should be enabled or not.

Parameters:
boolean - True to enabled this AS for in place refresh.

GetIsInPlaceRefreshDisplayOn

public boolean GetIsInPlaceRefreshDisplayOn()
This method is used to return whether Display Pages should currently be displaying in place content instead of their normal content.

Returns:
boolean True to show in place content.

SetIsInPlaceRefreshDisplayOn

public void SetIsInPlaceRefreshDisplayOn(boolean IsInPlaceRefreshDisplayOn)
This method is used to determin whether Display Pages should currently be displaying in place content instead of their normal content.

Parameters:
boolean - True to show in place content.



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