Package com.atlassian.jira.portal
Class OfBizPortalPageStore
java.lang.Object
com.atlassian.jira.portal.OfBizPortalPageStore
- All Implemented Interfaces:
PortalPageStore
The PortalPageStore implementation that uses OfBiz
- Since:
- v3.13
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Constructor Summary
Constructors -
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 name) 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.
-
Constructor Details
-
OfBizPortalPageStore
-
-
Method Details
-
getAll
Description copied from interface:PortalPageStoreGet aEnclosedIterableof all PortalPages in the database.- Specified by:
getAllin interfacePortalPageStore- Returns:
- CloseableIterable that contains reference to all PortalPages.
-
getAllOwnedPortalPages
Description copied from interface:PortalPageStoreGets all the PortalPage's owned by the specified User- Specified by:
getAllOwnedPortalPagesin interfacePortalPageStore- Parameters:
owner- the User who is the owner of thePortalPages- Returns:
- a NON NULL Collection of PortalPage objects
-
getAllOwnedPortalPages
Description copied from interface:PortalPageStoreGets all the PortalPage's owned by the specified User- Specified by:
getAllOwnedPortalPagesin interfacePortalPageStore- 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
Description copied from interface:PortalPageStoreGets the specified PortalPage that is owned by the User and has the specified portalPageName- Specified by:
getPortalPageByOwnerAndNamein interfacePortalPageStore- Parameters:
owner- the User how is the owner of the PortalPagename- the name of the PortalPage- Returns:
- a PortalPage object or null if it cant be found
-
getPortalPage
Description copied from interface:PortalPageStoreGets the PortalPage with the specified portalPageId- Specified by:
getPortalPagein interfacePortalPageStore- Parameters:
portalPageId- the id of the PortalPage to locate- Returns:
- a PortalPage or null if it cant be found
-
update
Description copied from interface:PortalPageStoreUpdates the PortalPage in the database.- Specified by:
updatein interfacePortalPageStore- Parameters:
portalPage- the PortalPage to update- Returns:
- a newly updated PortalPage object
-
create
Description copied from interface:PortalPageStoreCreates a PortalPage in the database- Specified by:
createin interfacePortalPageStore- Parameters:
portalPage- the PortalPage to create- Returns:
- the new PortalPage with its new database id
-
delete
Description copied from interface:PortalPageStoreDeletes the PortalPage with the specified portalPageId- Specified by:
deletein interfacePortalPageStore- Parameters:
portalPageId- the id of the PortalPage to delete
-
getSystemDefaultPortalPage
Description copied from interface:PortalPageStoreGoes to the database and fetches the system default dashboard configuration.- Specified by:
getSystemDefaultPortalPagein interfacePortalPageStore- Returns:
- the system default portal page.
-
updatePortalPageOptimisticLock
Description copied from interface:PortalPageStoreThis 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.
- Specified by:
updatePortalPageOptimisticLockin interfacePortalPageStore- Parameters:
portalPageId- The dashboard to updatecurrentVersion- The current version for this dashboard- Returns:
- true if the update is successful, false otherwise
-
flush
public void flush()Description copied from interface:PortalPageStoreFlushes any caches that may exist- Specified by:
flushin interfacePortalPageStore