com.atlassian.jira.portal
Interface PortalPageManager

All Superinterfaces:
SharedEntityAccessor
All Known Implementing Classes:
DefaultPortalPageManager

public interface PortalPageManager
extends SharedEntityAccessor

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
 PortletConfiguration addPortalPagePortletConfiguration(PortalPage portalPage, String portletKey, int suggestedColumn, int suggestedRow)
          Adds a Portlet to the PortalPage and returns the [@link PortletConfiguration} that represents the newly added configuration.
 boolean canUserSeePortlet(User user, Portlet portlet)
          Returns true if the user is able to view the passed portlet.
 boolean canUserSeePortlet(User user, String portletKey)
          Returns true if the user is able to view the Portlet identified by portletKey.
 PortalPage copyPortletConfigurationInPortalPage(PortalPage portalPage, Long portletConfigId)
          Make a new copy of a PortletConfiguration on a PortalPage.
 PortalPage create(PortalPage portalPage)
          Creates the specified PortalPage in the database
 PortalPage createBasedOnClone(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
 PortalPage deletePortalPagePortletConfiguration(PortalPage portalPage, Long portletConfigId)
          This can be called to delete a specific PortletConfiguration object by id inside a PortalPage object from the underlying database store.
 boolean doesPortletExist(String portletKey)
          This is called to see if the specified portlet plugin, identified by portletKey, exists at all.
 Collection getAllOwnedPortalPages(User owner)
          Returns a Collection of PortalPage objects that are owned by the specified User
 PortalPage getPortalPage(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(User owner, String pageName)
          Returns a PortalPage by searching for it by owner and pageName.
 String getPortalPageOwnerUserName(Long portalPageId)
          Returns the user name of the user who owns the specified PortalPage
 PortalPage getSystemDefaultPortalPage()
          Returns the system default PortalPage.
 Portlet getVisiblePortlet(User user, String portletKey)
          Returns a Portlet if the user can see it
 Collection getVisiblePortlets(User user)
          This returns a collections of the all the Portlet's a user can see
 PortalPage movePortletConfigurationToPortalPage(PortalPage srcPortalPage, PortalPage targetPortalPage, Long portletConfigId)
          Move a PortletConfiguration from one PortalPage to another.
 PortalPage saveAllPortalPagePortletConfiguration(PortalPage portalPage)
          This can be called to save the PortletConfiguration objects inside a PortalPage object to the underlying database store.
 PortalPage savePortalPagePortletConfiguration(PortalPage portalPage, Long portletConfigId)
          This can be called to save a PortletConfiguration object inside a PortalPage object to the underlying database store.
 SharedEntitySearchResult search(SharedEntitySearchParameters searchParameters, 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, getAll, getSharedEntity, getSharedEntity, getType, hasPermissionToUse
 

Method Detail

getPortalPage

PortalPage getPortalPage(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 getAllOwnedPortalPages(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

getPortalPageOwnerUserName

String getPortalPageOwnerUserName(Long portalPageId)
Returns the user name of the user who owns the specified PortalPage

Parameters:
portalPageId - the id of the PortalPage
Returns:
the user name of the owner of the PortalPage or null if there is not one

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(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(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

addPortalPagePortletConfiguration

PortletConfiguration addPortalPagePortletConfiguration(PortalPage portalPage,
                                                       String portletKey,
                                                       int suggestedColumn,
                                                       int suggestedRow)
Adds a Portlet to the PortalPage and returns the [@link PortletConfiguration} that represents the newly added configuration.

Parameters:
portalPage - the PortalPage to add the Portlet to
portletKey - the key of the Portlet to add
suggestedColumn - the suggested column inside the PortalPage
suggestedRow - the suggested row inside the PortalPage
Returns:
a PortletConfiguration representing where the Portlet was placed. The PortalPage may in fact renumber where the PP was placed.

saveAllPortalPagePortletConfiguration

PortalPage saveAllPortalPagePortletConfiguration(PortalPage portalPage)
This can be called to save the PortletConfiguration objects inside a PortalPage object to the underlying database store.

Parameters:
portalPage - the PortalPage in question
Returns:
a newly refreshed PortalPage object whose internals reflects what has been saved

savePortalPagePortletConfiguration

PortalPage savePortalPagePortletConfiguration(PortalPage portalPage,
                                              Long portletConfigId)
This can be called to save a PortletConfiguration object inside a PortalPage object to the underlying database store.

Parameters:
portalPage - the PortalPage in question
portletConfigId - the id of the PortletConfiguration inside the PortalPage.
Returns:
a newly refreshed PortalPage object whose internals reflects what has been saved

deletePortalPagePortletConfiguration

PortalPage deletePortalPagePortletConfiguration(PortalPage portalPage,
                                                Long portletConfigId)
This can be called to delete a specific PortletConfiguration object by id inside a PortalPage object from the underlying database store.

Parameters:
portalPage - the PortalPage in question
portletConfigId - the id of the PortletConfiguration inside the PortalPage
Returns:
a newly refreshed PortalPage object whose internals reflects what has been changed

copyPortletConfigurationInPortalPage

PortalPage copyPortletConfigurationInPortalPage(PortalPage portalPage,
                                                Long portletConfigId)
Make a new copy of a PortletConfiguration on a PortalPage.

Parameters:
portalPage - the PortalPage that contains the PortletConfiguration to copy.
portletConfigId - the id of the PortletConfiguration to copy. It must be attached to the passed PortalPage.
Returns:
the new PortalPage with the copied PortletConfiguration. Null will be returned on error.

movePortletConfigurationToPortalPage

PortalPage movePortletConfigurationToPortalPage(PortalPage srcPortalPage,
                                                PortalPage targetPortalPage,
                                                Long portletConfigId)
Move a PortletConfiguration from one PortalPage to another.

Parameters:
srcPortalPage - the PortalPage that contains the PortletConfiguration to move.
targetPortalPage - the PortalPage to receive the PortletConfiguration.
portletConfigId - the id of the PortletConfiguration to move.
Returns:
the changed targetPortalPage or null if the call failed.

canUserSeePortlet

boolean canUserSeePortlet(User user,
                          String portletKey)
Returns true if the user is able to view the Portlet identified by portletKey.

Parameters:
user - the user to test.
portletKey - the plugin id of the portlet to test.
Returns:
true if the user is able to view the Portlet identified by portletKey.

canUserSeePortlet

boolean canUserSeePortlet(User user,
                          Portlet portlet)
Returns true if the user is able to view the passed portlet.

Parameters:
user - the user to test.
portlet - the portlet to check.
Returns:
true if the user is able to view the Portlet identified by portletKey.

doesPortletExist

boolean doesPortletExist(String portletKey)
This is called to see if the specified portlet plugin, identified by portletKey, exists at all.

Parameters:
portletKey - the identifier of the Portlet
Returns:
true if the Portlet exists

getVisiblePortlets

Collection getVisiblePortlets(User user)
This returns a collections of the all the Portlet's a user can see

Parameters:
user - the user in play
Returns:
a list of Portlet's the user can see

getVisiblePortlet

Portlet getVisiblePortlet(User user,
                          String portletKey)
Returns a Portlet if the user can see it

Parameters:
user - the User in play
portletKey - the plugin id of the Portlet
Returns:
a Portlet if the user can see it

search

SharedEntitySearchResult search(SharedEntitySearchParameters searchParameters,
                                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.


Copyright © 2002-2008 Atlassian. All Rights Reserved.