|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object AClearModel com.plumtree.portalpages.common.uiparts.NavigationModel
public class NavigationModel
Core model for all navigation. All public function calling into Server API should internally catch all exceptions.
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()
|
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()
|
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)
|
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STR_MVC_CLASS_NAME
public static final int FOLDERID_UNCHANGED
public static final int LOGIN_TOKEN_LIFE_SPAN
public static final int NO_CURRENT_PAGEID
public static final int NO_CURRENT_COMMID
protected static final java.lang.String SECTION_VISIBILITY_SESSION_ATTRIBUTE
protected static final java.lang.String NAV_SECTIONVISARRAY_PREFSNAME
public static final int PROPIDTYPE_INT
public static final int PROPIDTYPE_STRING
Constructor Detail |
---|
public NavigationModel()
Method Detail |
---|
public void Init(AActivitySpace parent)
com.plumtree.uiinfrastructure.activityspace.IModel#Init()
public void ReInit(AActivitySpace parent)
public java.lang.Object Create()
Create
in interface IPluggableNavModelRO
Create
in interface INavigationModelRO
com.plumtree.uiinfrastructure.activityspace.IManagedObject#Create()
public java.lang.String GetName()
GetName
in interface INavigationModelRO
com.plumtree.xpshared.activityspace.IModelRO#GetName()
public int GetAccessibleCommunityID(int nSubPortalCommID)
IPluggableNavModelRO
GetAccessibleCommunityID
in interface IPluggableNavModelRO
GetAccessibleCommunityID
in interface INavigationModelRO
nSubPortalCommID
- ID of the Community to check access to
IPluggableNavModelRO.GetAccessibleCommunityID(int)
public int GetCurCommunityID()
INavigationModelRO
GetCurCommunityID
in interface INavigationModelRO
INavigationModelRO.GetCurCommunityID()
public int CalculateCurCommunityID()
public java.lang.String GetCurCommunityName()
GetCurCommunityName
in interface INavigationModelRO
XPIllegalStateException
- If not in a Community or called if NavigationModel hasn't been properly initializedpublic int GetCurDocDirFolderID()
GetCurDocDirFolderID
in interface INavigationModelRO
public int GetDefaultCommunity()
IPluggableNavModelRO
GetDefaultCommunity
in interface IPluggableNavModelRO
GetDefaultCommunity
in interface INavigationModelRO
IPluggableNavModelRO.GetDefaultCommunity()
public int GetDefaultCommunityPassSubportal(IPTSubPortalInfo ptSubPortalInfo)
ptSubPortalInfo
- Current user's Subportal object
public int GetCurPageID()
GetCurPageID
in interface INavigationModelRO
public java.lang.String GetCurPageName()
GetCurPageName
in interface INavigationModelRO
public java.lang.String GetGreeting()
GetGreeting
in interface INavigationModelRO
public ICPListEntryIterator GetParentComm()
GetParentComm
in interface INavigationModelRO
INavigationModelRO.GetParentComm()
public ICPListEntryIterator GetPortalSettings()
IPluggableNavModelRO
GetPortalSettings
in interface IPluggableNavModelRO
GetPortalSettings
in interface INavigationModelRO
IPluggableNavModelRO.GetPortalSettings()
public ICPListEntryIterator GetCommunityActions()
GetCommunityActions
in interface INavigationModelRO
com.plumtree.xpshared.browsing.myportal.IMyPortalModelHelper#GetMyPortalActions(int,
int)
public ICPListEntryIterator ConvertCommunityPagePTURLListToICPIterator(XPArrayList urlList, boolean bDontUseCurrent)
urlList
- bUseCurrentMarker
-
public ICPListEntryIterator ConvertMyPagePTURLListToICPIterator(XPArrayList urlList)
urlList
-
public ICPListEntryIterator GetCurCommPages()
GetCurCommPages
in interface INavigationModelRO
public ICPListEntryIterator GetAdminLink()
GetAdminLink
in interface INavigationModelRO
public ICPListEntryIterator GetCurMandatoryTabs(boolean bAddAdminLink)
INavigationModelRO
GetCurMandatoryTabs
in interface INavigationModelRO
bAddAdminLink
-
public ICPListEntryIterator GetCurMyPages(boolean bShowActions)
GetCurMyPages
in interface INavigationModelRO
bShowActions
- True to show mypage actions
public IPTQueryResult GetCurMyPagesResult()
public ICPListEntryIterator GetMyCommunities(boolean bListActions)
GetMyCommunities
in interface INavigationModelRO
bListActions
-
public ICPListEntryIterator GetMyPageActions()
GetMyPageActions
in interface INavigationModelRO
nNumMyPages
-
com.plumtree.xpshared.browsing.myportal.IMyPortalModelHelper#GetMyPagesActions()
public ICPListEntryIterator GetCurRelCommunities()
GetCurRelCommunities
in interface INavigationModelRO
public ICPListEntryIterator GetCurSubCommunities()
GetCurSubCommunities
in interface INavigationModelRO
java.lang.Exception
public ICPListEntryIterator GetMandatoryLinks()
GetMandatoryLinks
in interface INavigationModelRO
public ICPListEntryIterator GetDirectoryLinks()
GetDirectoryLinks
in interface INavigationModelRO
public ICPListEntryIterator GetMyHome()
public HTMLElementCollection GetFooterElement()
GetFooterElement
in interface INavigationModelRO
public boolean GetFooterHasBeenSet()
INavigationModelRO
GetFooterHasBeenSet
in interface INavigationModelRO
INavigationModelRO.GetFooterHasBeenSet()
public HTMLElementCollection GetHeaderElement()
INavigationModelRO
GetHeaderElement
in interface INavigationModelRO
INavigationModelRO.GetHeaderElement()
public boolean GetHeaderHasBeenSet()
INavigationModelRO
GetHeaderHasBeenSet
in interface INavigationModelRO
INavigationModelRO.GetHeaderHasBeenSet()
public void SetFooterElement(boolean bClearPrevContent, HTMLElement element)
INavigationModelRO
SetFooterElement
in interface INavigationModelRO
bClearPrevContent
- True to clear any previously set footerelement
- The new footer elementINavigationModelRO.SetFooterElement(boolean, HTMLElement)
public void SetHeaderElement(boolean bClearPrevContent, HTMLElement element)
INavigationModelRO
SetHeaderElement
in interface INavigationModelRO
bClearPrevContent
- True to clear any previously set headerelement
- The new header elementINavigationModelRO.SetHeaderElement(boolean, HTMLElement)
public HTMLElement GetSubportalBanner()
IPluggableNavModelRO
GetSubportalBanner
in interface IPluggableNavModelRO
GetSubportalBanner
in interface INavigationModelRO
IPluggableNavModelRO.GetSubportalBanner()
public HTMLElement GetSubportalFooter()
IPluggableNavModelRO
GetSubportalFooter
in interface IPluggableNavModelRO
GetSubportalFooter
in interface INavigationModelRO
IPluggableNavModelRO.GetSubportalFooter()
public void InitializePortletContent()
public java.lang.String GetMandatoryLinksFolderName()
INavigationModelRO
GetMandatoryLinksFolderName
in interface INavigationModelRO
INavigationModelRO.GetMandatoryLinksFolderName()
public boolean GetSubPortalEnabledPassSubportal(int nType, IPTSubPortalInfo subPortal)
nType
- PT_SUBPORTAL_ACCESS_TYPES to check access onsubPortal
- Current user's subportal object
PT_SUBPORTAL_ACCESS_TYPES
public boolean GetSubPortalEnabled(int nType)
IPluggableNavModelRO
GetSubPortalEnabled
in interface IPluggableNavModelRO
GetSubPortalEnabled
in interface INavigationModelRO
nType
- NavVisibility Section ID
IPluggableNavModelRO.GetSubPortalEnabled(int)
public int GetSubPortalFirstPageType()
INavigationModelRO
GetSubPortalFirstPageType
in interface INavigationModelRO
INavigationModelRO.GetSubPortalFirstPageType()
public int GetSubPortalNavScheme()
INavigationModelRO
GetSubPortalNavScheme
in interface INavigationModelRO
INavigationModelRO.GetSubPortalNavScheme()
public int GetSubPortalPageID()
INavigationModelRO
GetSubPortalPageID
in interface INavigationModelRO
INavigationModelRO.GetSubPortalPageID()
public ASURL GetDefaultSubportalURL()
INavigationModelRO
GetDefaultSubportalURL
in interface INavigationModelRO
INavigationModelRO.GetDefaultSubportalURL()
public java.lang.String GetSubtitleForBanner()
INavigationModelRO
GetSubtitleForBanner
in interface INavigationModelRO
INavigationModelRO.GetSubtitleForBanner()
public java.lang.String GetTitleForBanner()
INavigationModelRO
GetTitleForBanner
in interface INavigationModelRO
INavigationModelRO.GetTitleForBanner()
public int GetRegisteredViewNavScheme()
GetRegisteredViewNavScheme
in interface INavigationModelRO
public void SetRegisteredViewNavScheme(int newNavScheme)
SetRegisteredViewNavScheme
in interface INavigationModelRO
the
- new registered view's Nav Schemepublic boolean HasAdministratorAccess()
IPluggableNavModelRO
HasAdministratorAccess
in interface IPluggableNavModelRO
HasAdministratorAccess
in interface INavigationModelRO
IPluggableNavModelRO.HasAdministratorAccess()
public boolean HasAdminLinkAccess()
public boolean HasSelectAccess()
IPluggableNavModelRO
HasSelectAccess
in interface IPluggableNavModelRO
HasSelectAccess
in interface INavigationModelRO
IPluggableNavModelRO.HasSelectAccess()
public boolean IsCommunityPage()
INavigationModelRO
IsCommunityPage
in interface INavigationModelRO
INavigationModelRO.IsCommunityPage()
public boolean IsMyPortalPage()
public boolean IsCurCommOwner()
INavigationModelRO
IsCurCommOwner
in interface INavigationModelRO
INavigationModelRO.IsCurCommOwner()
public boolean IsDirPage()
INavigationModelRO
IsDirPage
in interface INavigationModelRO
INavigationModelRO.IsDirPage()
public boolean IsUserProfileCommunity()
public boolean IsEditProfile()
IPluggableNavModelRO
IsEditProfile
in interface IPluggableNavModelRO
IPluggableNavModelRO.IsEditProfile()
public boolean IsGuestSession()
IPluggableNavModelRO
IsGuestSession
in interface IPluggableNavModelRO
IsGuestSession
in interface INavigationModelRO
IPluggableNavModelRO.IsGuestSession()
public boolean IsLoginPage()
INavigationModelRO
IsLoginPage
in interface INavigationModelRO
INavigationModelRO.IsLoginPage()
public boolean IsMyPage()
INavigationModelRO
IsMyPage
in interface INavigationModelRO
INavigationModelRO.IsMyPage()
public boolean IsPreviewPage()
IsPreviewPage
in interface INavigationModelRO
public boolean IsDefaultProfile()
public boolean IsMemberInCurCommunity()
INavigationModelRO
IsMemberInCurCommunity
in interface INavigationModelRO
INavigationModelRO.IsMemberInCurCommunity()
public boolean GetSectionVisibility(int nSectionIDConst)
IPluggableNavModelRO
GetSectionVisibility
in interface IPluggableNavModelRO
GetSectionVisibility
in interface INavigationModelRO
nSectionIDConst
- NavVisibility ID of the section to check visibility on
IPluggableNavModelRO.GetSectionVisibility(int)
public void SetSectionVisibility(int nSectionIDConst, boolean bShow)
IPluggableNavModelRO
SetSectionVisibility
in interface IPluggableNavModelRO
SetSectionVisibility
in interface INavigationModelRO
nSectionIDConst
- NavVisibility ID of the section to set visibility onbShow
- True of the section is visibleIPluggableNavModelRO.SetSectionVisibility(int, boolean)
public IModel GetMyPortalModel()
GetMyPortalModel
in interface INavigationModelRO
public NavigationPage GetPageSpecificMethods()
IPluggableNavModelRO
GetPageSpecificMethods
in interface IPluggableNavModelRO
IPluggableNavModelRO.GetPageSpecificMethods()
public NavPageType GetCurNavPageType()
IPluggableNavModelRO
GetCurNavPageType
in interface IPluggableNavModelRO
IPluggableNavModelRO.GetCurNavPageType()
public ICPListEntryIterator GetCategoryLinks(NavCategoryType linkType, boolean getActions)
GetCategoryLinks
in interface IPluggableNavModelRO
linkType
- Type of links, use constants defined in NavCategoryTypegetActions
- Returns actions, if any, associated with this link type
NavCategoryType
public java.lang.String GetCategoryTitle(NavCategoryType linkType)
GetCategoryTitle
in interface IPluggableNavModelRO
linkType
-
NavCategoryType
public java.lang.String GetSubsectionTitle(NavCategoryType linkType, boolean bAction)
GetSubsectionTitle
in interface IPluggableNavModelRO
linkType
-
NavCategoryType
public static PTSortedArrayWrapper SortQueryResult(IPTQueryResult qResult, int[] naPropIDs, int[] naPropIDType, int[][] naSorting)
qResult
- naPropIDs
- naPropIDType
- naSorting
-
public java.lang.Object GetNewTempData()
public boolean ShowCommunityNavigation()
ShowCommunityNavigation
in interface INavigationModelRO
com.plumtree.portalpages.common.uiparts.INavigationModelRO#IsCurCommunityProfile()
public boolean CanJoinCurCommunity()
INavigationModelRO
CanJoinCurCommunity
in interface INavigationModelRO
INavigationModelRO.CanJoinCurCommunity()
public HTMLElement GetIntrinsicPortletContentWithErrorHandling(int nPortletIndex, int nPortletID, java.lang.Object[][] objArrMarkup, IPTGadget ptGadget, IPTState objAppdataState, java.lang.String gadgetName)
nPortletIndex
- nPortletID
- objArrMarkup
- ptGadget
- objAppdataState
- gadgetName
-
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |