Package com.atlassian.jira.portal
Interface PortalPageManager
- All Superinterfaces:
SharedEntityAccessor<PortalPage>
- All Known Implementing Classes:
DefaultPortalPageManager
This is the manager for the PortalPageService
- Since:
- v3.13
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.jira.sharing.SharedEntityAccessor
SharedEntityAccessor.Factory, SharedEntityAccessor.RetrievalDescriptor -
Method Summary
Modifier and TypeMethodDescriptioncreate(PortalPage portalPage) Creates the specified PortalPage in the databasecreateBasedOnClone(ApplicationUser pageOwner, PortalPage portalPage, PortalPage clonePortalPage) Creates a PortalPage in the database by cloning its Portlet content from the specified clonePortalPagevoidDeletes the PortalPage with the specified portalPageIdgetAll()Get all PortalPages.Returns a Collection of PortalPage objects that are owned by the specified UsergetPortalPage(ApplicationUser user, Long portalPageId) Returns the PortalPage with the specified portalPageId, IF the user is allowed to see it.getPortalPageById(Long portalPageId) Gets a PortalPage by id regardless of ownergetPortalPageByName(ApplicationUser owner, String pageName) Returns a PortalPage by searching for it by owner and pageName.getPortletConfigurations(Long portalPageId) Returns a sorted immutable list of lists of portletconfigurations for a particular portal page.Returns the system default PortalPage.booleanhasShareRights(ApplicationUser user, PortalPage portalPage, ShareRight shareRight) Checks if provided user has share rights for given portal page.voidsaveLegacyPortletConfiguration(PortletConfiguration portletConfiguration) This can be called to save aPortletConfigurationobject inside aPortalPageobject to the underlying database store.search(SharedEntitySearchParameters searchParameters, ApplicationUser user, int pagePosition, int pageWidth) Deprecated.update(PortalPage portalPage) Updates the specified PortalPage in the databaseMethods inherited from interface com.atlassian.jira.sharing.SharedEntityAccessor
adjustFavouriteCount, get, get, getAllIndexableSharedEntities, getSharedEntity, getSharedEntity, getType, hasPermissionToUse
-
Method Details
-
getPortalPage
Returns the PortalPage with the specified portalPageId, IF the user is allowed to see it.- Parameters:
user- the User in playportalPageId- the id of the PortalPage to return- Returns:
- a PortalPage if the user is allowed to see it or null if they are not allowed
-
getAllOwnedPortalPages
Returns a Collection of PortalPage objects that are owned by the specified User- Parameters:
owner- the User who owns the PortalPage's- Returns:
- a Collection of PortalPage objects that are owned by the specified User
-
getAll
EnclosedIterable<PortalPage> getAll()Get all PortalPages.- Specified by:
getAllin interfaceSharedEntityAccessor<PortalPage>- Returns:
- an
EnclosedIterableof PortalPages
-
getPortalPageById
Gets a PortalPage by id regardless of owner- Parameters:
portalPageId- the id of the PortalPage to retrieve- Returns:
- a PortalPage object or null if it cant be found
-
getPortalPageByName
Returns a PortalPage by searching for it by owner and pageName.- Parameters:
owner- the owner in playpageName- the name of the PortalPage- Returns:
- a PortalPage object if one can be found with the name and owner or null if not
-
getSystemDefaultPortalPage
PortalPage getSystemDefaultPortalPage()Returns the system default PortalPage. This has no owner and is used when a User has no PortalPage objects defined for them- Returns:
- a non null system default PortalPage object
-
create
Creates the specified PortalPage in the database- Parameters:
portalPage- the PortalPage to create- Returns:
- the newly created PortalPage with its new id
-
createBasedOnClone
PortalPage createBasedOnClone(ApplicationUser pageOwner, PortalPage portalPage, PortalPage clonePortalPage) Creates a PortalPage in the database by cloning its Portlet content from the specified clonePortalPage- Parameters:
pageOwner- the User who will own the cloned portal pageportalPage- the PortalPage to createclonePortalPage- the PortalPage to clone Portlet content from- Returns:
- the newly created PortalPage with its new id
-
update
Updates the specified PortalPage in the database- Parameters:
portalPage- the PortalPage to update- Returns:
- the newly updated PortalPage
-
delete
Deletes the PortalPage with the specified portalPageId- Parameters:
portalPageId- the id of the PortalPage to delete
-
saveLegacyPortletConfiguration
This can be called to save aPortletConfigurationobject inside aPortalPageobject to the underlying database store.- Parameters:
portletConfiguration- The portletConfiguration to save.
-
getPortletConfigurations
Returns a sorted immutable list of lists of portletconfigurations for a particular portal page. The outer list represents columns and the inner lists represent rows within a column. This method will return portlet configs sorted correctly as returned by the underlying persistance layer.- Parameters:
portalPageId- The portal page id to fetch portlet configs for- Returns:
- immutable list of lists representing portletconfigs on a dashboard
-
SharedEntityAccessor.search(com.atlassian.jira.sharing.search.SharedEntitySearchParameters, com.atlassian.jira.user.ApplicationUser, int, int)