|
||||||||||
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 | |
---|---|
PortletConfiguration |
addPortalPagePortletConfiguration(JiraServiceContext serviceCtx,
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(JiraServiceContext serviceCtx,
PortalPage portalPage,
Long portletConfigId)
Make a new copy of a PortletConfiguration on a PortalPage. |
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)
Called to create and store the specified portalPage into the database by cloning its Portlet content from an existing PortalPage object. |
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(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. |
PortalPage |
deletePortalPagePortletConfiguration(JiraServiceContext serviceCtx,
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. |
Collection |
getFavouritePortalPages(User user)
Retrieve all PortalPage 's a user has favourited. |
Collection |
getNonPrivatePortalPages(User user)
Get a user's non private PortalPage 's. |
Collection |
getOwnedPortalPages(User user)
Retrieve all PortalPage 's a user owns/has created. |
PortalPage |
getPortalPage(JiraServiceContext servceCtx,
Long portalPageId)
Retrieve a given PortalPage by id. |
Collection |
getPortalPagesFavouritedByOthers(User user)
Get PortalPage 's owned by a given user that have been favourited by at least one other user |
PortalPage |
getSystemDefaultPortalPage()
This returns the System Default PortalPage as defined by the JIRA Administrators |
Portlet |
getVisiblePortlet(JiraServiceContext serviceCtx,
String portletKey)
This returns a Portlet if the user can see it |
Collection |
getVisiblePortlets(JiraServiceContext serviceCtx)
This returns a collections of the all the Portlet 's a user can see |
void |
increasePortalPageSequence(JiraServiceContext serviceCtx,
Long portalPageId)
Increases the position of the page configuration in the user's page configuration set |
boolean |
isFavourite(User user,
PortalPage portalPage)
Is the passed PortalPage a favourite of the passed User. |
boolean |
isMultiplePortalPagesEnabled()
This returns TRUE if the user is allowed to create multiple PortalPage objects. |
PortalPage |
movePortletConfigurationToPortalPage(JiraServiceContext serviceCtx,
PortalPage srcPortalPage,
PortalPage targetPortalPage,
Long portletConfigId)
Move a PortletConfiguration from one PortalPage to another. |
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. |
PortalPage |
saveAllPortalPagePortletConfiguration(JiraServiceContext serviceCtx,
PortalPage portalPage)
This can be called to save the PortletConfiguration objects inside a PortalPage object to the
underlying database store. |
PortalPage |
savePortalPagePortletConfiguration(JiraServiceContext serviceCtx,
PortalPage portalPage,
Long portletConfigId)
Save a specific PortletConfiguration inside the passed PortalPage to a
database store. |
SharedEntitySearchResult |
search(JiraServiceContext serviceCtx,
SharedEntitySearchParameters searchParameters,
int pagePosition,
int pageWidth)
Search for the PortalPages that match the passed SearchParameters. |
PortalPage |
updatePortalPage(JiraServiceContext serviceCtx,
PortalPage portalPage)
Updates the specified PortalPage in the database |
PortalPage |
updatePortalPage(JiraServiceContext serviceCtx,
PortalPage portalPage,
boolean isFavourite)
Updates the specified PortalPage in the database |
boolean |
validateForAddPortalPagePortletConfiguration(JiraServiceContext serviceCtx,
PortalPage portalPage,
String portletKey,
int suggestedColumn,
int suggestedRow)
Called to validate that a Portlet can be added to the PortalPage |
boolean |
validateForChangePortalPageSequence(JiraServiceContext serviceCtx,
Long portalPageId)
Called to validate that sequence of a PortalPage can be changed. |
boolean |
validateForCopyPortletConfigurationInPortalPage(JiraServiceContext serviceCtx,
PortalPage portalPage,
Long portletConfigId)
Check that it is possible to copy the PortletConfiguration on the passed PortalPage. |
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 |
validateForDeletePortalPagePortletConfiguration(JiraServiceContext serviceCtx,
PortalPage portalPage,
Long portletConfigId)
Make sure that the user can delete identified PortletConfiguration object from the inside of the
PortalPage . |
boolean |
validateForMovePortletConfigurationToPortalPage(JiraServiceContext serviceCtx,
PortalPage srcPortalPage,
PortalPage targetPortalPage,
Long portletConfigId)
Check that it is possible to move a PortletConfiguration from one PortalPage to another. |
boolean |
validateForSaveAllPortalPagePortletConfiguration(JiraServiceContext jiraServiceContext,
PortalPage portalPage)
Make sure that the user can save all the PortletConfiguration inside the
PortalPage . |
boolean |
validateForSavePortalPagePortletConfiguration(JiraServiceContext jiraServiceContext,
PortalPage portalPage,
Long portletConfigId)
Make sure that the user can save a specific PortletConfiguration inside the passed
PortalPage . |
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 getFavouritePortalPages(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(User user, PortalPage portalPage)
user
- the user to check.portalPage
- the page to check.
Collection getOwnedPortalPages(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 getNonPrivatePortalPages(User user)
PortalPage
's. I.e. PortalPage
's that other users can possibly see.
user
- The author of the PortalPage
's
Collection getPortalPagesFavouritedByOthers(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 isMultiplePortalPagesEnabled()
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)
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)
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
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-sequenceboolean validateForSaveAllPortalPagePortletConfiguration(JiraServiceContext jiraServiceContext, PortalPage portalPage)
PortletConfiguration
inside the
PortalPage
.
jiraServiceContext
- the context of the service callportalPage
- the PortalPage in question
PortalPage saveAllPortalPagePortletConfiguration(JiraServiceContext serviceCtx, PortalPage portalPage)
PortletConfiguration
objects inside a PortalPage
object to the
underlying database store.
serviceCtx
- the context of the service callportalPage
- the PortalPage in question
boolean validateForSavePortalPagePortletConfiguration(JiraServiceContext jiraServiceContext, PortalPage portalPage, Long portletConfigId)
PortletConfiguration
inside the passed
PortalPage
.
jiraServiceContext
- the context of the service callportalPage
- the PortalPage in questionportletConfigId
- the id of the configuration that should be saved.
PortalPage savePortalPagePortletConfiguration(JiraServiceContext serviceCtx, PortalPage portalPage, Long portletConfigId)
PortletConfiguration
inside the passed PortalPage
to a
database store.
serviceCtx
- the context of the service callportalPage
- the PortalPage in questionportletConfigId
- the configuration to copy.
boolean validateForDeletePortalPagePortletConfiguration(JiraServiceContext serviceCtx, PortalPage portalPage, Long portletConfigId)
PortletConfiguration
object from the inside of the
PortalPage
.
serviceCtx
- the context of the service callportalPage
- the PortalPage in questionportletConfigId
- the id of the PortletConfiguration inside the PortalPage
PortalPage deletePortalPagePortletConfiguration(JiraServiceContext serviceCtx, PortalPage portalPage, Long portletConfigId)
PortletConfiguration
object by id inside a PortalPage
object
from the underlying database store.
serviceCtx
- the context of the service callportalPage
- the PortalPage in questionportletConfigId
- the id of the PortletConfiguration inside the PortalPage
boolean validateForAddPortalPagePortletConfiguration(JiraServiceContext serviceCtx, PortalPage portalPage, String portletKey, int suggestedColumn, int suggestedRow)
Portlet
can be added to the PortalPage
serviceCtx
- the context of the service callportalPage
- the PortalPage to add the Portlet toportletKey
- the key of the Portlet to addsuggestedColumn
- the suggested column inside the PortalPagesuggestedRow
- the suggested row inside the PortalPage
PortletConfiguration addPortalPagePortletConfiguration(JiraServiceContext serviceCtx, PortalPage portalPage, String portletKey, int suggestedColumn, int suggestedRow)
Portlet
to the PortalPage and returns the [@link PortletConfiguration} that represents the newly added
configuration.
serviceCtx
- the context of the service callportalPage
- the PortalPage to add the Portlet toportletKey
- the key of the Portlet to addsuggestedColumn
- the suggested column inside the PortalPagesuggestedRow
- the suggested row inside the PortalPage
boolean validateForCopyPortletConfigurationInPortalPage(JiraServiceContext serviceCtx, PortalPage portalPage, Long portletConfigId)
serviceCtx
- the context of the service call.portalPage
- the PortalPage that contains the PortletConfiguration to copy.portletConfigId
- the id of the PortletConfiguration to copy.
PortalPage copyPortletConfigurationInPortalPage(JiraServiceContext serviceCtx, PortalPage portalPage, Long portletConfigId)
serviceCtx
- the context of the service callportalPage
- the PortalPage that contains the PortletConfiguration to copy.portletConfigId
- the id of the PortletConfiguration to copy. It must be attached to the passed PortalPage.
boolean validateForMovePortletConfigurationToPortalPage(JiraServiceContext serviceCtx, PortalPage srcPortalPage, PortalPage targetPortalPage, Long portletConfigId)
serviceCtx
- the context of the service call.srcPortalPage
- the PortalPage that contains the PortletConfiguration to move.targetPortalPage
- the PortalPage to receive the PortletConfiguration.portletConfigId
- the id of the PortletConfiguration to move.
PortalPage movePortletConfigurationToPortalPage(JiraServiceContext serviceCtx, PortalPage srcPortalPage, PortalPage targetPortalPage, Long portletConfigId)
serviceCtx
- the context of the service call.srcPortalPage
- the PortalPage that contains the PortletConfiguration to move.targetPortalPage
- the PortalPage to receive the PortletConfiguration.portletConfigId
- the id of the PortletConfiguration to move.
boolean canUserSeePortlet(User user, String portletKey)
user
- the user to check.portletKey
- the plugin id of the portlet to test.
boolean canUserSeePortlet(User user, Portlet portlet)
user
- the user to check.portlet
- the portlet to test.
Collection getVisiblePortlets(JiraServiceContext serviceCtx)
Portlet
's a user can see
serviceCtx
- the context of the service call
Portlet
's the user can seePortlet getVisiblePortlet(JiraServiceContext serviceCtx, String portletKey)
Portlet
if the user can see it
serviceCtx
- the context of the service callportletKey
- the plugin id of the portlet to test.
Portlet
if the user can see itvoid validateForSearch(JiraServiceContext serviceCtx, SharedEntitySearchParameters searchParameters)
serviceCtx
- Context containing user, error collection and i18n beansearchParameters
- the SharedEntitySearchParameters to validateSharedEntitySearchResult 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(User user)
user
- The user to clean up after.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |