|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortalPageService
The PortalPageService is the top level service for Dashboard operations.
For historical reasons, Dashboards where called Portals and hence the prefix "Portal" is used consistently throughout the code.
Method Summary | |
---|---|
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(com.atlassian.crowd.embedded.api.User 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(com.atlassian.crowd.embedded.api.User user)
Retrieve all PortalPage 's a user has favourited. |
Collection<PortalPage> |
getNonPrivatePortalPages(com.atlassian.crowd.embedded.api.User user)
Get a user's non private PortalPage 's. |
Collection<PortalPage> |
getOwnedPortalPages(com.atlassian.crowd.embedded.api.User 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(com.atlassian.crowd.embedded.api.User 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(com.atlassian.crowd.embedded.api.User 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,
com.atlassian.crowd.embedded.api.User 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 |
Method Detail |
---|
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(com.atlassian.crowd.embedded.api.User 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 with
PortalPage
objects that represent PortalPage
's the user has favourited.boolean isFavourite(com.atlassian.crowd.embedded.api.User user, PortalPage portalPage)
user
- the user to check.portalPage
- the page to check.
Collection<PortalPage> getOwnedPortalPages(com.atlassian.crowd.embedded.api.User 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(com.atlassian.crowd.embedded.api.User user)
PortalPage
's. I.e. PortalPage
's that other users can possibly see.
user
- The author of the PortalPage
's
Collection<PortalPage> getPortalPagesFavouritedByOthers(com.atlassian.crowd.embedded.api.User user)
PortalPage
's owned by a given user that have been favourited by at least one other user
user
- The author of the PortalPage
's
PortalPage getSystemDefaultPortalPage()
boolean validateForCreate(JiraServiceContext serviceCtx, PortalPage portalPage)
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage object that is to be validated for create
PortalPage createPortalPage(JiraServiceContext serviceCtx, PortalPage portalPage)
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage object that is to be created
PortalPage 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 favourite
boolean 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 clone
PortalPage 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 favourite
boolean validateForDelete(JiraServiceContext serviceCtx, Long portalPageId)
serviceCtx
- the JiraServiceContext in playportalPageId
- the id of the PortalPage to delete
void 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 update
PortalPage 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 favourite
PortalPage updatePortalPageUnconditionally(JiraServiceContext serviceCtx, com.atlassian.crowd.embedded.api.User user, PortalPage portalPage)
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage to updateuser
- must be admin in order to make the change
boolean validateForChangePortalPageSequence(JiraServiceContext serviceCtx, Long portalPageId)
serviceCtx
- the context of the service callportalPageId
- the id of the PortalPage to re-sequence
void 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(com.atlassian.crowd.embedded.api.User 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 get
List<List<PortletConfiguration>> getPortletConfigurations(JiraServiceContext context, Long portalPageId)
context
- Context containing user, error collection and i18n beanportalPageId
- The id of the portal page to get
void validateForChangeOwner(JiraServiceContext ctx, PortalPage dashboard)
ctx
- Context containing user, error collection and i18n beandashboard
- the PortalPage to validate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |