|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.bc.portal.AbstractPortalPageService
public abstract class AbstractPortalPageService
The base class for PortalPageService implementations
Constructor Summary | |
---|---|
protected |
AbstractPortalPageService(PortalPageManager portalPageManager,
ShareTypeValidatorUtils shareTypeValidatorUtils,
FavouritesManager favouritesManager,
PermissionManager permissionManager,
UserUtil userUtil)
|
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. |
protected abstract boolean |
canClonePortalPage(PortalPage pageToClone)
This is expected to return a PortalPage IF the specified id is a valid PortalPage to clone. |
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. |
protected abstract boolean |
checkSystemDefaultSharePermissions(JiraServiceContext serviceCtx,
SharedEntity.SharePermissions sharePermissions)
Check that the passed permissions are valid for the System Dashboard. |
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 context,
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. |
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 serviceCtx,
PortalPage portalPage)
Make sure that the user can save all the PortletConfiguration inside the
PortalPage . |
boolean |
validateForSavePortalPagePortletConfiguration(JiraServiceContext serviceCtx,
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.jira.bc.portal.PortalPageService |
---|
isMultiplePortalPagesEnabled |
Constructor Detail |
---|
protected AbstractPortalPageService(PortalPageManager portalPageManager, ShareTypeValidatorUtils shareTypeValidatorUtils, FavouritesManager favouritesManager, PermissionManager permissionManager, UserUtil userUtil)
Method Detail |
---|
public Collection getFavouritePortalPages(User user)
PortalPageService
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.
getFavouritePortalPages
in interface PortalPageService
user
- The user who has favourite PortalPage
's. Also to test visibility and with
PortalPage
objects that represent PortalPage
's the user has favourited.public boolean isFavourite(User user, PortalPage portalPage)
PortalPageService
isFavourite
in interface PortalPageService
user
- the user to check.portalPage
- the page to check.
public Collection getOwnedPortalPages(User user)
PortalPageService
PortalPage
's a user owns/has created.
getOwnedPortalPages
in interface PortalPageService
user
- The user who created the PortalPage
's.
PortalPage
objects that represent PortalPage
's the user has created.public Collection getNonPrivatePortalPages(User user)
PortalPageService
PortalPage
's. I.e. PortalPage
's that other users can possibly see.
getNonPrivatePortalPages
in interface PortalPageService
user
- The author of the PortalPage
's
public Collection getPortalPagesFavouritedByOthers(User user)
PortalPageService
PortalPage
's owned by a given user that have been favourited by at least one other user
getPortalPagesFavouritedByOthers
in interface PortalPageService
user
- The author of the PortalPage
's
public PortalPage getPortalPage(JiraServiceContext context, Long portalPageId)
PortalPageService
PortalPage
by id.
getPortalPage
in interface PortalPageService
context
- 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.
public PortalPage getSystemDefaultPortalPage()
PortalPageService
getSystemDefaultPortalPage
in interface PortalPageService
public boolean validateForCreate(JiraServiceContext serviceCtx, PortalPage portalPage)
PortalPageService
validateForCreate
in interface PortalPageService
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage object that is to be validated for create
public PortalPage createPortalPage(JiraServiceContext serviceCtx, PortalPage portalPage)
PortalPageService
createPortalPage
in interface PortalPageService
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage object that is to be created
public PortalPage createPortalPage(JiraServiceContext serviceCtx, PortalPage portalPage, boolean isFavourite)
PortalPageService
createPortalPage
in interface PortalPageService
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
public PortalPage createPortalPageByClone(JiraServiceContext serviceCtx, PortalPage portalPage, Long clonePortalPageId)
PortalPageService
createPortalPageByClone
in interface PortalPageService
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage object that is to be createdclonePortalPageId
- the id of an existing PortalPage to clone
public boolean validateForCreatePortalPageByClone(JiraServiceContext serviceCtx, PortalPage portalPage, Long clonePortalPageId)
PortalPageService
validateForCreatePortalPageByClone
in interface PortalPageService
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage object that is to be createdclonePortalPageId
- the id of an existing PortalPage to clone
public PortalPage createPortalPageByClone(JiraServiceContext serviceCtx, PortalPage portalPage, Long clonePortalPageId, boolean isFavourite)
PortalPageService
createPortalPageByClone
in interface PortalPageService
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
public boolean validateForDelete(JiraServiceContext serviceCtx, Long portalPageId)
PortalPageService
validateForDelete
in interface PortalPageService
serviceCtx
- the JiraServiceContext in playportalPageId
- the id of the PortalPage to delete
public void deleteAllPortalPagesForUser(User user)
PortalPageService
deleteAllPortalPagesForUser
in interface PortalPageService
user
- The user to clean up after.public void deletePortalPage(JiraServiceContext serviceCtx, Long portalPageId)
PortalPageService
deletePortalPage
in interface PortalPageService
serviceCtx
- the JiraServiceContext in playportalPageId
- the id of the PortalPage to deletepublic boolean validateForUpdate(JiraServiceContext serviceCtx, PortalPage portalPage)
PortalPageService
validateForUpdate
in interface PortalPageService
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage to update
public PortalPage updatePortalPage(JiraServiceContext serviceCtx, PortalPage portalPage)
PortalPageService
updatePortalPage
in interface PortalPageService
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage to update
public PortalPage updatePortalPage(JiraServiceContext serviceCtx, PortalPage portalPage, boolean isFavourite)
PortalPageService
updatePortalPage
in interface PortalPageService
serviceCtx
- the JiraServiceContext in playportalPage
- the PortalPage to updateisFavourite
- set to true if the PortalPage is to be marked as a favourite
public boolean validateForChangePortalPageSequence(JiraServiceContext serviceCtx, Long portalPageId)
PortalPageService
validateForChangePortalPageSequence
in interface PortalPageService
serviceCtx
- the context of the service callportalPageId
- the id of the PortalPage to re-sequence
public void increasePortalPageSequence(JiraServiceContext serviceCtx, Long portalPageId)
PortalPageService
increasePortalPageSequence
in interface PortalPageService
serviceCtx
- the context of the service callportalPageId
- the id of the PortalPage to re-sequencepublic void decreasePortalPageSequence(JiraServiceContext serviceCtx, Long portalPageId)
PortalPageService
decreasePortalPageSequence
in interface PortalPageService
serviceCtx
- the context of the service callportalPageId
- the id of the PortalPage to re-sequencepublic void moveToStartPortalPageSequence(JiraServiceContext serviceCtx, Long portalPageId)
PortalPageService
moveToStartPortalPageSequence
in interface PortalPageService
serviceCtx
- the context of the service callportalPageId
- the id of the PortalPage to re-sequencepublic void moveToEndPortalPageSequence(JiraServiceContext serviceCtx, Long portalPageId)
PortalPageService
moveToEndPortalPageSequence
in interface PortalPageService
serviceCtx
- the context of the service callportalPageId
- the id of the PortalPage to re-sequencepublic boolean validateForSaveAllPortalPagePortletConfiguration(JiraServiceContext serviceCtx, PortalPage portalPage)
PortalPageService
PortletConfiguration
inside the
PortalPage
.
validateForSaveAllPortalPagePortletConfiguration
in interface PortalPageService
serviceCtx
- the context of the service callportalPage
- the PortalPage in question
public PortalPage saveAllPortalPagePortletConfiguration(JiraServiceContext serviceCtx, PortalPage portalPage)
PortalPageService
PortletConfiguration
objects inside a PortalPage
object to the
underlying database store.
saveAllPortalPagePortletConfiguration
in interface PortalPageService
serviceCtx
- the context of the service callportalPage
- the PortalPage in question
public boolean validateForSavePortalPagePortletConfiguration(JiraServiceContext serviceCtx, PortalPage portalPage, Long portletConfigId)
PortalPageService
PortletConfiguration
inside the passed
PortalPage
.
validateForSavePortalPagePortletConfiguration
in interface PortalPageService
serviceCtx
- the context of the service callportalPage
- the PortalPage in questionportletConfigId
- the id of the configuration that should be saved.
public PortalPage savePortalPagePortletConfiguration(JiraServiceContext serviceCtx, PortalPage portalPage, Long portletConfigId)
PortalPageService
PortletConfiguration
inside the passed PortalPage
to a
database store.
savePortalPagePortletConfiguration
in interface PortalPageService
serviceCtx
- the context of the service callportalPage
- the PortalPage in questionportletConfigId
- the configuration to copy.
public boolean validateForDeletePortalPagePortletConfiguration(JiraServiceContext serviceCtx, PortalPage portalPage, Long portletConfigId)
PortalPageService
PortletConfiguration
object from the inside of the
PortalPage
.
validateForDeletePortalPagePortletConfiguration
in interface PortalPageService
serviceCtx
- the context of the service callportalPage
- the PortalPage in questionportletConfigId
- the id of the PortletConfiguration inside the PortalPage
public PortalPage deletePortalPagePortletConfiguration(JiraServiceContext serviceCtx, PortalPage portalPage, Long portletConfigId)
PortalPageService
PortletConfiguration
object by id inside a PortalPage
object
from the underlying database store.
deletePortalPagePortletConfiguration
in interface PortalPageService
serviceCtx
- the context of the service callportalPage
- the PortalPage in questionportletConfigId
- the id of the PortletConfiguration inside the PortalPage
public boolean validateForAddPortalPagePortletConfiguration(JiraServiceContext serviceCtx, PortalPage portalPage, String portletKey, int suggestedColumn, int suggestedRow)
PortalPageService
Portlet
can be added to the PortalPage
validateForAddPortalPagePortletConfiguration
in interface PortalPageService
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
public PortletConfiguration addPortalPagePortletConfiguration(JiraServiceContext serviceCtx, PortalPage portalPage, String portletKey, int suggestedColumn, int suggestedRow)
PortalPageService
Portlet
to the PortalPage and returns the [@link PortletConfiguration} that represents the newly added
configuration.
addPortalPagePortletConfiguration
in interface PortalPageService
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
public boolean validateForCopyPortletConfigurationInPortalPage(JiraServiceContext serviceCtx, PortalPage portalPage, Long portletConfigId)
PortalPageService
validateForCopyPortletConfigurationInPortalPage
in interface PortalPageService
serviceCtx
- the context of the service call.portalPage
- the PortalPage that contains the PortletConfiguration to copy.portletConfigId
- the id of the PortletConfiguration to copy.
public PortalPage copyPortletConfigurationInPortalPage(JiraServiceContext serviceCtx, PortalPage portalPage, Long portletConfigId)
PortalPageService
copyPortletConfigurationInPortalPage
in interface PortalPageService
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.
public boolean validateForMovePortletConfigurationToPortalPage(JiraServiceContext serviceCtx, PortalPage srcPortalPage, PortalPage targetPortalPage, Long portletConfigId)
PortalPageService
validateForMovePortletConfigurationToPortalPage
in interface PortalPageService
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.
public PortalPage movePortletConfigurationToPortalPage(JiraServiceContext serviceCtx, PortalPage srcPortalPage, PortalPage targetPortalPage, Long portletConfigId)
PortalPageService
movePortletConfigurationToPortalPage
in interface PortalPageService
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.
public boolean canUserSeePortlet(User user, String portletKey)
PortalPageService
canUserSeePortlet
in interface PortalPageService
user
- the user to check.portletKey
- the plugin id of the portlet to test.
public boolean canUserSeePortlet(User user, Portlet portlet)
PortalPageService
canUserSeePortlet
in interface PortalPageService
user
- the user to check.portlet
- the portlet to test.
public Collection getVisiblePortlets(JiraServiceContext serviceCtx)
PortalPageService
Portlet
's a user can see
getVisiblePortlets
in interface PortalPageService
serviceCtx
- the context of the service call
Portlet
's the user can seepublic Portlet getVisiblePortlet(JiraServiceContext serviceCtx, String portletKey)
PortalPageService
Portlet
if the user can see it
getVisiblePortlet
in interface PortalPageService
serviceCtx
- the context of the service callportletKey
- the plugin id of the portlet to test.
Portlet
if the user can see itpublic void validateForSearch(JiraServiceContext serviceCtx, SharedEntitySearchParameters searchParameters)
PortalPageService
validateForSearch
in interface PortalPageService
serviceCtx
- Context containing user, error collection and i18n beansearchParameters
- the SharedEntitySearchParameters to validatepublic SharedEntitySearchResult search(JiraServiceContext serviceCtx, SharedEntitySearchParameters searchParameters, int pagePosition, int pageWidth)
PortalPageService
search
in interface PortalPageService
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.
protected abstract boolean canClonePortalPage(PortalPage pageToClone)
pageToClone
- the PortalPage to clone
protected abstract boolean checkSystemDefaultSharePermissions(JiraServiceContext serviceCtx, SharedEntity.SharePermissions sharePermissions)
serviceCtx
- the JiraServiceContext in playsharePermissions
- the Set of SharePermission
's to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |