Package com.atlassian.jira.portal
Interface PortalPageStore
- All Known Implementing Classes:
CachingPortalPageStore,OfBizPortalPageStore
public interface PortalPageStore
This is the store for PortalPage objects
- Since:
- v3.13
-
Method Summary
Modifier and TypeMethodDescriptionadjustFavouriteCount(SharedEntity portalPage, int incrementValue) Updates the favourite count of the PortalPage in the database.create(PortalPage portalPage) Creates a PortalPage in the databasevoidDeletes the PortalPage with the specified portalPageIdvoidflush()Flushes any caches that may existget(SharedEntityAccessor.RetrievalDescriptor descriptor) Get aEnclosedIterableof PortalPages for the specified List of ids.getAll()Get aEnclosedIterableof all PortalPages in the database.Gets all the PortalPage's owned by the specified UsergetAllOwnedPortalPages(String userKey) Gets all the PortalPage's owned by the specified UsergetPortalPage(Long portalPageId) Gets the PortalPage with the specified portalPageIdgetPortalPageByOwnerAndName(ApplicationUser owner, String portalPageName) Gets the specified PortalPage that is owned by the User and has the specified portalPageNameGoes to the database and fetches the system default dashboard configuration.update(PortalPage portalPage) Updates the PortalPage in the database.booleanupdatePortalPageOptimisticLock(Long portalPageId, Long currentVersion) This method will increment the version of the given portalPage by one.
-
Method Details
-
getSystemDefaultPortalPage
PortalPage getSystemDefaultPortalPage()Goes to the database and fetches the system default dashboard configuration.- Returns:
- the system default portal page.
-
getAll
EnclosedIterable<PortalPage> getAll()Get aEnclosedIterableof all PortalPages in the database.- Returns:
- CloseableIterable that contains reference to all PortalPages.
-
getAllOwnedPortalPages
Gets all the PortalPage's owned by the specified User- Parameters:
owner- the user who is the owner of the PortalPage's- Returns:
- a Collection of PortalPage objects owner by the User
-
getAllOwnedPortalPages
Gets all the PortalPage's owned by the specified User- Parameters:
userKey- The key of the user who is the owner of the PortalPage's- Returns:
- a Collection of PortalPage objects owner by the User
-
getPortalPageByOwnerAndName
Gets the specified PortalPage that is owned by the User and has the specified portalPageName- Parameters:
owner- the User how is the owner of the PortalPageportalPageName- the name of the PortalPage- Returns:
- a PortalPage object or null if it cant be found
-
getPortalPage
Gets the PortalPage with the specified portalPageId- Parameters:
portalPageId- the id of the PortalPage to locate- Returns:
- a PortalPage or null if it cant be found
-
create
Creates a PortalPage in the database- Parameters:
portalPage- the PortalPage to create- Returns:
- the new PortalPage with its new database id
-
update
Updates the PortalPage in the database.- Parameters:
portalPage- the PortalPage to update- Returns:
- a newly updated PortalPage object
-
updatePortalPageOptimisticLock
This method will increment the version of the given portalPage by one. When doing this, it will check that the version currently equals what was passed in. If the update is successful, this method returns true. False otherwiseIn JIRA since we don't have transactions, this method should be called inside a pessimistic lock (potentially striped by portalPageId) and all update operations should follow while holding this same lock.
- Parameters:
portalPageId- The dashboard to updatecurrentVersion- The current version for this dashboard- Returns:
- true if the update is successful, false otherwise
-
delete
Deletes the PortalPage with the specified portalPageId- Parameters:
portalPageId- the id of the PortalPage to delete
-
flush
void flush()Flushes any caches that may exist
-