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

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

public class PreviewCommunityBarModel
extends java.lang.Object
implements IModel, IModelRO, IJoinPreviewCommunityModel

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
 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
PreviewCommunityBarModel()
           
 
Method Summary
 void AddCommunity()
          Method addCommunity - adds the user into the community's membership list as a free member
 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.
 boolean CommunityJoinFailed()
          Is Error Page
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 java.lang.String GetCommunityDescription()
          Get community description
 int GetCommunityID()
          Set to use Preview Header
 int GetCommunityIndex()
          Get to use for preview from selection page
 java.lang.String GetCommunityName()
          Get community Name
 java.lang.String GetCommunityURL()
          Get invited or preview community URL
 java.lang.String GetDefaultCommunityURL()
          Get User's default community URL
 java.lang.String GetDescriptionURL()
           
 java.lang.String GetJoinCommunityJavaScriptOverride()
          Get Join Community Javascript override.
 java.lang.String GetJoinURL()
           
 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
 boolean IsCommunityInvitePage()
          Is Community Invite Page
 boolean IsCommunityMember()
           
 boolean IsCommunityOpened()
          Get to check if community exist
 boolean IsCommunityPreviewPage()
          Is Community Preview Page
 boolean IsCommunitySelectionPreviewPage()
          Is Community Selection Preview Page
 void SetCommunityChecked(boolean bCommunityChecked)
          Set community as selected
 void SetCommunityIDAndOpen(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 SetErrorPage(boolean bErrorPage)
          Set to use Preview Header
 void SetJoinCommunityJavaScriptOverride(java.lang.String _strOverride)
          Set the Join Community Javascript override.
 boolean UserHasReadAccess()
          Set to use Preview Header
 boolean UserHasSelectAccess()
          Set to use Preview Header
 
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_strJavascriptOverride

public java.lang.String m_strJavascriptOverride
Join Community Javascript override

Constructor Detail

PreviewCommunityBarModel

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

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

AddCommunity

public void AddCommunity()
Method addCommunity - adds the user into the community's membership list as a free member

Throws:
HTMLException

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

GetCommunityDescription

public java.lang.String GetCommunityDescription()
Get community description

Returns:
String

GetCommunityID

public int GetCommunityID()
Set to use Preview Header

Specified by:
GetCommunityID in interface IJoinPreviewCommunityModel
Returns:
int

GetCommunityIndex

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


GetCommunityName

public java.lang.String GetCommunityName()
Get community Name

Specified by:
GetCommunityName in interface IJoinPreviewCommunityModel
Returns:
String

GetCommunityURL

public java.lang.String GetCommunityURL()
Get invited or preview community URL

Specified by:
GetCommunityURL in interface IJoinPreviewCommunityModel
Returns:
String

GetDefaultCommunityURL

public java.lang.String GetDefaultCommunityURL()
Get User's default community URL

Specified by:
GetDefaultCommunityURL in interface IJoinPreviewCommunityModel
Returns:
String

GetDescriptionURL

public java.lang.String GetDescriptionURL()
See Also:
com.plumtree.portalpages.browsing.myportal.IMyPortalModelRO#GetDescriptionURL()

GetJoinURL

public java.lang.String GetJoinURL()
See Also:
com.plumtree.portalpages.browsing.myportal.IMyPortalModelRO#GetJoinURL()

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

IsCommunityOpened

public boolean IsCommunityOpened()
Get to check if community exist


IsCommunityChecked

public boolean IsCommunityChecked()
Get to check for selected community


IsCommunityInvitePage

public boolean IsCommunityInvitePage()
Is Community Invite Page

Returns:
boolean

IsCommunityMember

public boolean IsCommunityMember()

IsCommunityPreviewPage

public boolean IsCommunityPreviewPage()
Is Community Preview Page

Returns:
boolean

IsCommunitySelectionPreviewPage

public boolean IsCommunitySelectionPreviewPage()
Is Community Selection Preview Page

Returns:
boolean

CommunityJoinFailed

public boolean CommunityJoinFailed()
Is Error Page

Specified by:
CommunityJoinFailed in interface IJoinPreviewCommunityModel
Returns:
boolean

SetCommunityChecked

public void SetCommunityChecked(boolean bCommunityChecked)
Set community as selected


SetCommunityIDAndOpen

public void SetCommunityIDAndOpen(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


SetErrorPage

public void SetErrorPage(boolean bErrorPage)
Set to use Preview Header


UserHasReadAccess

public boolean UserHasReadAccess()
Set to use Preview Header


UserHasSelectAccess

public boolean UserHasSelectAccess()
Set to use Preview Header


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.