com.plumtree.portalpages.common.uiparts
Class NavigationModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.activityspace.AClearModel
      extended by com.plumtree.portalpages.common.uiparts.NavigationModel
All Implemented Interfaces:
IPluggableNavModelRO, INavigationModelRO, IManagedObject, IModel, IModelRO, IMVCObject

public class NavigationModel
extends AClearModel
implements INavigationModelRO

Core model for all navigation. All public function calling into Server API should internally catch all exceptions.

Author:
RobZ, DavidP

Field Summary
static int FOLDERID_UNCHANGED
          Directory constants
static int LOGIN_TOKEN_LIFE_SPAN
          How long the login token passed with the admin link should be valid for, don't want too long since it compromises security but too short could invalidate it before the user clicks on the link, measured in minutes.
protected static java.lang.String NAV_SECTIONVISARRAY_PREFSNAME
          Personal preference name of the vertical navigation section visibility setting
static int NO_CURRENT_COMMID
          Uninitialized Community ID value
static int NO_CURRENT_PAGEID
          Uninitialized Mypage ID value.
static int PROPIDTYPE_INT
          Add more when neccessary
static int PROPIDTYPE_STRING
           
protected static java.lang.String SECTION_VISIBILITY_SESSION_ATTRIBUTE
          Session attribute name of the array holding section visibility flag
static java.lang.String STR_MVC_CLASS_NAME
          Navigation model class identifier for activty space registration
 
Constructor Summary
NavigationModel()
           
 
Method Summary
 int CalculateCurCommunityID()
          Find the current Community ID
 boolean CanJoinCurCommunity()
          Checks if the current user can join the current Community
 ICPListEntryIterator ConvertCommunityPagePTURLListToICPIterator(XPArrayList urlList, boolean bDontUseCurrent)
          Helper to convert an XPArrayList with IPTURLs to Community or Communitypages to an ICPListEntryIterator
 ICPListEntryIterator ConvertMyPagePTURLListToICPIterator(XPArrayList urlList)
          Helper to convert an XPArrayList with IPTURLs to MyPages to an ICPListEntryIterator
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 int GetAccessibleCommunityID(int nSubPortalCommID)
          Checks for at least read access to the specified Community, If current user lacks access, get the user's default Community and user has no default communities, return -1.
 ICPListEntryIterator GetAdminLink()
          Form the admin link for navigation
 ICPListEntryIterator GetCategoryLinks(NavCategoryType linkType, boolean getActions)
          Get the links lists by category, with or without actions.
 java.lang.String GetCategoryTitle(NavCategoryType linkType)
          Get the name of the category link type.
 ICPListEntryIterator GetCommunityActions()
          Never check IsCommunityPage before calling this function.
 ICPListEntryIterator GetCurCommPages()
          Gets all the current community pages if on community page
 int GetCurCommunityID()
          Gets the ID of the current Community (if in one)
 java.lang.String GetCurCommunityName()
          Gets the name of the current Community (if in one) from the MyPortalModel.
 int GetCurDocDirFolderID()
          Gets the id of the current document directory folder, or 0 if we are not currently in a single doc directory folder.
 ICPListEntryIterator GetCurMandatoryTabs(boolean bAddAdminLink)
          Get the Mandatory Tabs for the current user
 ICPListEntryIterator GetCurMyPages(boolean bShowActions)
          Gets all the current my pages if on the my page
 IPTQueryResult GetCurMyPagesResult()
           
 NavPageType GetCurNavPageType()
          Gets the current page type.
 int GetCurPageID()
          gets the current mypage id
 java.lang.String GetCurPageName()
          NOTE: Returned string not HTML/URLEncoded.
 ICPListEntryIterator GetCurRelCommunities()
          Get the current related communtiies links
 ICPListEntryIterator GetCurSubCommunities()
          Get current subcommunities links
 int GetDefaultCommunity()
          Gets a user's defeault community id, (right now the first community in mycommunities)
 int GetDefaultCommunityPassSubportal(IPTSubPortalInfo ptSubPortalInfo)
          Get the default Community ID - the ID set in PTConfig.xml or if that is zero, then the ID of the first community in a user's membership list.
 ASURL GetDefaultSubportalURL()
          Gets the URL to the default subportal of the current user
 ICPListEntryIterator GetDirectoryLinks()
          Get list of directory links
 HTMLElementCollection GetFooterElement()
          Get footer element
 boolean GetFooterHasBeenSet()
          Checks if a footer has been set for the current page
 java.lang.String GetGreeting()
          Get "welcome" greeting string
 HTMLElementCollection GetHeaderElement()
          Get header element
 boolean GetHeaderHasBeenSet()
          Checks if a header has been set for the current page
 HTMLElement GetIntrinsicPortletContentWithErrorHandling(int nPortletIndex, int nPortletID, java.lang.Object[][] objArrMarkup, IPTGadget ptGadget, IPTState objAppdataState, java.lang.String gadgetName)
          Gets the content for an intrinsic portlet, or generates properly beautified error results Used only for headers and footers, and *only* used in NavigationModel and MyPortalModel - not for standard usage, although it will work well enough for those cases.
 ICPListEntryIterator GetMandatoryLinks()
          Get the list fo mandatory links
 java.lang.String GetMandatoryLinksFolderName()
          Gets the name for the mandatory links folder for the current user
 ICPListEntryIterator GetMyCommunities(boolean bListActions)
          Helper function, returns the join community link, community actions if on a community page and the list of communities.
 ICPListEntryIterator GetMyHome()
          Returns the My Home link for the current user (the page the user first sees after logging in.
 ICPListEntryIterator GetMyPageActions()
          Get actions list for th eMyPages links.
 IModel GetMyPortalModel()
          Used by pluggable navigation to access the MyPages model
 java.lang.String GetName()
          Return the name of the MVC object.
 java.lang.Object GetNewTempData()
          This method returns a new temporary data object.
 NavigationPage GetPageSpecificMethods()
          Used by pluggable navigation to access the model specific to the page we're on (see GetCurNavPage())
 ICPListEntryIterator GetParentComm()
          NAVIGATION LINK GENERATION ***************************************************** /**
 ICPListEntryIterator GetPortalSettings()
          Gets the link to the My Account settings page
 int GetRegisteredViewNavScheme()
          Gets the currently registered view's Nav Scheme
 boolean GetSectionVisibility(int nSectionIDConst)
          Gets visibility of the specified vertical navigation section
 HTMLElement GetSubportalBanner()
          Gets the header for this page from the Subportal.
 boolean GetSubPortalEnabled(int nType)
          Checks if the specified feature is enabled in the current subportal.
 boolean GetSubPortalEnabledPassSubportal(int nType, IPTSubPortalInfo subPortal)
          Checks if the specified access type is enabled on the current user's subportal.
 int GetSubPortalFirstPageType()
          Gets the page type of the current user's default my home page-type.
 HTMLElement GetSubportalFooter()
          Gets the footer for this page from the Subportal.
 int GetSubPortalNavScheme()
          Gets the navigation scheme set for the current user
 int GetSubPortalPageID()
          Gets the Page ID of the first page a user should see after logging in.
 java.lang.String GetSubsectionTitle(NavCategoryType linkType, boolean bAction)
          Get the name of the subsection title; basically, actions for mypage and communities only.
 java.lang.String GetSubtitleForBanner()
          Gets the subtitle of the current page
 java.lang.String GetTitleForBanner()
          Gets the title of the current page
 boolean HasAdministratorAccess()
          Checks if the user has admin access rights or not.
 boolean HasAdminLinkAccess()
          Checks to see if we should display the admin link or not
 boolean HasSelectAccess()
          Checks if the current user has at least select access to the current Community
 void Init(AActivitySpace parent)
          This method initializes the model.
 void InitializePortletContent()
          Sets up all the portlet content for this page.
 boolean IsCommunityPage()
          Checks if the current page is a Community Page
 boolean IsCurCommOwner()
          Checks if the current user is the owner of the current Community
 boolean IsDefaultProfile()
           
 boolean IsDirPage()
          Checks if the current page is a directory page
 boolean IsEditProfile()
          Checks if the current page is a Edit Default Profile Editor page
 boolean IsGuestSession()
          Checks if logged in as guest or not.
 boolean IsLoginPage()
          Checks if the current page is the login page
 boolean IsMemberInCurCommunity()
          Checks if the current user is a member of the current Community
 boolean IsMyPage()
          Checks if the current page is a mypage
 boolean IsMyPortalPage()
          Checks if this a MyPortal page, (either Mypage or Community page
 boolean IsPreviewPage()
          This function checks the MyPortalModel to see if the current page is a community preview page (certain actions are disabled in this case).
 boolean IsUserProfileCommunity()
          Checks if this is the User Profile Community
 void ReInit(AActivitySpace parent)
          To be called by AActivitySpace ReInit()
 void SetFooterElement(boolean bClearPrevContent, HTMLElement element)
          Sets a new footer element
 void SetHeaderElement(boolean bClearPrevContent, HTMLElement element)
          Sets a new header element.
 void SetRegisteredViewNavScheme(int newNavScheme)
          Sets the currently registered view nav scheme to be newNavScheme
 void SetSectionVisibility(int nSectionIDConst, boolean bShow)
          Sets visibility on vertical navigation sections
 boolean ShowCommunityNavigation()
          Returns true if this page should show the "Inside this Community" header and sub- and related communitites.
static PTSortedArrayWrapper SortQueryResult(IPTQueryResult qResult, int[] naPropIDs, int[] naPropIDType, int[][] naSorting)
          Creates a PTSortedArrayWrapper from a queryresult
 
Methods inherited from class com.plumtree.uiinfrastructure.activityspace.AClearModel
CleanupAllData, CleanupTempData, GetTempData
 
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
Navigation model class identifier for activty space registration

See Also:
Constant Field Values

FOLDERID_UNCHANGED

public static final int FOLDERID_UNCHANGED
Directory constants

See Also:
Constant Field Values

LOGIN_TOKEN_LIFE_SPAN

public static final int LOGIN_TOKEN_LIFE_SPAN
How long the login token passed with the admin link should be valid for, don't want too long since it compromises security but too short could invalidate it before the user clicks on the link, measured in minutes. Maybe worth to put as a setting in config.xml?

See Also:
Constant Field Values

NO_CURRENT_PAGEID

public static final int NO_CURRENT_PAGEID
Uninitialized Mypage ID value. Not -1 since that is the home page for administrator Set to 0 since it is passed and used to open the myportalobject in the appdataobject and 0 represents the user's default homepage.

See Also:
Constant Field Values

NO_CURRENT_COMMID

public static final int NO_CURRENT_COMMID
Uninitialized Community ID value

See Also:
Constant Field Values

SECTION_VISIBILITY_SESSION_ATTRIBUTE

protected static final java.lang.String SECTION_VISIBILITY_SESSION_ATTRIBUTE
Session attribute name of the array holding section visibility flag

See Also:
Constant Field Values

NAV_SECTIONVISARRAY_PREFSNAME

protected static final java.lang.String NAV_SECTIONVISARRAY_PREFSNAME
Personal preference name of the vertical navigation section visibility setting

See Also:
Constant Field Values

PROPIDTYPE_INT

public static final int PROPIDTYPE_INT
Add more when neccessary

See Also:
Constant Field Values

PROPIDTYPE_STRING

public static final int PROPIDTYPE_STRING
See Also:
Constant Field Values
Constructor Detail

NavigationModel

public NavigationModel()
Method Detail

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.uiinfrastructure.activityspace.IModel#Init()

ReInit

public void ReInit(AActivitySpace parent)
To be called by AActivitySpace ReInit()


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 IPluggableNavModelRO
Specified by:
Create in interface INavigationModelRO
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()

GetName

public java.lang.String GetName()
Description copied from interface: IMVCObject
Return the name of the MVC object.

Specified by:
GetName in interface INavigationModelRO
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()

GetAccessibleCommunityID

public int GetAccessibleCommunityID(int nSubPortalCommID)
Description copied from interface: IPluggableNavModelRO
Checks for at least read access to the specified Community, If current user lacks access, get the user's default Community and user has no default communities, return -1.

Specified by:
GetAccessibleCommunityID in interface IPluggableNavModelRO
Specified by:
GetAccessibleCommunityID in interface INavigationModelRO
Parameters:
nSubPortalCommID - ID of the Community to check access to
Returns:
int Returns an accessible Community for the current user or -1 if none can be found
See Also:
IPluggableNavModelRO.GetAccessibleCommunityID(int)

GetCurCommunityID

public int GetCurCommunityID()
Description copied from interface: INavigationModelRO
Gets the ID of the current Community (if in one)

Specified by:
GetCurCommunityID in interface INavigationModelRO
Returns:
Object ID of the current Community
See Also:
INavigationModelRO.GetCurCommunityID()

CalculateCurCommunityID

public int CalculateCurCommunityID()
Find the current Community ID

Returns:
int Calculated Community ID

GetCurCommunityName

public java.lang.String GetCurCommunityName()
Gets the name of the current Community (if in one) from the MyPortalModel. NOTE: Returned string not HTMLEncoded

Specified by:
GetCurCommunityName in interface INavigationModelRO
Returns:
Not HTMLEncoded/URLEncoded name of the community
Throws:
XPIllegalStateException - If not in a Community or called if NavigationModel hasn't been properly initialized

GetCurDocDirFolderID

public int GetCurDocDirFolderID()
Gets the id of the current document directory folder, or 0 if we are not currently in a single doc directory folder.

Specified by:
GetCurDocDirFolderID in interface INavigationModelRO
Returns:
Current Document Directory Folder ID, 0 if not in the Document Directory

GetDefaultCommunity

public int GetDefaultCommunity()
Description copied from interface: IPluggableNavModelRO
Gets a user's defeault community id, (right now the first community in mycommunities)

Specified by:
GetDefaultCommunity in interface IPluggableNavModelRO
Specified by:
GetDefaultCommunity in interface INavigationModelRO
Returns:
The default Community ID
See Also:
IPluggableNavModelRO.GetDefaultCommunity()

GetDefaultCommunityPassSubportal

public int GetDefaultCommunityPassSubportal(IPTSubPortalInfo ptSubPortalInfo)
Get the default Community ID - the ID set in PTConfig.xml or if that is zero, then the ID of the first community in a user's membership list.

Parameters:
ptSubPortalInfo - Current user's Subportal object
Returns:
Current user's Default Community ID or -1 if Community access is disabled on the subportal or the user isn't member of any communities.

GetCurPageID

public int GetCurPageID()
gets the current mypage id

Specified by:
GetCurPageID in interface INavigationModelRO
Returns:
int Current page id or if none exists, 0

GetCurPageName

public java.lang.String GetCurPageName()
NOTE: Returned string not HTML/URLEncoded.

Specified by:
GetCurPageName in interface INavigationModelRO
Returns:
Not HTMLEncoded/URLEncoded string of the page name or empty string if no current page.

GetGreeting

public java.lang.String GetGreeting()
Get "welcome" greeting string

Specified by:
GetGreeting in interface INavigationModelRO
Returns:
strign set as greeting preference

GetParentComm

public ICPListEntryIterator GetParentComm()
NAVIGATION LINK GENERATION ***************************************************** /**

Specified by:
GetParentComm in interface INavigationModelRO
Returns:
Parent community
See Also:
INavigationModelRO.GetParentComm()

GetPortalSettings

public ICPListEntryIterator GetPortalSettings()
Description copied from interface: IPluggableNavModelRO
Gets the link to the My Account settings page

Specified by:
GetPortalSettings in interface IPluggableNavModelRO
Specified by:
GetPortalSettings in interface INavigationModelRO
Returns:
Link to My Account settings page in an ICPListEntryIterator
See Also:
IPluggableNavModelRO.GetPortalSettings()

GetCommunityActions

public ICPListEntryIterator GetCommunityActions()
Never check IsCommunityPage before calling this function. Has internal security check and need to display the edit community membership entry even when not on community pages. NOTE: Any logic changes in this function also needs to be added to TaskAPIUICommunity functions.

Specified by:
GetCommunityActions in interface INavigationModelRO
See Also:
com.plumtree.xpshared.browsing.myportal.IMyPortalModelHelper#GetMyPortalActions(int, int)

ConvertCommunityPagePTURLListToICPIterator

public ICPListEntryIterator ConvertCommunityPagePTURLListToICPIterator(XPArrayList urlList,
                                                                       boolean bDontUseCurrent)
Helper to convert an XPArrayList with IPTURLs to Community or Communitypages to an ICPListEntryIterator

Parameters:
urlList -
bUseCurrentMarker -
Returns:

ConvertMyPagePTURLListToICPIterator

public ICPListEntryIterator ConvertMyPagePTURLListToICPIterator(XPArrayList urlList)
Helper to convert an XPArrayList with IPTURLs to MyPages to an ICPListEntryIterator

Parameters:
urlList -
Returns:

GetCurCommPages

public ICPListEntryIterator GetCurCommPages()
Gets all the current community pages if on community page

Specified by:
GetCurCommPages in interface INavigationModelRO
Returns:
ICPListEntryIterator

GetAdminLink

public ICPListEntryIterator GetAdminLink()
Form the admin link for navigation

Specified by:
GetAdminLink in interface INavigationModelRO
Returns:
ICPListEntryIterator

GetCurMandatoryTabs

public ICPListEntryIterator GetCurMandatoryTabs(boolean bAddAdminLink)
Description copied from interface: INavigationModelRO
Get the Mandatory Tabs for the current user

Specified by:
GetCurMandatoryTabs in interface INavigationModelRO
Parameters:
bAddAdminLink -
Returns:
ICPListEntryIterator

GetCurMyPages

public ICPListEntryIterator GetCurMyPages(boolean bShowActions)
Gets all the current my pages if on the my page

Specified by:
GetCurMyPages in interface INavigationModelRO
Parameters:
bShowActions - True to show mypage actions
Returns:
Mypages and actions if specified in an ICPListEntryIterator

GetCurMyPagesResult

public IPTQueryResult GetCurMyPagesResult()

GetMyCommunities

public ICPListEntryIterator GetMyCommunities(boolean bListActions)
Helper function, returns the join community link, community actions if on a community page and the list of communities.

Specified by:
GetMyCommunities in interface INavigationModelRO
Parameters:
bListActions -
Returns:
ICPListEntryIterator

GetMyPageActions

public ICPListEntryIterator GetMyPageActions()
Get actions list for th eMyPages links.

Specified by:
GetMyPageActions in interface INavigationModelRO
Parameters:
nNumMyPages -
Returns:
An XPArrayList with ASURLContainer objects.
See Also:
com.plumtree.xpshared.browsing.myportal.IMyPortalModelHelper#GetMyPagesActions()

GetCurRelCommunities

public ICPListEntryIterator GetCurRelCommunities()
Get the current related communtiies links

Specified by:
GetCurRelCommunities in interface INavigationModelRO
Returns:
ICPListEntryIterator

GetCurSubCommunities

public ICPListEntryIterator GetCurSubCommunities()
Get current subcommunities links

Specified by:
GetCurSubCommunities in interface INavigationModelRO
Returns:
ICPListEntryIterator
Throws:
java.lang.Exception

GetMandatoryLinks

public ICPListEntryIterator GetMandatoryLinks()
Get the list fo mandatory links

Specified by:
GetMandatoryLinks in interface INavigationModelRO
Returns:
ICPListEntryIterator

GetDirectoryLinks

public ICPListEntryIterator GetDirectoryLinks()
Get list of directory links

Specified by:
GetDirectoryLinks in interface INavigationModelRO
Returns:
ICPListEntryIterator

GetMyHome

public ICPListEntryIterator GetMyHome()
Returns the My Home link for the current user (the page the user first sees after logging in.

Returns:
ICPListEntryIterator

GetFooterElement

public HTMLElementCollection GetFooterElement()
Get footer element

Specified by:
GetFooterElement in interface INavigationModelRO
Returns:
HTMLElementCollection

GetFooterHasBeenSet

public boolean GetFooterHasBeenSet()
Description copied from interface: INavigationModelRO
Checks if a footer has been set for the current page

Specified by:
GetFooterHasBeenSet in interface INavigationModelRO
Returns:
True if a footer has been set
See Also:
INavigationModelRO.GetFooterHasBeenSet()

GetHeaderElement

public HTMLElementCollection GetHeaderElement()
Description copied from interface: INavigationModelRO
Get header element

Specified by:
GetHeaderElement in interface INavigationModelRO
Returns:
HTMLElementCollection
See Also:
INavigationModelRO.GetHeaderElement()

GetHeaderHasBeenSet

public boolean GetHeaderHasBeenSet()
Description copied from interface: INavigationModelRO
Checks if a header has been set for the current page

Specified by:
GetHeaderHasBeenSet in interface INavigationModelRO
Returns:
True if a header has been set
See Also:
INavigationModelRO.GetHeaderHasBeenSet()

SetFooterElement

public void SetFooterElement(boolean bClearPrevContent,
                             HTMLElement element)
Description copied from interface: INavigationModelRO
Sets a new footer element

Specified by:
SetFooterElement in interface INavigationModelRO
Parameters:
bClearPrevContent - True to clear any previously set footer
element - The new footer element
See Also:
INavigationModelRO.SetFooterElement(boolean, HTMLElement)

SetHeaderElement

public void SetHeaderElement(boolean bClearPrevContent,
                             HTMLElement element)
Description copied from interface: INavigationModelRO
Sets a new header element.

Specified by:
SetHeaderElement in interface INavigationModelRO
Parameters:
bClearPrevContent - True to clear any previously set header
element - The new header element
See Also:
INavigationModelRO.SetHeaderElement(boolean, HTMLElement)

GetSubportalBanner

public HTMLElement GetSubportalBanner()
Description copied from interface: IPluggableNavModelRO
Gets the header for this page from the Subportal. Returns default header if no header portlet assigned.

Specified by:
GetSubportalBanner in interface IPluggableNavModelRO
Specified by:
GetSubportalBanner in interface INavigationModelRO
Returns:
HTMLElement with the footer set in the Subportal
See Also:
IPluggableNavModelRO.GetSubportalBanner()

GetSubportalFooter

public HTMLElement GetSubportalFooter()
Description copied from interface: IPluggableNavModelRO
Gets the footer for this page from the Subportal. Returns default footer if no footer portlet assigned.

Specified by:
GetSubportalFooter in interface IPluggableNavModelRO
Specified by:
GetSubportalFooter in interface INavigationModelRO
Returns:
HTMLElement with the footer set in the Subportal
See Also:
IPluggableNavModelRO.GetSubportalFooter()

InitializePortletContent

public void InitializePortletContent()
Sets up all the portlet content for this page. Whether it is a communiy page, my page, or otherwise. It should only be called after the Expression Engine has been run to determine what the subportal is.


GetMandatoryLinksFolderName

public java.lang.String GetMandatoryLinksFolderName()
Description copied from interface: INavigationModelRO
Gets the name for the mandatory links folder for the current user

Specified by:
GetMandatoryLinksFolderName in interface INavigationModelRO
Returns:
Mandatory folder String name
See Also:
INavigationModelRO.GetMandatoryLinksFolderName()

GetSubPortalEnabledPassSubportal

public boolean GetSubPortalEnabledPassSubportal(int nType,
                                                IPTSubPortalInfo subPortal)
Checks if the specified access type is enabled on the current user's subportal.

Parameters:
nType - PT_SUBPORTAL_ACCESS_TYPES to check access on
subPortal - Current user's subportal object
Returns:
boolean True if the access type is enabled for current user
See Also:
PT_SUBPORTAL_ACCESS_TYPES

GetSubPortalEnabled

public boolean GetSubPortalEnabled(int nType)
Description copied from interface: IPluggableNavModelRO
Checks if the specified feature is enabled in the current subportal.

Specified by:
GetSubPortalEnabled in interface IPluggableNavModelRO
Specified by:
GetSubPortalEnabled in interface INavigationModelRO
Parameters:
nType - NavVisibility Section ID
Returns:
boolean True if the specified section is visible
See Also:
IPluggableNavModelRO.GetSubPortalEnabled(int)

GetSubPortalFirstPageType

public int GetSubPortalFirstPageType()
Description copied from interface: INavigationModelRO
Gets the page type of the current user's default my home page-type.

Specified by:
GetSubPortalFirstPageType in interface INavigationModelRO
Returns:
int Page type, -1 one if none can be found.
See Also:
INavigationModelRO.GetSubPortalFirstPageType()

GetSubPortalNavScheme

public int GetSubPortalNavScheme()
Description copied from interface: INavigationModelRO
Gets the navigation scheme set for the current user

Specified by:
GetSubPortalNavScheme in interface INavigationModelRO
Returns:
Navigation scheme ID
See Also:
INavigationModelRO.GetSubPortalNavScheme()

GetSubPortalPageID

public int GetSubPortalPageID()
Description copied from interface: INavigationModelRO
Gets the Page ID of the first page a user should see after logging in. Set on a user's Subportal

Specified by:
GetSubPortalPageID in interface INavigationModelRO
Returns:
Page ID of the first page a user is redirected to after logging in
See Also:
INavigationModelRO.GetSubPortalPageID()

GetDefaultSubportalURL

public ASURL GetDefaultSubportalURL()
Description copied from interface: INavigationModelRO
Gets the URL to the default subportal of the current user

Specified by:
GetDefaultSubportalURL in interface INavigationModelRO
Returns:
See Also:
INavigationModelRO.GetDefaultSubportalURL()

GetSubtitleForBanner

public java.lang.String GetSubtitleForBanner()
Description copied from interface: INavigationModelRO
Gets the subtitle of the current page

Specified by:
GetSubtitleForBanner in interface INavigationModelRO
Returns:
Page Subtitle String
See Also:
INavigationModelRO.GetSubtitleForBanner()

GetTitleForBanner

public java.lang.String GetTitleForBanner()
Description copied from interface: INavigationModelRO
Gets the title of the current page

Specified by:
GetTitleForBanner in interface INavigationModelRO
Returns:
Page title String
See Also:
INavigationModelRO.GetTitleForBanner()

GetRegisteredViewNavScheme

public int GetRegisteredViewNavScheme()
Gets the currently registered view's Nav Scheme

Specified by:
GetRegisteredViewNavScheme in interface INavigationModelRO
Returns:
int

SetRegisteredViewNavScheme

public void SetRegisteredViewNavScheme(int newNavScheme)
Sets the currently registered view nav scheme to be newNavScheme

Specified by:
SetRegisteredViewNavScheme in interface INavigationModelRO
Parameters:
the - new registered view's Nav Scheme

HasAdministratorAccess

public boolean HasAdministratorAccess()
Description copied from interface: IPluggableNavModelRO
Checks if the user has admin access rights or not.

Specified by:
HasAdministratorAccess in interface IPluggableNavModelRO
Specified by:
HasAdministratorAccess in interface INavigationModelRO
Returns:
True if the current user has Administrator access to the current Community
See Also:
IPluggableNavModelRO.HasAdministratorAccess()

HasAdminLinkAccess

public boolean HasAdminLinkAccess()
Checks to see if we should display the admin link or not

Returns:
boolean

HasSelectAccess

public boolean HasSelectAccess()
Description copied from interface: IPluggableNavModelRO
Checks if the current user has at least select access to the current Community

Specified by:
HasSelectAccess in interface IPluggableNavModelRO
Specified by:
HasSelectAccess in interface INavigationModelRO
Returns:
boolean
See Also:
IPluggableNavModelRO.HasSelectAccess()

IsCommunityPage

public boolean IsCommunityPage()
Description copied from interface: INavigationModelRO
Checks if the current page is a Community Page

Specified by:
IsCommunityPage in interface INavigationModelRO
Returns:
boolean
See Also:
INavigationModelRO.IsCommunityPage()

IsMyPortalPage

public boolean IsMyPortalPage()
Checks if this a MyPortal page, (either Mypage or Community page

Returns:
boolean

IsCurCommOwner

public boolean IsCurCommOwner()
Description copied from interface: INavigationModelRO
Checks if the current user is the owner of the current Community

Specified by:
IsCurCommOwner in interface INavigationModelRO
Returns:
boolean
See Also:
INavigationModelRO.IsCurCommOwner()

IsDirPage

public boolean IsDirPage()
Description copied from interface: INavigationModelRO
Checks if the current page is a directory page

Specified by:
IsDirPage in interface INavigationModelRO
Returns:
boolean
See Also:
INavigationModelRO.IsDirPage()

IsUserProfileCommunity

public boolean IsUserProfileCommunity()
Checks if this is the User Profile Community

Returns:
boolean

IsEditProfile

public boolean IsEditProfile()
Description copied from interface: IPluggableNavModelRO
Checks if the current page is a Edit Default Profile Editor page

Specified by:
IsEditProfile in interface IPluggableNavModelRO
Returns:
boolean
See Also:
IPluggableNavModelRO.IsEditProfile()

IsGuestSession

public boolean IsGuestSession()
Description copied from interface: IPluggableNavModelRO
Checks if logged in as guest or not.

Specified by:
IsGuestSession in interface IPluggableNavModelRO
Specified by:
IsGuestSession in interface INavigationModelRO
Returns:
true if guest
See Also:
IPluggableNavModelRO.IsGuestSession()

IsLoginPage

public boolean IsLoginPage()
Description copied from interface: INavigationModelRO
Checks if the current page is the login page

Specified by:
IsLoginPage in interface INavigationModelRO
Returns:
boolean
See Also:
INavigationModelRO.IsLoginPage()

IsMyPage

public boolean IsMyPage()
Description copied from interface: INavigationModelRO
Checks if the current page is a mypage

Specified by:
IsMyPage in interface INavigationModelRO
Returns:
boolean
See Also:
INavigationModelRO.IsMyPage()

IsPreviewPage

public boolean IsPreviewPage()
This function checks the MyPortalModel to see if the current page is a community preview page (certain actions are disabled in this case).

Specified by:
IsPreviewPage in interface INavigationModelRO
Returns:
boolean

IsDefaultProfile

public boolean IsDefaultProfile()
Returns:
boolean

IsMemberInCurCommunity

public boolean IsMemberInCurCommunity()
Description copied from interface: INavigationModelRO
Checks if the current user is a member of the current Community

Specified by:
IsMemberInCurCommunity in interface INavigationModelRO
Returns:
boolean
See Also:
INavigationModelRO.IsMemberInCurCommunity()

GetSectionVisibility

public boolean GetSectionVisibility(int nSectionIDConst)
Description copied from interface: IPluggableNavModelRO
Gets visibility of the specified vertical navigation section

Specified by:
GetSectionVisibility in interface IPluggableNavModelRO
Specified by:
GetSectionVisibility in interface INavigationModelRO
Parameters:
nSectionIDConst - NavVisibility ID of the section to check visibility on
Returns:
True if the specified section is visibile
See Also:
IPluggableNavModelRO.GetSectionVisibility(int)

SetSectionVisibility

public void SetSectionVisibility(int nSectionIDConst,
                                 boolean bShow)
Description copied from interface: IPluggableNavModelRO
Sets visibility on vertical navigation sections

Specified by:
SetSectionVisibility in interface IPluggableNavModelRO
Specified by:
SetSectionVisibility in interface INavigationModelRO
Parameters:
nSectionIDConst - NavVisibility ID of the section to set visibility on
bShow - True of the section is visible
See Also:
IPluggableNavModelRO.SetSectionVisibility(int, boolean)

GetMyPortalModel

public IModel GetMyPortalModel()
Used by pluggable navigation to access the MyPages model

Specified by:
GetMyPortalModel in interface INavigationModelRO
Returns:
IModel

GetPageSpecificMethods

public NavigationPage GetPageSpecificMethods()
Description copied from interface: IPluggableNavModelRO
Used by pluggable navigation to access the model specific to the page we're on (see GetCurNavPage())

Specified by:
GetPageSpecificMethods in interface IPluggableNavModelRO
Returns:
The current NavigationPage interface
See Also:
IPluggableNavModelRO.GetPageSpecificMethods()

GetCurNavPageType

public NavPageType GetCurNavPageType()
Description copied from interface: IPluggableNavModelRO
Gets the current page type.

Specified by:
GetCurNavPageType in interface IPluggableNavModelRO
Returns:
NavPageType
See Also:
IPluggableNavModelRO.GetCurNavPageType()

GetCategoryLinks

public ICPListEntryIterator GetCategoryLinks(NavCategoryType linkType,
                                             boolean getActions)
Get the links lists by category, with or without actions. If getActions is true, returns *only actions*, else returns *only the list*. Note that subportal access is also tested, so if community access is disabled on the subportal the links list will be null.

Specified by:
GetCategoryLinks in interface IPluggableNavModelRO
Parameters:
linkType - Type of links, use constants defined in NavCategoryType
getActions - Returns actions, if any, associated with this link type
Returns:
ICPListEntryIterator
See Also:
NavCategoryType

GetCategoryTitle

public java.lang.String GetCategoryTitle(NavCategoryType linkType)
Get the name of the category link type. Example: "Administrator" for admin. Top level only.

Specified by:
GetCategoryTitle in interface IPluggableNavModelRO
Parameters:
linkType -
Returns:
String category name for link title
See Also:
NavCategoryType

GetSubsectionTitle

public java.lang.String GetSubsectionTitle(NavCategoryType linkType,
                                           boolean bAction)
Get the name of the subsection title; basically, actions for mypage and communities only.

Specified by:
GetSubsectionTitle in interface IPluggableNavModelRO
Parameters:
linkType -
Returns:
String category name for link title
See Also:
NavCategoryType

SortQueryResult

public static PTSortedArrayWrapper SortQueryResult(IPTQueryResult qResult,
                                                   int[] naPropIDs,
                                                   int[] naPropIDType,
                                                   int[][] naSorting)
Creates a PTSortedArrayWrapper from a queryresult

Parameters:
qResult -
naPropIDs -
naPropIDType -
naSorting -
Returns:

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

ShowCommunityNavigation

public boolean ShowCommunityNavigation()
Returns true if this page should show the "Inside this Community" header and sub- and related communitites. Should be true for all pages except the user profile community.

Specified by:
ShowCommunityNavigation in interface INavigationModelRO
Returns:
true if the page should show community nav links
See Also:
com.plumtree.portalpages.common.uiparts.INavigationModelRO#IsCurCommunityProfile()

CanJoinCurCommunity

public boolean CanJoinCurCommunity()
Description copied from interface: INavigationModelRO
Checks if the current user can join the current Community

Specified by:
CanJoinCurCommunity in interface INavigationModelRO
Returns:
boolean
See Also:
INavigationModelRO.CanJoinCurCommunity()

GetIntrinsicPortletContentWithErrorHandling

public HTMLElement GetIntrinsicPortletContentWithErrorHandling(int nPortletIndex,
                                                               int nPortletID,
                                                               java.lang.Object[][] objArrMarkup,
                                                               IPTGadget ptGadget,
                                                               IPTState objAppdataState,
                                                               java.lang.String gadgetName)
Gets the content for an intrinsic portlet, or generates properly beautified error results Used only for headers and footers, and *only* used in NavigationModel and MyPortalModel - not for standard usage, although it will work well enough for those cases.

Parameters:
nPortletIndex -
nPortletID -
objArrMarkup -
ptGadget -
objAppdataState -
gadgetName -
Returns:
HTMLElement to be displayed



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