@PublicApi
public interface PortalPageService
Modifier and Type | Method and Description |
---|---|
PortalPage |
createPortalPage(JiraServiceContext serviceCtx,
PortalPage portalPage)
Called to create and store the specified portalPage into the database.
|
PortalPage |
createPortalPage(JiraServiceContext serviceCtx,
PortalPage portalPage,
boolean isFavourite)
Called to create and store the specified portalPage into the database.
|
PortalPage |
createPortalPageByClone(JiraServiceContext serviceCtx,
PortalPage portalPage,
Long clonePortalPageId,
boolean isFavourite)
Called to create and store the specified portalPage into the database by cloning its Portlet content from an existing PortalPage object.
|
void |
decreasePortalPageSequence(JiraServiceContext serviceCtx,
Long portalPageId)
Decreases the position of the page configuration in the user's page configuration set.
|
void |
deleteAllPortalPagesForUser(ApplicationUser user)
Delete all Portal Pages owned by a user.
|
void |
deletePortalPage(JiraServiceContext serviceCtx,
Long portalPageId)
Called to delete the PortalPage with the specified portalPageId.
|
Collection<PortalPage> |
getFavouritePortalPages(ApplicationUser user)
Retrieve all
PortalPage 's a user has favourited. |
Collection<PortalPage> |
getNonPrivatePortalPages(ApplicationUser user)
Get a user's non private
PortalPage 's. |
Collection<PortalPage> |
getOwnedPortalPages(ApplicationUser user)
Retrieve all
PortalPage 's a user owns/has created. |
PortalPage |
getPortalPage(JiraServiceContext servceCtx,
Long portalPageId)
Retrieve a given
PortalPage by id. |
Collection<PortalPage> |
getPortalPagesFavouritedByOthers(ApplicationUser user)
Get
PortalPage 's owned by a given user that have been favourited by at least one other user |
List<List<PortletConfiguration>> |
getPortletConfigurations(JiraServiceContext context,
Long portalPageId)
Returns all portlet configurations for a particular dashboard in colums and rows.
|
PortalPage |
getSystemDefaultPortalPage()
This returns the System Default PortalPage as defined by the JIRA Administrators
|
void |
increasePortalPageSequence(JiraServiceContext serviceCtx,
Long portalPageId)
Increases the position of the page configuration in the user's page configuration set
|
boolean |
isFavourite(ApplicationUser user,
PortalPage portalPage)
Is the passed PortalPage a favourite of the passed User.
|
void |
moveToEndPortalPageSequence(JiraServiceContext serviceCtx,
Long portalPageId)
Puts the given page to the end of the user's page configuration set.
|
void |
moveToStartPortalPageSequence(JiraServiceContext serviceCtx,
Long portalPageId)
Puts the given page to the start of the user's page configuration set.
|
void |
saveLegacyPortletConfiguration(JiraServiceContext serviceCtx,
PortletConfiguration portletConfiguration)
Save a specific
PortletConfiguration to a
database store. |
SharedEntitySearchResult<PortalPage> |
search(JiraServiceContext serviceCtx,
SharedEntitySearchParameters searchParameters,
int pagePosition,
int pageWidth)
Search for the PortalPages that match the passed SearchParameters.
|
PortalPage |
updatePortalPage(JiraServiceContext serviceCtx,
PortalPage portalPage,
boolean isFavourite)
Updates the specified PortalPage in the database
|
PortalPage |
updatePortalPageUnconditionally(JiraServiceContext serviceCtx,
ApplicationUser user,
PortalPage portalPage)
Updates the specified PortalPage in the database , no permission checks are applied, but the user must be an administrator
|
void |
validateForChangeOwner(JiraServiceContext ctx,
PortalPage dashboard)
This will validate that the dashboard page can be changed to the new owbner.
|
boolean |
validateForChangePortalPageSequence(JiraServiceContext serviceCtx,
Long portalPageId)
Called to validate that sequence of a PortalPage can be changed.
|
boolean |
validateForCreate(JiraServiceContext serviceCtx,
PortalPage portalPage)
Called to validate that the PortalPage object is in a valid state for creation.
|
boolean |
validateForCreatePortalPageByClone(JiraServiceContext serviceCtx,
PortalPage portalPage,
Long clonePortalPageId)
Called to validate that a new PortalPage can be created by cloning its Portlet content from an existing PortalPage object.
|
boolean |
validateForDelete(JiraServiceContext serviceCtx,
Long portalPageId)
Called to validate that the specified portalPage with the portalPageId can be deleted.
|
boolean |
validateForGetPortalPage(JiraServiceContext context,
Long portalPageId)
Check if the user in the service context has permission to get the portal page with the id provided.
|
void |
validateForSearch(JiraServiceContext serviceCtx,
SharedEntitySearchParameters searchParameters)
This will validate that the input parameters are valid for a search that encompasses ANY share entity type.
|
boolean |
validateForUpdate(JiraServiceContext serviceCtx,
PortalPage portalPage)
Called to validate that the PortalPage can be be updated
|
PortalPage getPortalPage(JiraServiceContext servceCtx, Long portalPageId)
PortalPage
by id.servceCtx
- JIRA Service context containing an error collection and user requesting (to run) the
PortalPage
. The PortalPage
must exist and the user must be able to
see PortalPage
else an error will result.portalPageId
- The id of the PortalPage
to retrieve. Id must not be null.Collection<PortalPage> getFavouritePortalPages(ApplicationUser user)
PortalPage
's a user has favourited. Permission checks are done to ensure the user can see the PortalPage
, as
visibility may have been removed from underneath them.user
- The user who has favourite PortalPage
's. Also to test visibility and withPortalPage
objects that represent PortalPage
's the user has favourited.boolean isFavourite(ApplicationUser user, PortalPage portalPage)
user
- the user to check.portalPage
- the page to check.Collection<PortalPage> getOwnedPortalPages(ApplicationUser user)
PortalPage
's a user owns/has created.user
- The user who created the PortalPage
's.PortalPage
objects that represent PortalPage
's the user has created.Collection<PortalPage> getNonPrivatePortalPages(ApplicationUser user)
PortalPage
's. I.e. PortalPage
's that other users can possibly see.user
- The author of the PortalPage
'sCollection<PortalPage> getPortalPagesFavouritedByOthers(ApplicationUser user)
PortalPage
's owned by a given user that have been favourited by at least one other useruser
- The author of the PortalPage
'sPortalPage getSystemDefaultPortalPage()
boolean validateForCreate(JiraServiceContext serviceCtx, PortalPage portalPage)
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage object that is to be validated for createPortalPage createPortalPage(JiraServiceContext serviceCtx, PortalPage portalPage)
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage object that is to be createdPortalPage createPortalPage(JiraServiceContext serviceCtx, PortalPage portalPage, boolean isFavourite)
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage object that is to be createdisFavourite
- set to true if the PortalPage should be marked as a favouriteboolean validateForCreatePortalPageByClone(JiraServiceContext serviceCtx, PortalPage portalPage, Long clonePortalPageId)
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage object that is to be createdclonePortalPageId
- the id of an existing PortalPage to clonePortalPage createPortalPageByClone(JiraServiceContext serviceCtx, PortalPage portalPage, Long clonePortalPageId, boolean isFavourite)
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage object that is to be createdclonePortalPageId
- the id of an existing PortalPage to cloneisFavourite
- set to true if the PortalPage should be marked as a favouriteboolean validateForDelete(JiraServiceContext serviceCtx, Long portalPageId)
serviceCtx
- the JiraServiceContext in playportalPageId
- the id of the PortalPage to deletevoid deletePortalPage(JiraServiceContext serviceCtx, Long portalPageId)
serviceCtx
- the JiraServiceContext in playportalPageId
- the id of the PortalPage to deleteboolean validateForUpdate(JiraServiceContext serviceCtx, PortalPage portalPage)
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage to updatePortalPage updatePortalPage(JiraServiceContext serviceCtx, PortalPage portalPage, boolean isFavourite)
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage to updateisFavourite
- set to true if the PortalPage is to be marked as a favouritePortalPage updatePortalPageUnconditionally(JiraServiceContext serviceCtx, ApplicationUser user, PortalPage portalPage)
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage to updateuser
- must be admin in order to make the changeboolean validateForChangePortalPageSequence(JiraServiceContext serviceCtx, Long portalPageId)
serviceCtx
- the context of the service callportalPageId
- the id of the PortalPage to re-sequencevoid increasePortalPageSequence(JiraServiceContext serviceCtx, Long portalPageId)
serviceCtx
- the context of the service callportalPageId
- the id of the PortalPage to re-sequencevoid decreasePortalPageSequence(JiraServiceContext serviceCtx, Long portalPageId)
serviceCtx
- the context of the service callportalPageId
- the id of the PortalPage to re-sequencevoid moveToStartPortalPageSequence(JiraServiceContext serviceCtx, Long portalPageId)
serviceCtx
- the context of the service callportalPageId
- the id of the PortalPage to re-sequencevoid moveToEndPortalPageSequence(JiraServiceContext serviceCtx, Long portalPageId)
serviceCtx
- the context of the service callportalPageId
- the id of the PortalPage to re-sequencevoid saveLegacyPortletConfiguration(JiraServiceContext serviceCtx, PortletConfiguration portletConfiguration)
PortletConfiguration
to a
database store.serviceCtx
- the context of the service callportletConfiguration
- The portletConfiguration to updatevoid validateForSearch(JiraServiceContext serviceCtx, SharedEntitySearchParameters searchParameters)
serviceCtx
- Context containing user, error collection and i18n beansearchParameters
- the SharedEntitySearchParameters to validateSharedEntitySearchResult<PortalPage> search(JiraServiceContext serviceCtx, SharedEntitySearchParameters searchParameters, int pagePosition, int pageWidth)
serviceCtx
- Context containing user, error collection and i18n beansearchParameters
- the searchParameters to query.pagePosition
- the page to return.pageWidth
- the number of results per page.void deleteAllPortalPagesForUser(ApplicationUser user)
user
- The user to clean up after.boolean validateForGetPortalPage(JiraServiceContext context, Long portalPageId)
context
- Context containing user, error collection and i18n beanportalPageId
- The id of the portal page to getList<List<PortletConfiguration>> getPortletConfigurations(JiraServiceContext context, Long portalPageId)
context
- Context containing user, error collection and i18n beanportalPageId
- The id of the portal page to getvoid validateForChangeOwner(JiraServiceContext ctx, PortalPage dashboard)
ctx
- Context containing user, error collection and i18n beandashboard
- the PortalPage to validateCopyright © 2002-2015 Atlassian. All Rights Reserved.