com.plumtree.portalpages.browsing.myportal
Class MyPortalModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.activityspace.AClearModel
      extended by com.plumtree.portalpages.browsing.myportal.MyPortalModel
All Implemented Interfaces:
IJoinPreviewCommunityModel, IUnsubscribeCommunityModel, IMyPortalModel, IMyPortalModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IRepostModel

public class MyPortalModel
extends AClearModel
implements IModel, IMyPortalModelRO, IMyPortalModel, IRepostModel, IJoinPreviewCommunityModel, IUnsubscribeCommunityModel

Author:
MichaelD

Field Summary
static java.lang.String ADMIN_PREF_TYPE
           
static java.lang.String COMMUNITY_PREF_TYPE
           
 boolean m_bIsPreviewPage
          Is Preview Page
 boolean m_bIsProfilePage
          mj: true if this is a user profile community page
 int m_nCommunityID
          Community ID
 int m_nPageID
          Page ID
 java.lang.String m_strPageName
          Page Name
 java.lang.String m_strRawHeaders
          Raw Headers
static int N_CONTENTCANVAS_COLUMN
          Content Canvas Column
static java.lang.String PERSONAL_PREF_TYPE
           
static java.lang.String PORTLET_PREF_TYPE
           
static java.lang.String PROFILEDATA_SESSIONVAR_NAME
           
static java.lang.String STR_MVC_CLASS_NAME
          Class Name
 
Fields inherited from class com.plumtree.uiinfrastructure.activityspace.AClearModel
m_asOwner
 
Constructor Summary
MyPortalModel()
           
 
Method Summary
 void AddPortletBundle(int nPageID, int nPortletBundleID)
          Adds the portlet bundle.
 void AddSinglePortlet(int nPageID, int nPortletID)
          Adds the specified portlet.
 void CleanupTempData()
          This method is called at the end of every HTTP request by the Interpreter.
 void CollapsePortlet(int nCommunityID, int nPageID, int nPortletToCollapse)
          Collapses the gadget at the given index.
 boolean CommunityJoinFailed()
          Is Error Page
 boolean CommunityUnsubscribeFailed()
          Is Error Page
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DeletePage(int nPageID)
          Method DeletePage.
 void ExpandPortlet(int nCommunityID, int nPageID, int nPortletToExpand)
          Expands the gadget at the given index.
 void Finish()
          Implement some code to execute when the user clicks on "Finish".
 java.lang.Object[][] GetCollapsedOrErrorContent(int nPortletIndex)
          Method GetPortletCollapsedOrErrorContent.
 int GetCommunityID()
          Get the community ID of the community we are currently viewing.
 java.lang.String GetCommunityName()
          Get the name of the community we are currently viewing.
 IPTQueryResult GetCommunityPages()
          Get the pages in the community.
 java.lang.String GetCommunityURL()
          Get invited or preview community URL
 java.lang.String GetCurCommName()
           
 java.lang.String GetDefaultCommunityURL()
          Get User's default community URL
 boolean GetDisplayPortletHeaderDueToError(int nPortletIndex)
          If there was an error, display the gadget header regardless of any other settings.
 int GetFirstPortletIndexInColumn(int nPortletColumn)
          Get the first gadget index in the given column.
 IMyPortalModelHelper GetHelper()
          Get the helper object for this model.
 java.lang.String GetIDStringForPortlet(int nPortletIndex)
          Get the gadget ID string from the given index.
 boolean GetIsCommunityPage()
          Get whether the current page is a community page.
 int GetLastPortletIndexInColumn(int nPortletColumn)
          Get the last gadget index in the given column.
 java.lang.String GetName()
          Return the name of the MVC object.
 java.lang.Object GetNewTempData()
          This method returns a new temporary data object.
 ASURL GetPageASURL()
          Get the ASURL for the page we are on.
 int GetPageID()
          Get the page ID of the page we are currently viewing.
 java.lang.String GetPageName()
          Get the name of the page we are currently viewing.
 int GetPageType()
          Get the page type of the page we are currently viewing.
 AActivitySpace GetParentSpace()
           
 java.lang.String GetPortletAdminPrefsURL(int nPortletIndex)
          Get the gadget Admin Preference URL at the given index.
 boolean GetPortletCollapsed(int nPortletIndex)
          Get the whether the gadget at the given index is collapsed.
 java.lang.String GetPortletCollapseExpandURL(int nPortletIndex, java.lang.String strControl)
          Get the gadget Collapse/Expand URL at the given index.
 int GetPortletColumnFromIndex(int nPortletIndex)
          Get the gadget column from the given index.
 java.lang.String GetPortletCommunityPrefsURL(int nPortletIndex)
          Get the gadget Community Preference URL at the given index.
 int GetPortletCount()
          Get the number of gadgets on the page we are currently viewing.
 java.lang.String GetPortletDisabledMessage(int nPortletIndex)
          Get the gadget's disabled message from the given index.
 boolean GetPortletEnabled(int nPortletIndex)
          Get the whether the gadget at the given index is enabled.
 boolean GetPortletHasAdminPrefsURL(int nPortletIndex)
          Get whether the gadget at the given index has a Admin Preference URL.
 boolean GetPortletHasCollapseExpandURL(int nPortletIndex)
          Get whether the gadget at the given index has a Collapse/Expand URL.
 boolean GetPortletHasCommunityPrefsURL(int nPortletIndex)
          Get whether the gadget at the given index has a Community Preference URL.
 boolean GetPortletHasHelpURL(int nPortletIndex)
          Get whether the gadget at the given index has a help URL.
 boolean GetPortletHasRefreshButton(int nPortletIndex)
          Returns whether the portlet at a given index has a Refresh button.
 boolean GetPortletHasTitleBar(int nPortletIndex)
          Get whether a gadget has a title bar or not.
 boolean GetPortletHasUserPrefsURL(int nPortletIndex)
          Get whether the gadget at the given index has a User Preference URL.
 java.lang.String GetPortletHelpURL(int nPortletIndex)
          Get the gadget help URL at the given index.
 java.lang.Object[][] GetPortletHTMLTextFromIndex(int nPortletIndex)
          Get the gadget content from the given index.
 int GetPortletIDFromIndex(int nPortletIndex)
          Get the gadget ID from the given index.
 boolean GetPortletIsMandatory(int nPortletIndex)
          Get the whether the gadget at the given index is mandatory.
 int GetPortletLayoutId()
           
 java.lang.String GetPortletNameFromIndex(int nPortletColumn)
          Get the gadget name from the given index.
 java.lang.String GetPortletPrefButtonBoolean()
          Get the PortletPrefButton boolean from the varpack.
 IXPList GetPortletPreferenceActionsData(int nPortletIndex)
          Obtain the Preference Button from the portlet header given the portlet index.
 java.lang.String GetPortletRemoveURL(int nPortletIndex)
          Get the gadget Remove URL at the given index.
 int[] GetPortletsInBundle(int _nPortletBundleID, boolean _bIsMyPage)
          This helper method gets the portlets in a bundle.
 boolean GetPortletSupports508(int nPortletIndex)
          Method GetPortletSupports508.
 int GetPortletSupportsPersonalization(int nPortletIndex)
          Method GetPortletSupportsPersonalization.
 java.lang.String GetPortletUserPrefsURL(int nPortletIndex)
          Get the gadget User Preference URL at the given index.
 java.lang.String GetPortletUUID(int nPortletIndex)
          Get the UUID of the portlet.
 int GetProfileID()
          Get the profile ID of the user being viewed on the user profile community.
 XPArrayList GetRecentlyAddedPortlets()
          Returns the id of the portlet that was recently added to the page
 int GetRecentlyCollapsedExpandedPortlet()
          Returns the id of the portlet that was recently collapsed from the page
 int GetRecentlyRemovedPortlet()
          Returns the id of the portlet that was recently removed from the page
 Redirect GetRedirectAfterFinish()
          Returns the Redirect object (this is were we need to go at the end of the Editor).
 IPTSession GetSession()
          Get the current IPTSession.
 void Init(AActivitySpace parent)
          This method initializes the model.
 void InitializePortletContent()
           
static boolean IsGuestSession(AActivitySpace asOwner)
          Static utility function for determining if we are using is a guest session Note that it returns false if editing the guest user via edit default profile
 boolean IsPageAvailable()
           
 boolean IsPreviewPage()
           
 boolean JoinCommunity()
          Joins the current community If the join failed, set the m_bCommJoinFailed flag.
 boolean QueryRecentlyAddedPortletContent()
          Queries the portlet content of the recently added portlets, if there are any.
 boolean QueryRecentlyCollapsedExpandedPortletContent()
          Queries the portlet content of the recently collapsed portlets, if there are any.
protected  boolean QuerySpcificPortletContent(IXPList xpPortletIds)
           
 void ReassignPortlets(int[] arrPortletIDs, int nColumn, int nPageID)
          Reassigns the specified column (region) in the page with the given portlet array.
 void RemoveSinglePortlet(int nPageID, int nPortletID)
          Removes single portlet from the page.
 void ResetRecentlyAddedPortlets()
          Resets the list of recently added portlets.
 void ResetRecentlyCollapsedExpandedPortlet()
          Resets the variable to 0
 void ResetRecentlyRemovedPortlet()
          Resets the variable to 0
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
 boolean SetCommunity(int nCommunityID, int nPageID)
          Sets the community to be viewed and calls SetPage
 void SetDisplayPortletHeaderDueToError(int nPortletIndex, boolean bDisplayHeader)
          If there was an error, display the gadget header regardless of any other settings.
 void SetHostPageURI(java.lang.String strHostPageURI)
          Sets the host page URI that is later used to initialize the AppDataObject
 void SetIsPreviewPage(boolean bIsPreviewPage)
          Sets the page to be a preview page or not.
 void SetMyPortalModelHelper(IMyPortalModelHelper myPortalModelHelper)
          Sets the MyPortalModelHelper that will be used.
 boolean SetPage(int nPageID)
          Sets up the page of the given ID.
 boolean SetProfileID(int nProfileID)
          Method SetProfileID.
 void SetRawHeaders(java.lang.String strRawHeaders)
          Sets the raw headers from the request.
 void SetShowJoinCommConfirmPage(boolean show)
           
 void SetShowUnsubscribeCommConfirmPage(boolean show)
           
 void SetupIntrinsicPortlet(java.lang.String _strPortletClass, java.lang.String _strStorageName, int _nPortletIndex)
          Register model, view, and control for intrinsic portlet.
 boolean ShowJoinConfirmPage()
          Show the join community confirmation page or the regular community page.
 boolean ShowUnsubscribeConfirmPage()
          Show the unsubscribe community confirmation page or the regular community page.
 boolean UnsubscribeCommunity()
          Unsubscribes/quits the current community If the unsubscribe failed, set the m_bCommUnsubscribeFailed flag.
 boolean UsesPortletLayout()
          If the current page has an adaptive Portlet Layout set.
 
Methods inherited from class com.plumtree.uiinfrastructure.activityspace.AClearModel
CleanupAllData, 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.IModel
CleanupAllData
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
Class Name

See Also:
Constant Field Values

PROFILEDATA_SESSIONVAR_NAME

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

N_CONTENTCANVAS_COLUMN

public static final int N_CONTENTCANVAS_COLUMN
Content Canvas Column

See Also:
Constant Field Values

m_nCommunityID

public int m_nCommunityID
Community ID


m_nPageID

public int m_nPageID
Page ID


m_strPageName

public java.lang.String m_strPageName
Page Name


m_bIsProfilePage

public boolean m_bIsProfilePage
mj: true if this is a user profile community page


m_bIsPreviewPage

public boolean m_bIsPreviewPage
Is Preview Page


m_strRawHeaders

public java.lang.String m_strRawHeaders
Raw Headers


PORTLET_PREF_TYPE

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

PERSONAL_PREF_TYPE

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

COMMUNITY_PREF_TYPE

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

ADMIN_PREF_TYPE

public static final java.lang.String ADMIN_PREF_TYPE
See Also:
Constant Field Values
Constructor Detail

MyPortalModel

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

CollapsePortlet

public void CollapsePortlet(int nCommunityID,
                            int nPageID,
                            int nPortletToCollapse)
Collapses the gadget at the given index.

Specified by:
CollapsePortlet in interface IMyPortalModel
Parameters:
nPortletIndex - nPortletID

GetRecentlyCollapsedExpandedPortlet

public int GetRecentlyCollapsedExpandedPortlet()
Description copied from interface: IMyPortalModelRO
Returns the id of the portlet that was recently collapsed from the page

Specified by:
GetRecentlyCollapsedExpandedPortlet in interface IMyPortalModelRO
Returns:
id of portlet
See Also:
IMyPortalModelRO.GetRecentlyCollapsedExpandedPortlet()

ResetRecentlyCollapsedExpandedPortlet

public void ResetRecentlyCollapsedExpandedPortlet()
Description copied from interface: IMyPortalModel
Resets the variable to 0

Specified by:
ResetRecentlyCollapsedExpandedPortlet in interface IMyPortalModel
See Also:
com.plumtree.portalpages.browsing.myportal.IMyPortalModelRO#ResetRecentlyCollapsedExpandedPortlet()

ExpandPortlet

public void ExpandPortlet(int nCommunityID,
                          int nPageID,
                          int nPortletToExpand)
Expands the gadget at the given index.

Specified by:
ExpandPortlet in interface IMyPortalModel
Parameters:
nPortletIndex - nPortletID

AddSinglePortlet

public void AddSinglePortlet(int nPageID,
                             int nPortletID)
Adds the specified portlet.

Specified by:
AddSinglePortlet in interface IMyPortalModel
Parameters:
nPageID - nPageID
nPortletID - nPortletID

AddPortletBundle

public void AddPortletBundle(int nPageID,
                             int nPortletBundleID)
Adds the portlet bundle.

Specified by:
AddPortletBundle in interface IMyPortalModel
Parameters:
nPageID - nPageID
nPortletBundleID - nPortletID

GetPortletsInBundle

public int[] GetPortletsInBundle(int _nPortletBundleID,
                                 boolean _bIsMyPage)
This helper method gets the portlets in a bundle. This method is only public so it can be unit-tested. It should not be used outside of the MyPortalModel class.

Parameters:
_nPortletBundleID - The ID of the bundle to open.
_bIsMyPage - whether or not the containing page is a mypage.
Returns:
the portlets in the bundle.

ReassignPortlets

public void ReassignPortlets(int[] arrPortletIDs,
                             int nColumn,
                             int nPageID)
Reassigns the specified column (region) in the page with the given portlet array.

Specified by:
ReassignPortlets in interface IMyPortalModel
Parameters:
arrPortletIDs - array of portlet IDs
nColumn - nColumn
nPageID - nPageID

GetRecentlyAddedPortlets

public XPArrayList GetRecentlyAddedPortlets()
Description copied from interface: IMyPortalModelRO
Returns the id of the portlet that was recently added to the page

Specified by:
GetRecentlyAddedPortlets in interface IMyPortalModelRO
Returns:
a list of the portlets that were recently added to the page.
See Also:
com.plumtree.portalpages.browsing.myportal.IMyPortalModelRO#GetRecentlyAddedPortlet()

ResetRecentlyAddedPortlets

public void ResetRecentlyAddedPortlets()
Description copied from interface: IMyPortalModel
Resets the list of recently added portlets.

Specified by:
ResetRecentlyAddedPortlets in interface IMyPortalModel
See Also:
com.plumtree.portalpages.browsing.myportal.IMyPortalModelRO#ResetRecentlyAddedPortlet()

QueryRecentlyAddedPortletContent

public boolean QueryRecentlyAddedPortletContent()
Description copied from interface: IMyPortalModel
Queries the portlet content of the recently added portlets, if there are any. Does nothing if there are no recently added portlets (including not resetting the content data), so be sure to check that there are recently added portlets before calling this.

Specified by:
QueryRecentlyAddedPortletContent in interface IMyPortalModel
See Also:
IMyPortalModel.QueryRecentlyAddedPortletContent()

QueryRecentlyCollapsedExpandedPortletContent

public boolean QueryRecentlyCollapsedExpandedPortletContent()
Description copied from interface: IMyPortalModel
Queries the portlet content of the recently collapsed portlets, if there are any. Does nothing if there are no recently collapsed portlets (including not resetting the content data), so be sure to check that there are recently collapsed portlets before calling this.

Specified by:
QueryRecentlyCollapsedExpandedPortletContent in interface IMyPortalModel
See Also:
IMyPortalModel.QueryRecentlyCollapsedExpandedPortletContent()

QuerySpcificPortletContent

protected boolean QuerySpcificPortletContent(IXPList xpPortletIds)

Create

public java.lang.Object Create()
Description copied from class: AClearModel
This method is used by the ASManager to return new instances of managed objects.

Specified by:
Create in interface IManagedObject
Specified by:
Create in class AClearModel
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()

DeletePage

public void DeletePage(int nPageID)
Method DeletePage. Deletes page with given id.

Parameters:
nPageID -

Finish

public void Finish()
Description copied from interface: IRepostModel
Implement some code to execute when the user clicks on "Finish".

Specified by:
Finish in interface IRepostModel

GetParentSpace

public AActivitySpace GetParentSpace()

GetPortletPrefButtonBoolean

public java.lang.String GetPortletPrefButtonBoolean()
Description copied from interface: IMyPortalModelRO
Get the PortletPrefButton boolean from the varpack.

Specified by:
GetPortletPrefButtonBoolean in interface IMyPortalModelRO
Returns:
string

GetCommunityID

public int GetCommunityID()
Description copied from interface: IMyPortalModelRO
Get the community ID of the community we are currently viewing.

Specified by:
GetCommunityID in interface IJoinPreviewCommunityModel
Specified by:
GetCommunityID in interface IUnsubscribeCommunityModel
Specified by:
GetCommunityID in interface IMyPortalModelRO
Returns:
int nCommunityID
See Also:
IMyPortalModelRO.GetCommunityID()

GetCommunityName

public java.lang.String GetCommunityName()
Description copied from interface: IMyPortalModelRO
Get the name of the community we are currently viewing.

Specified by:
GetCommunityName in interface IJoinPreviewCommunityModel
Specified by:
GetCommunityName in interface IUnsubscribeCommunityModel
Specified by:
GetCommunityName in interface IMyPortalModelRO
Returns:
string
See Also:
IMyPortalModelRO.GetCommunityName()

GetCommunityPages

public IPTQueryResult GetCommunityPages()
Description copied from interface: IMyPortalModelRO
Get the pages in the community.

Specified by:
GetCommunityPages in interface IMyPortalModelRO
Returns:
IPTQueryResult ptqrCommunityPages
See Also:
com.plumtree.portalpages.browsing.myportal.IMyPortalModelRO#GetLastPortletIndexInColumn()

GetCurCommName

public java.lang.String GetCurCommName()
Returns:

GetFirstPortletIndexInColumn

public int GetFirstPortletIndexInColumn(int nPortletColumn)
Description copied from interface: IMyPortalModelRO
Get the first gadget index in the given column.

Specified by:
GetFirstPortletIndexInColumn in interface IMyPortalModelRO
Parameters:
nPortletColumn - nPortletColumn
Returns:
int nPortletIndex
See Also:
IMyPortalModelRO.GetFirstPortletIndexInColumn(int)

GetPortletCollapsed

public boolean GetPortletCollapsed(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get the whether the gadget at the given index is collapsed.

Specified by:
GetPortletCollapsed in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
boolean bPortletCollapsed
See Also:
IMyPortalModelRO.GetPortletCollapsed(int)

RemoveSinglePortlet

public void RemoveSinglePortlet(int nPageID,
                                int nPortletID)
Description copied from interface: IMyPortalModel
Removes single portlet from the page. First opens the page and locks it Remove the portlet, stores and unlocks the page.

Specified by:
RemoveSinglePortlet in interface IMyPortalModel
See Also:
com.plumtree.portalpages.browsing.myportal.IMyPortalModelRO#RemoveSinglePortlet(int,int)

GetRecentlyRemovedPortlet

public int GetRecentlyRemovedPortlet()
Description copied from interface: IMyPortalModelRO
Returns the id of the portlet that was recently removed from the page

Specified by:
GetRecentlyRemovedPortlet in interface IMyPortalModelRO
Returns:
id of portlet
See Also:
IMyPortalModelRO.GetRecentlyRemovedPortlet()

ResetRecentlyRemovedPortlet

public void ResetRecentlyRemovedPortlet()
Description copied from interface: IMyPortalModel
Resets the variable to 0

Specified by:
ResetRecentlyRemovedPortlet in interface IMyPortalModel
See Also:
com.plumtree.portalpages.browsing.myportal.IMyPortalModelRO#ResetRecentlyRemovedPortlet()

GetPortletColumnFromIndex

public int GetPortletColumnFromIndex(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get the gadget column from the given index.

Specified by:
GetPortletColumnFromIndex in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
int nPortletColumn
See Also:
IMyPortalModelRO.GetPortletColumnFromIndex(int)

GetPortletCount

public int GetPortletCount()
Description copied from interface: IMyPortalModelRO
Get the number of gadgets on the page we are currently viewing.

Specified by:
GetPortletCount in interface IMyPortalModelRO
Returns:
int nPortletCount
See Also:
IMyPortalModelRO.GetPortletCount()

GetPortletDisabledMessage

public java.lang.String GetPortletDisabledMessage(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get the gadget's disabled message from the given index.

Specified by:
GetPortletDisabledMessage in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
String strPortletDisabledMessage
See Also:
IMyPortalModelRO.GetPortletDisabledMessage(int)

GetPortletEnabled

public boolean GetPortletEnabled(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get the whether the gadget at the given index is enabled.

Specified by:
GetPortletEnabled in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
boolean bPortletEnabled
See Also:
IMyPortalModelRO.GetPortletEnabled(int)

GetPortletHTMLTextFromIndex

public java.lang.Object[][] GetPortletHTMLTextFromIndex(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get the gadget content from the given index.

Specified by:
GetPortletHTMLTextFromIndex in interface IMyPortalModelRO
Returns:
String strPortletHTMLText
See Also:
IMyPortalModelRO.GetPortletHTMLTextFromIndex(int)

GetPortletHasHelpURL

public boolean GetPortletHasHelpURL(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get whether the gadget at the given index has a help URL.

Specified by:
GetPortletHasHelpURL in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
boolean bPortletHasHelpURL
See Also:
myportal.IMyPortalModelRO#GetPortletHasHelpURL(int)

GetPortletHasRefreshButton

public boolean GetPortletHasRefreshButton(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Returns whether the portlet at a given index has a Refresh button.

Specified by:
GetPortletHasRefreshButton in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
boolean bPortletHasRefreshButton
See Also:
myportal.IMyPortalModelRO#GetPortletHasRefreshButton(int)

GetPortletHasAdminPrefsURL

public boolean GetPortletHasAdminPrefsURL(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get whether the gadget at the given index has a Admin Preference URL.

Specified by:
GetPortletHasAdminPrefsURL in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
boolean bPortletHasAdminPrefsURL
See Also:
myportal.IMyPortalModelRO#GetPortletHasAdminPrefsURL(int)

GetPortletHasCommunityPrefsURL

public boolean GetPortletHasCommunityPrefsURL(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get whether the gadget at the given index has a Community Preference URL.

Specified by:
GetPortletHasCommunityPrefsURL in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
boolean bPortletHasCommunityPrefsURL
See Also:
myportal.IMyPortalModelRO#GetPortletHasCommunityPrefsURL(int)

GetPortletHasUserPrefsURL

public boolean GetPortletHasUserPrefsURL(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get whether the gadget at the given index has a User Preference URL.

Specified by:
GetPortletHasUserPrefsURL in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
boolean bPortletHasUserPrefsURL
See Also:
myportal.IMyPortalModelRO#GetPortletHasUserPrefsURL(int)

GetPortletHasCollapseExpandURL

public boolean GetPortletHasCollapseExpandURL(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get whether the gadget at the given index has a Collapse/Expand URL.

Specified by:
GetPortletHasCollapseExpandURL in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
boolean bPortletHasCollapseExpandURL
See Also:
myportal.IMyPortalModelRO#GetPortletHasCollapseExpandURL(int)

GetPortletHasTitleBar

public boolean GetPortletHasTitleBar(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get whether a gadget has a title bar or not.

Specified by:
GetPortletHasTitleBar in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
boolean bPortletHasTitleBar
See Also:
IMyPortalModelRO.GetPortletHasTitleBar(int)

GetDisplayPortletHeaderDueToError

public boolean GetDisplayPortletHeaderDueToError(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
If there was an error, display the gadget header regardless of any other settings.

Specified by:
GetDisplayPortletHeaderDueToError in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
boolean bDisplayHeader
See Also:
com.plumtree.portalpages.browsing.myportal.IMyPortalModelRO#SetDisplayPortletHeaderDueToError(int)

SetDisplayPortletHeaderDueToError

public void SetDisplayPortletHeaderDueToError(int nPortletIndex,
                                              boolean bDisplayHeader)
Description copied from interface: IMyPortalModelRO
If there was an error, display the gadget header regardless of any other settings.

Specified by:
SetDisplayPortletHeaderDueToError in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
See Also:
com.plumtree.portalpages.browsing.myportal.IMyPortalModelRO#SetDisplayPortletHeaderDueToError(int)

GetPortletHelpURL

public java.lang.String GetPortletHelpURL(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get the gadget help URL at the given index.

Specified by:
GetPortletHelpURL in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
String strPortletHelpURL
See Also:
IMyPortalModelRO.GetPortletHelpURL(int)

GetPortletAdminPrefsURL

public java.lang.String GetPortletAdminPrefsURL(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get the gadget Admin Preference URL at the given index.

Specified by:
GetPortletAdminPrefsURL in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
String strPortletAdminPrefsURL
See Also:
IMyPortalModelRO.GetPortletAdminPrefsURL(int)

GetPortletCommunityPrefsURL

public java.lang.String GetPortletCommunityPrefsURL(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get the gadget Community Preference URL at the given index.

Specified by:
GetPortletCommunityPrefsURL in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
String strPortletCommunityPrefsURL
See Also:
IMyPortalModelRO.GetPortletCommunityPrefsURL(int)

GetPortletUserPrefsURL

public java.lang.String GetPortletUserPrefsURL(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get the gadget User Preference URL at the given index.

Specified by:
GetPortletUserPrefsURL in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
String strPortletUserPrefsURL
See Also:
IMyPortalModelRO.GetPortletUserPrefsURL(int)

GetPortletCollapseExpandURL

public java.lang.String GetPortletCollapseExpandURL(int nPortletIndex,
                                                    java.lang.String strControl)
Description copied from interface: IMyPortalModelRO
Get the gadget Collapse/Expand URL at the given index.

Specified by:
GetPortletCollapseExpandURL in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
strControl - strControl
Returns:
String strPortletCollapseExpandURL
See Also:
com.plumtree.portalpages.browsing.myportal.IMyPortalModelRO#GetPortletCollapseExpandURL(int)

GetPortletRemoveURL

public java.lang.String GetPortletRemoveURL(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get the gadget Remove URL at the given index.

Specified by:
GetPortletRemoveURL in interface IMyPortalModelRO
Returns:
String strPortletRemoveURL
See Also:
IMyPortalModelRO.GetPortletRemoveURL(int)

GetPortletIDFromIndex

public int GetPortletIDFromIndex(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get the gadget ID from the given index.

Specified by:
GetPortletIDFromIndex in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
int nPortletID
See Also:
IMyPortalModelRO.GetPortletIDFromIndex(int)

GetPortletIsMandatory

public boolean GetPortletIsMandatory(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get the whether the gadget at the given index is mandatory.

Specified by:
GetPortletIsMandatory in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
boolean bPortletIsMandatory
See Also:
IMyPortalModelRO.GetPortletIsMandatory(int)

GetPortletNameFromIndex

public java.lang.String GetPortletNameFromIndex(int nPortletColumn)
Description copied from interface: IMyPortalModelRO
Get the gadget name from the given index.

Specified by:
GetPortletNameFromIndex in interface IMyPortalModelRO
Parameters:
nPortletColumn - nPortletIndex
Returns:
String strPortletName
See Also:
IMyPortalModelRO.GetPortletNameFromIndex(int)

GetIDStringForPortlet

public java.lang.String GetIDStringForPortlet(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get the gadget ID string from the given index.

Specified by:
GetIDStringForPortlet in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
String strPortletID
See Also:
IMyPortalModelRO.GetIDStringForPortlet(int)

GetPortletUUID

public java.lang.String GetPortletUUID(int nPortletIndex)
Description copied from interface: IMyPortalModelRO
Get the UUID of the portlet.

Specified by:
GetPortletUUID in interface IMyPortalModelRO
Parameters:
nPortletIndex - nPortletIndex
Returns:
String strUUID
See Also:
IMyPortalModelRO.GetPortletUUID(int)

GetPortletSupports508

public boolean GetPortletSupports508(int nPortletIndex)
Method GetPortletSupports508.

Specified by:
GetPortletSupports508 in interface IMyPortalModelRO
Parameters:
nPortletIndex -
Returns:
boolean

GetPortletSupportsPersonalization

public int GetPortletSupportsPersonalization(int nPortletIndex)
Method GetPortletSupportsPersonalization. Compare the returned bitmask to the PT_GADGETPERSONALIZATION_ROLES constants.

Specified by:
GetPortletSupportsPersonalization in interface IMyPortalModelRO
Parameters:
nPortletIndex -
Returns:
A bitmask of the types of personalization that this portlet supports.

GetCollapsedOrErrorContent

public java.lang.Object[][] GetCollapsedOrErrorContent(int nPortletIndex)
Method GetPortletCollapsedOrErrorContent. Returns markup which should be displayed in case of an error or collapsed portlet.

Specified by:
GetCollapsedOrErrorContent in interface IMyPortalModelRO
Parameters:
nPortletIndex -
Returns:
object markup array

GetHelper

public IMyPortalModelHelper GetHelper()
Description copied from interface: IMyPortalModelRO
Get the helper object for this model.

Specified by:
GetHelper in interface IMyPortalModelRO
Returns:

GetIsCommunityPage

public boolean GetIsCommunityPage()
Description copied from interface: IMyPortalModelRO
Get whether the current page is a community page.

Specified by:
GetIsCommunityPage in interface IMyPortalModelRO
Returns:
boolean bIsCommunityPage
See Also:
IMyPortalModelRO.GetIsCommunityPage()

GetLastPortletIndexInColumn

public int GetLastPortletIndexInColumn(int nPortletColumn)
Description copied from interface: IMyPortalModelRO
Get the last gadget index in the given column.

Specified by:
GetLastPortletIndexInColumn in interface IMyPortalModelRO
Parameters:
nPortletColumn - nPortletColumn
Returns:
int nPortletIndex
See Also:
IMyPortalModelRO.GetLastPortletIndexInColumn(int)

GetName

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

GetNewTempData

public 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.

Specified by:
GetNewTempData in class AClearModel
Returns:
Object the new temporary data object

GetPageASURL

public ASURL GetPageASURL()
Description copied from interface: IMyPortalModelRO
Get the ASURL for the page we are on.

Specified by:
GetPageASURL in interface IMyPortalModelRO
Returns:
ASURL asurlPage
See Also:
IMyPortalModelRO.GetPageASURL()

GetPageID

public int GetPageID()
Description copied from interface: IMyPortalModelRO
Get the page ID of the page we are currently viewing.

Specified by:
GetPageID in interface IMyPortalModelRO
Returns:
int nPageID
See Also:
IMyPortalModelRO.GetPageID()

GetPageName

public java.lang.String GetPageName()
Description copied from interface: IMyPortalModelRO
Get the name of the page we are currently viewing.

Specified by:
GetPageName in interface IMyPortalModelRO
Returns:
string
See Also:
IMyPortalModelRO.GetPageName()

GetPageType

public int GetPageType()
Description copied from interface: IMyPortalModelRO
Get the page type of the page we are currently viewing.

Specified by:
GetPageType in interface IMyPortalModelRO
Returns:
int nPageType
See Also:
IMyPortalModelRO.GetPageType()

GetPortletLayoutId

public int GetPortletLayoutId()
Specified by:
GetPortletLayoutId in interface IMyPortalModelRO
Returns:
The Portlet Layout Webservice Id, or 0 if none is set on this page.
See Also:
IMyPortalModelRO.GetPortletLayoutId()

UsesPortletLayout

public boolean UsesPortletLayout()
Description copied from interface: IMyPortalModelRO
If the current page has an adaptive Portlet Layout set.

Specified by:
UsesPortletLayout in interface IMyPortalModelRO
Returns:
See Also:
IMyPortalModelRO.UsesPortletLayout()

GetRedirectAfterFinish

public Redirect GetRedirectAfterFinish()
Returns the Redirect object (this is were we need to go at the end of the Editor).

Specified by:
GetRedirectAfterFinish in interface IRepostModel
Returns:
Redirect

GetSession

public IPTSession GetSession()
Description copied from interface: IMyPortalModelRO
Get the current IPTSession. This method should only be used by MyPortalModel.

Specified by:
GetSession in interface IMyPortalModelRO
Returns:
int nPageID
See Also:
IMyPortalModelRO.GetSession()

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
Overrides:
Init in class AClearModel
Parameters:
parent - the parent Activity Space
See Also:
com.plumtree.xpshared.activityspace.IModel#Init()

SavePage

public int SavePage(java.lang.String _sPageName,
                    XPHashtable _htFormData)
Calls the right save function according to the page name passed in argument.

Specified by:
SavePage in interface IRepostModel
Parameters:
_sPageName -
_htFormData -
Returns:

SetCommunity

public boolean SetCommunity(int nCommunityID,
                            int nPageID)
Sets the community to be viewed and calls SetPage

Specified by:
SetCommunity in interface IMyPortalModel
Parameters:
nCommunityID - nCommunityID
nPageID - nPageID
Returns:
true if successful, else false

SetHostPageURI

public void SetHostPageURI(java.lang.String strHostPageURI)
Sets the host page URI that is later used to initialize the AppDataObject

Parameters:
strHostPageURI - strHostPageURI

SetMyPortalModelHelper

public void SetMyPortalModelHelper(IMyPortalModelHelper myPortalModelHelper)
Sets the MyPortalModelHelper that will be used. Init must be called before this (Init is called by RegisterModel).

Parameters:
myPortalModelHelper - myPortalModelHelper

SetPage

public boolean SetPage(int nPageID)
Sets up the page of the given ID.

Specified by:
SetPage in interface IMyPortalModel
Parameters:
nPageID - nPageID
Returns:
true if successful, else false; false requires login redirect

SetProfileID

public boolean SetProfileID(int nProfileID)
Method SetProfileID. Returns false if the current user doesn't have access to the given profile.

Specified by:
SetProfileID in interface IMyPortalModel
Parameters:
nProfileID -
Returns:
true if successful, else false

GetProfileID

public int GetProfileID()
Description copied from interface: IMyPortalModelRO
Get the profile ID of the user being viewed on the user profile community.

Specified by:
GetProfileID in interface IMyPortalModelRO
Returns:
the user ID of the profile being viewed, 0 if not used.

SetRawHeaders

public void SetRawHeaders(java.lang.String strRawHeaders)
Description copied from interface: IMyPortalModel
Sets the raw headers from the request.

Specified by:
SetRawHeaders in interface IMyPortalModel
Parameters:
strRawHeaders -

SetupIntrinsicPortlet

public void SetupIntrinsicPortlet(java.lang.String _strPortletClass,
                                  java.lang.String _strStorageName,
                                  int _nPortletIndex)
Register model, view, and control for intrinsic portlet. Initialize portlet with the portletID, the IPTMyPortal object, and the AppDataState object.

Specified by:
SetupIntrinsicPortlet in interface IMyPortalModel
Parameters:
_strPortletClass - Class identifier for portlet
_strStorageName - Storage name for portlet
_nPortletIndex - Portlet index
Throws:
XPException - Exception thrown if model, view, or control is not registered successfully.

IsPreviewPage

public boolean IsPreviewPage()

SetIsPreviewPage

public void SetIsPreviewPage(boolean bIsPreviewPage)
Description copied from interface: IMyPortalModel
Sets the page to be a preview page or not.

Specified by:
SetIsPreviewPage in interface IMyPortalModel
Parameters:
bIsPreviewPage - bIsPreviewPage

IsGuestSession

public static boolean IsGuestSession(AActivitySpace asOwner)
Static utility function for determining if we are using is a guest session Note that it returns false if editing the guest user via edit default profile


CommunityJoinFailed

public boolean CommunityJoinFailed()
Is Error Page

Specified by:
CommunityJoinFailed in interface IJoinPreviewCommunityModel
Returns:
boolean

JoinCommunity

public boolean JoinCommunity()
Joins the current community If the join failed, set the m_bCommJoinFailed flag.

Returns:
boolean False if user is already a member, true if succesful

GetCommunityURL

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

Specified by:
GetCommunityURL in interface IJoinPreviewCommunityModel
Specified by:
GetCommunityURL in interface IUnsubscribeCommunityModel
Returns:
String

GetDefaultCommunityURL

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

Specified by:
GetDefaultCommunityURL in interface IJoinPreviewCommunityModel
Specified by:
GetDefaultCommunityURL in interface IUnsubscribeCommunityModel
Returns:
String

SetShowJoinCommConfirmPage

public void SetShowJoinCommConfirmPage(boolean show)
Parameters:
show -

ShowJoinConfirmPage

public boolean ShowJoinConfirmPage()
Show the join community confirmation page or the regular community page. Only valid on a community page.

Returns:
boolean

IsPageAvailable

public boolean IsPageAvailable()

InitializePortletContent

public void InitializePortletContent()

CommunityUnsubscribeFailed

public boolean CommunityUnsubscribeFailed()
Is Error Page

Specified by:
CommunityUnsubscribeFailed in interface IUnsubscribeCommunityModel
Returns:
boolean

UnsubscribeCommunity

public boolean UnsubscribeCommunity()
Unsubscribes/quits the current community If the unsubscribe failed, set the m_bCommUnsubscribeFailed flag.

Returns:
boolean False if user is already not a member, true if successful

SetShowUnsubscribeCommConfirmPage

public void SetShowUnsubscribeCommConfirmPage(boolean show)
Parameters:
show -

ShowUnsubscribeConfirmPage

public boolean ShowUnsubscribeConfirmPage()
Show the unsubscribe community confirmation page or the regular community page. Only valid on a community page.

Returns:
boolean

GetPortletPreferenceActionsData

public IXPList GetPortletPreferenceActionsData(int nPortletIndex)
Obtain the Preference Button from the portlet header given the portlet index.

Specified by:
GetPortletPreferenceActionsData in interface IMyPortalModelRO
Parameters:
nPortletIndex -
Returns:
list of FullURLs



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