com.plumtree.uiinfrastructure.errordisplay
Class AErrorModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.errordisplay.AErrorModel
All Implemented Interfaces:
IManagedObject, IModel, IModelRO, IMVCObject, IErrorModelRO
Direct Known Subclasses:
ErrorModel

public abstract class AErrorModel
extends java.lang.Object
implements IModel, IErrorModelRO

This is an abstract model extended by various concrete error model.

Author:
Beng

Field Summary
protected  AActivitySpace m_asOwner
           
 
Constructor Summary
AErrorModel()
           
 
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.
 void ClearError(java.lang.String sKey)
          Call this method to clear the specified error.
abstract  void ClearError(java.lang.String sKey, ISessionManager mySessionManager, IApplication myApplication)
          Implement to remove the specified error.
 void ClearErrors()
          Call this method to clear all errors exposed to the current user.
abstract  void ClearErrors(ISessionManager mySessionManager, IApplication myApplication)
          Implement to remove all errors available to the current user.
abstract  void ClearErrorsForASChange(java.lang.String sASName, ISessionManager mySessionManager, IApplication myApplication)
          Implement to clear those errors that need to be cleared when the user changes activity space.
abstract  java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
abstract  boolean GetDisplaySeparatePageErrors()
          Implement to return a boolean indicating whether this MVC should display errors requiring a separate display page.
 IXPEnumerator GetErrors()
          Call this method to obtain an enumeration of all errors that are appropriate for the current user.
abstract  IXPEnumerator GetErrors(ISessionManager session, IApplication myApplication, AActivitySpace activitySpace, boolean bGetErrorsAssociatedWithAnAS)
          Implement to obtain an enumeration of errors appropriate for the current user.
abstract  boolean GetErrorsAssociatedWithAnAS()
          Implement to return a boolean indicating whether this MVC should display only those errors associated with the current MVC.
abstract  java.lang.String GetName()
          Return the name of the MVC object.
abstract  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

protected AActivitySpace m_asOwner
Constructor Detail

AErrorModel

public AErrorModel()
Method Detail

ClearError

public abstract void ClearError(java.lang.String sKey,
                                ISessionManager mySessionManager,
                                IApplication myApplication)
Implement to remove the specified error. Concrete implementations should differ to the UIErrorHandler class, or one of its subclasses.

Parameters:
sKey - String key used to store the error to be removed.
mySessionManager - ISessionManager
myApplication - IApplication

ClearErrors

public abstract void ClearErrors(ISessionManager mySessionManager,
                                 IApplication myApplication)
Implement to remove all errors available to the current user. Concrete implementations should differ to the UIErrorHandler class, or one of its subclasses.

Parameters:
mySessionManager - ISessionManager
myApplication - IApplication

ClearErrorsForASChange

public abstract void ClearErrorsForASChange(java.lang.String sASName,
                                            ISessionManager mySessionManager,
                                            IApplication myApplication)
Implement to clear those errors that need to be cleared when the user changes activity space. Concrete implementations should differ to the UIErrorHandler class, or one of its subclasses.

Parameters:
sASName - String name of the new activity space.
mySessionManager - ISessionManager
myApplication - IApplication

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

GetDisplaySeparatePageErrors

public abstract boolean GetDisplaySeparatePageErrors()
Implement to return a boolean indicating whether this MVC should display errors requiring a separate display page.

Specified by:
GetDisplaySeparatePageErrors in interface IErrorModelRO
Returns:
boolean value

GetErrors

public abstract IXPEnumerator GetErrors(ISessionManager session,
                                        IApplication myApplication,
                                        AActivitySpace activitySpace,
                                        boolean bGetErrorsAssociatedWithAnAS)
Implement to obtain an enumeration of errors appropriate for the current user. Concrete implementations should differ to the UIErrorHandler class, or one of its subclasses.

Parameters:
session - ISessionManager
myApplication - IApplication
as - AActivitySpace
bGetErrorsAssociatedWithAnAS - boolean value
Returns:
IXPEnumerator of UIError objects

GetErrorsAssociatedWithAnAS

public abstract boolean GetErrorsAssociatedWithAnAS()
Implement to return a boolean indicating whether this MVC should display only those errors associated with the current MVC.

Specified by:
GetErrorsAssociatedWithAnAS in interface IErrorModelRO
Returns:
boolean value

GetName

public abstract java.lang.String GetName()
Return the name of the MVC object.

Specified by:
GetName in interface IMVCObject
Returns:
the name of the object.

Init

public abstract void Init(AActivitySpace parent)
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

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

ClearError

public void ClearError(java.lang.String sKey)
Call this method to clear the specified error.

Parameters:
sKey - String key used to store the error. Available from UIError.GetSessionKey().

ClearErrors

public void ClearErrors()
Call this method to clear all errors exposed to the current user.


GetErrors

public IXPEnumerator GetErrors()
Call this method to obtain an enumeration of all errors that are appropriate for the current user.

Specified by:
GetErrors in interface IErrorModelRO
Returns:
IXPEnumerator containing UIError objects.



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