com.plumtree.uiinfrastructure.activityspace
Class AClearModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.activityspace.AClearModel
All Implemented Interfaces:
IManagedObject, IModel, IModelRO, IMVCObject
Direct Known Subclasses:
DirModel, IntrinsicPortletModel, LoginModel, MyPortalModel, NavigationModel, NetworkSearchModel, PreviewPortletModel, SiteMapModel

public abstract class AClearModel
extends java.lang.Object
implements IModel

This model is designed to have all of it's data stored in a temporary data storage object. This object will be automatically deleted at the end of every HTTP Request and regenerated at the beginning of the next request. This is for browsing pages that have low-memory requirements. This means that data will only be stored during requests. Admin and Editor pages should probably not use this model scheme. All data should go on the temporary storage object, especially Query Results and large arrays. The design of the temporary data object is left to the implementor's discretion.

Author:
Don Hayler

Field Summary
 AActivitySpace m_asOwner
          the parent AActivitySpace
 
Constructor Summary
AClearModel()
           
 
Method Summary
 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.
abstract  java.lang.String GetName()
          Return the name of the MVC object.
abstract  java.lang.Object GetNewTempData()
          This method returns a new temporary data object.
protected  java.lang.Object GetTempData()
          This method is used to access the temporary data object.
 void Init(AActivitySpace parent)
          This method initializes the model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_asOwner

public AActivitySpace m_asOwner
the parent AActivitySpace

Constructor Detail

AClearModel

public AClearModel()
Method Detail

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

GetNewTempData

public abstract java.lang.Object GetNewTempData()
This method returns a new temporary data object. It is called at the beginning of a new HTTP Request. This method can perform initialization on the data object if necessary.

Returns:
Object the new temporary data object

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

GetTempData

protected java.lang.Object GetTempData()
This method is used to access the temporary data object. This ensures that a valid temporary data object can always be obtained.

Returns:
Object the current temporary data object



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