com.plumtree.portalpages.browsing.myportal.communities
Class PreviewCommunityModel

java.lang.Object
  extended by com.plumtree.portalpages.browsing.myportal.communities.PreviewCommunityModel
All Implemented Interfaces:
IManagedObject, IModel, IModelRO, IMVCObject

public class PreviewCommunityModel
extends java.lang.Object
implements IModel, IModelRO

File: CommunityInvitationModelHelper.java ----------------------------------------- ModelHelper for Community Preview/Invitations This is necessary because we don't need this for all MyPortal Pages, yet we want it on the MyPortal Model.

Author:
NaveenP/DustinA

Field Summary
static int INVITEHEADER
          Constant: Invite Header Bar
 int m_nPreviewStatus
          Which bar is being used
 java.lang.String m_strJavascriptOverride
          Join Community Javascript override
static int NOPREVIEWHEADER
          Constant: No Preview Header Bar
static int PREVIEWHEADER
          Constant: Preview Header Bar for preview only (as in Community Editor)
static int SELECTIONPREVIEWHEADER
          Constant: Preview Header Bar for Selection Page
static java.lang.String STR_MVC_CLASS_NAME
           
 
Constructor Summary
PreviewCommunityModel()
           
 
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.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 int GetCommunityID()
          Set to use Preview Header
 int GetCommunityIndex()
          Get to use for preview from selection page
 java.lang.String GetJoinCommunityJavaScriptOverride()
          Get Join Community Javascript override.
 java.lang.String GetName()
          Return the name of the MVC object.
 void Init(AActivitySpace parent)
          This method initializes the model.
 boolean IsCommunityChecked()
          Get to check for selected community
 void SetCommunityChecked(boolean bCommunityChecked)
          Set community as selected
 void SetCommunityID(int nCommunityID)
          Set to use Preview Header
 void SetCommunityIndex(int nCommunityIndex)
          Set to use selection page
 void SetCommunityToInvitePage()
          Set to use Invite Header
 void SetCommunityToPreviewPage()
          Set to use Preview Header
 void SetCommunityToSelectionPreviewPage()
          Set to use Selection Preview Header
 void SetJoinCommunityJavaScriptOverride(java.lang.String _strOverride)
          Set the Join Community Javascript override.
 boolean UserHasCommunityAccess()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
See Also:
Constant Field Values

NOPREVIEWHEADER

public static final int NOPREVIEWHEADER
Constant: No Preview Header Bar

See Also:
Constant Field Values

SELECTIONPREVIEWHEADER

public static final int SELECTIONPREVIEWHEADER
Constant: Preview Header Bar for Selection Page

See Also:
Constant Field Values

INVITEHEADER

public static final int INVITEHEADER
Constant: Invite Header Bar

See Also:
Constant Field Values

PREVIEWHEADER

public static final int PREVIEWHEADER
Constant: Preview Header Bar for preview only (as in Community Editor)

See Also:
Constant Field Values

m_nPreviewStatus

public int m_nPreviewStatus
Which bar is being used


m_strJavascriptOverride

public java.lang.String m_strJavascriptOverride
Join Community Javascript override

Constructor Detail

PreviewCommunityModel

public PreviewCommunityModel()
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 java.lang.Object Create()
Description copied from interface: IManagedObject
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();)
See Also:
IManagedObject.Create()

GetCommunityID

public int GetCommunityID()
Set to use Preview Header


GetCommunityIndex

public int GetCommunityIndex()
Get to use for preview from selection page


GetName

public 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:
com.plumtree.xpshared.activityspace.IModelRO#GetName()

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:
com.plumtree.xpshared.activityspace.IModel#Init()

IsCommunityChecked

public boolean IsCommunityChecked()
Get to check for selected community


SetCommunityChecked

public void SetCommunityChecked(boolean bCommunityChecked)
Set community as selected


SetCommunityID

public void SetCommunityID(int nCommunityID)
Set to use Preview Header


SetCommunityIndex

public void SetCommunityIndex(int nCommunityIndex)
Set to use selection page


SetCommunityToInvitePage

public void SetCommunityToInvitePage()
Set to use Invite Header


SetCommunityToPreviewPage

public void SetCommunityToPreviewPage()
Set to use Preview Header


SetCommunityToSelectionPreviewPage

public void SetCommunityToSelectionPreviewPage()
Set to use Selection Preview Header


UserHasCommunityAccess

public boolean UserHasCommunityAccess()

GetJoinCommunityJavaScriptOverride

public java.lang.String GetJoinCommunityJavaScriptOverride()
Get Join Community Javascript override. This javascript should be the name of the javascript function to be used in the onclick attribute of the join community button. The function should take 2 arguments: the community ID, and a reference to the popup window. (i.e. If the name is "joinCommunity", then the function will look like this: "joinCommunity(communityID, self)"). This function name can also include an optional window reference (i.e. "opener.joinCommunity").

Returns:
String the name of the javascript function to use when joining the community. This string will be null if there is no override.

SetJoinCommunityJavaScriptOverride

public void SetJoinCommunityJavaScriptOverride(java.lang.String _strOverride)
Set the Join Community Javascript override. This javascript should be the name of the javascript function to be used in the onclick attribute of the join community button. The function should take 2 arguments: the community ID, and a reference to the popup window. (i.e. If the name is "joinCommunity", then the function will look like this: "joinCommunity(communityID, self)"). This function name can also include an optional window reference (i.e. "opener.joinCommunity"). Null means to use the default javascript.




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