com.atlassian.jira.portal
Interface PortalPageManager

All Superinterfaces:
SharedEntityAccessor<PortalPage>
All Known Implementing Classes:
DefaultPortalPageManager

public interface PortalPageManager
extends SharedEntityAccessor<PortalPage>

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
 PortalPage create(PortalPage portalPage)
          Creates the specified PortalPage in the database
 PortalPage createBasedOnClone(com.atlassian.crowd.embedded.api.User pageOwner, PortalPage portalPage, PortalPage clonePortalPage)
          Creates a PortalPage in the database by cloning its Portlet content from the specified clonePortalPage
 void delete(Long portalPageId)
          Deletes the PortalPage with the specified portalPageId
 Collection<PortalPage> getAllOwnedPortalPages(com.atlassian.crowd.embedded.api.User owner)
          Returns a Collection of PortalPage objects that are owned by the specified User
 PortalPage getPortalPage(com.atlassian.crowd.embedded.api.User user, Long portalPageId)
          Returns the PortalPage with the specified portalPageId, IF the user is allowed to see it.
 PortalPage getPortalPageById(Long portalPageId)
          Gets a PortalPage by id regardless of owner
 PortalPage getPortalPageByName(com.atlassian.crowd.embedded.api.User owner, String pageName)
          Returns a PortalPage by searching for it by owner and pageName.
 List<List<PortletConfiguration>> getPortletConfigurations(Long portalPageId)
          Returns a sorted immutable list of lists of portletconfigurations for a particular portal page.
 PortalPage getSystemDefaultPortalPage()
          Returns the system default PortalPage.
 void saveLegacyPortletConfiguration(PortletConfiguration portletConfiguration)
          This can be called to save a PortletConfiguration object inside a PortalPage object to the underlying database store.
 SharedEntitySearchResult<PortalPage> search(SharedEntitySearchParameters searchParameters, com.atlassian.crowd.embedded.api.User user, int pagePosition, int pageWidth)
          Search for the PortalPages that match the passed SearchParameters.
 PortalPage update(PortalPage portalPage)
          Updates the specified PortalPage in the database
 
Methods inherited from interface com.atlassian.jira.sharing.SharedEntityAccessor
adjustFavouriteCount, get, get, getAll, getAllIndexableSharedEntities, getSharedEntity, getSharedEntity, getType, hasPermissionToUse
 

Method Detail

getPortalPage

PortalPage getPortalPage(com.atlassian.crowd.embedded.api.User user,
                         Long portalPageId)
Returns the PortalPage with the specified portalPageId, IF the user is allowed to see it.

Parameters:
user - the User in play
portalPageId - 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

Collection<PortalPage> getAllOwnedPortalPages(com.atlassian.crowd.embedded.api.User owner)
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

getPortalPageById

PortalPage getPortalPageById(Long portalPageId)
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

PortalPage getPortalPageByName(com.atlassian.crowd.embedded.api.User owner,
                               String pageName)
Returns a PortalPage by searching for it by owner and pageName.

Parameters:
owner - the owner in play
pageName - 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

PortalPage create(PortalPage portalPage)
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(com.atlassian.crowd.embedded.api.User 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 page
portalPage - the PortalPage to create
clonePortalPage - the PortalPage to clone Portlet content from
Returns:
the newly created PortalPage with its new id

update

PortalPage update(PortalPage portalPage)
Updates the specified PortalPage in the database

Parameters:
portalPage - the PortalPage to update
Returns:
the newly updated PortalPage

delete

void delete(Long portalPageId)
Deletes the PortalPage with the specified portalPageId

Parameters:
portalPageId - the id of the PortalPage to delete

saveLegacyPortletConfiguration

void saveLegacyPortletConfiguration(PortletConfiguration portletConfiguration)
This can be called to save a PortletConfiguration object inside a PortalPage object to the underlying database store.

Parameters:
portletConfiguration - The portletConfiguration to save.

search

SharedEntitySearchResult<PortalPage> search(SharedEntitySearchParameters searchParameters,
                                            com.atlassian.crowd.embedded.api.User user,
                                            int pagePosition,
                                            int pageWidth)
Search for the PortalPages that match the passed SearchParameters. The result can be paged so that a subset of the results can be returned.

Parameters:
searchParameters - the SearchParameters to query.
user - the user performing the search.
pagePosition - the page to return.
pageWidth - the number of results per page.
Returns:
the result containing the PortalPages objects that match the request.

getPortletConfigurations

List<List<PortletConfiguration>> getPortletConfigurations(Long portalPageId)
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


Copyright © 2002-2012 Atlassian. All Rights Reserved.