com.plumtree.portaluiinfrastructure.intrinsicportlets
Class IntrinsicPortletModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.activityspace.AClearModel
      extended by com.plumtree.portaluiinfrastructure.intrinsicportlets.IntrinsicPortletModel
All Implemented Interfaces:
IIntrinsicPortletModelRO, IManagedObject, IModel, IModelRO, IMVCObject
Direct Known Subclasses:
CommunitiesPortletModel, EODPortletModel, FoldersPortletModel, JobHistoryPortletModel, LoginPortletModel, SavedSearchPortletModel, SearchPortletModel, SiteMapPortletModel, StandardFooterModel, StandardHeaderModel

public abstract class IntrinsicPortletModel
extends AClearModel
implements IIntrinsicPortletModelRO, IModel

This is the base intrinsic portlet model. All intrinsic portlet models should extend this base class.

Author:
josephc

Field Summary
protected  AActivitySpace m_asOwner
          Parent Activity Space
protected  int m_nContainerClassID
          ContainerClassID
protected  int m_nContainerObjectID
          ContainerObjectID
protected  int m_nPageID
          PageID
protected  int m_nPortletID
          Portlet ID
protected  int m_nPrefType
          Preference type
protected  IPTState m_ptAppDataState
          AppDataState object
protected  IPTGadget m_ptPortlet
          Portlet object
protected  IPTSession m_ptSession
          IPTSession
static int PREF_TYPE_ADMIN
          Preference type for admin preferences
static int PREF_TYPE_COMMUNITY
          Preference type for community preferences
static int PREF_TYPE_PERSONAL
          Preference type for personal preferences
static int SETTINGSTYPE_ADMIN
          Setting type for admin preferences
static int SETTINGSTYPE_COMMUNITY
          Setting type for community preferences
static int SETTINGSTYPE_COMMUNITYPORTLET
          Setting type for community portlet preferences
static int SETTINGSTYPE_PORTLET
          Setting type for user portlet preferences
static int SETTINGSTYPE_USER
          Setting type for user preferences
 
Constructor Summary
IntrinsicPortletModel()
           
 
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  boolean ControlExists()
          Returns true if the portlet has a control associated with it.
abstract  java.lang.String GetName()
          Return the name of the MVC object.
 int GetPortletID()
          Returns portlet ID
 java.lang.Object GetSettingValue(int nSettingType, java.lang.String strName)
          Returns a single setting value, based on the setting type specified.
 java.lang.Object[][] GetSettingValues(int nSettingType, java.lang.String[] arFilter)
          Returns all settings, based on the setting type and filter specified.
 void Init(AActivitySpace parent)
          Inits the Model with the Activity Space.
 void InitPortlet(IPTPageInfo _ptPageInfo, IPTState _ptAppDataState, IPTGadget _ptPortlet, int _nPortletID)
          Initializes the member variables of the portlet.
static boolean IsIntrinsicPortlet(java.lang.Object[][] objArrMarkup)
          Checks the markup array to see whether or not the portlet is intrinsic
 
Methods inherited from class com.plumtree.uiinfrastructure.activityspace.AClearModel
Create, GetNewTempData, GetTempData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.plumtree.uiinfrastructure.activityspace.IManagedObject
Create
 

Field Detail

SETTINGSTYPE_PORTLET

public static final int SETTINGSTYPE_PORTLET
Setting type for user portlet preferences

See Also:
Constant Field Values

SETTINGSTYPE_ADMIN

public static final int SETTINGSTYPE_ADMIN
Setting type for admin preferences

See Also:
Constant Field Values

SETTINGSTYPE_COMMUNITY

public static final int SETTINGSTYPE_COMMUNITY
Setting type for community preferences

See Also:
Constant Field Values

SETTINGSTYPE_COMMUNITYPORTLET

public static final int SETTINGSTYPE_COMMUNITYPORTLET
Setting type for community portlet preferences

See Also:
Constant Field Values

SETTINGSTYPE_USER

public static final int SETTINGSTYPE_USER
Setting type for user preferences

See Also:
Constant Field Values

PREF_TYPE_ADMIN

public static final int PREF_TYPE_ADMIN
Preference type for admin preferences

See Also:
Constant Field Values

PREF_TYPE_PERSONAL

public static final int PREF_TYPE_PERSONAL
Preference type for personal preferences

See Also:
Constant Field Values

PREF_TYPE_COMMUNITY

public static final int PREF_TYPE_COMMUNITY
Preference type for community preferences

See Also:
Constant Field Values

m_asOwner

protected AActivitySpace m_asOwner
Parent Activity Space


m_ptPortlet

protected IPTGadget m_ptPortlet
Portlet object


m_ptSession

protected IPTSession m_ptSession
IPTSession


m_ptAppDataState

protected IPTState m_ptAppDataState
AppDataState object


m_nContainerClassID

protected int m_nContainerClassID
ContainerClassID


m_nContainerObjectID

protected int m_nContainerObjectID
ContainerObjectID


m_nPageID

protected int m_nPageID
PageID


m_nPortletID

protected int m_nPortletID
Portlet ID


m_nPrefType

protected int m_nPrefType
Preference type

Constructor Detail

IntrinsicPortletModel

public IntrinsicPortletModel()
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
Overrides:
CleanupTempData in class AClearModel
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
Overrides:
CleanupAllData in class AClearModel
See Also:
IModel.CleanupAllData()

ControlExists

public abstract boolean ControlExists()
Returns true if the portlet has a control associated with it. This function should be implemented by the child class.

Specified by:
ControlExists in interface IIntrinsicPortletModelRO
Returns:
Returns true if portlet has control. Otherwise return false.
See Also:
IIntrinsicPortletModelRO.ControlExists()

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
Specified by:
GetName in class AClearModel
Returns:
the name of the object.
See Also:
IMVCObject.GetName()

GetPortletID

public int GetPortletID()
Returns portlet ID

Specified by:
GetPortletID in interface IIntrinsicPortletModelRO
Returns:
Portlet ID
See Also:
IIntrinsicPortletModelRO.GetPortletID()

Init

public void Init(AActivitySpace parent)
Inits the Model with the Activity Space. Initialize the IPTSession from the Activity Space

Specified by:
Init in interface IModel
Overrides:
Init in class AClearModel
Parameters:
parent -
See Also:
IModel.Init(AActivitySpace)

InitPortlet

public void InitPortlet(IPTPageInfo _ptPageInfo,
                        IPTState _ptAppDataState,
                        IPTGadget _ptPortlet,
                        int _nPortletID)
Initializes the member variables of the portlet.

Parameters:
__ptPageInfo - IPTPageInfo
_ptAppDataState - AppDataState object
_ptPortlet - Portlet object
_nPortletID - Portlet ID

IsIntrinsicPortlet

public static boolean IsIntrinsicPortlet(java.lang.Object[][] objArrMarkup)
Checks the markup array to see whether or not the portlet is intrinsic

Parameters:
objArrMarkup - Array retrieved from IPTGadget::GetHTMLText()
Returns:
True if the portlet is intrinsic. False otherwise.

GetSettingValue

public java.lang.Object GetSettingValue(int nSettingType,
                                        java.lang.String strName)
Returns a single setting value, based on the setting type specified.

Parameters:
nSettingType - Setting type
strName - Setting name
Returns:
Setting value
See Also:
com.plumtree.portaluiinfrastructure.intrinsicportlets.prefs.IIntrinsicPortletPrefsModelRO#GetSettingValue(int, String)

GetSettingValues

public java.lang.Object[][] GetSettingValues(int nSettingType,
                                             java.lang.String[] arFilter)
Returns all settings, based on the setting type and filter specified.

Parameters:
nSettingType - Setting type
arFilter - Filter for settings
Returns:
All settings
See Also:
com.plumtree.portaluiinfrastructure.intrinsicportlets.prefs.IIntrinsicPortletPrefsModelRO#GetSettingValues(int, Object[])



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