com.atlassian.jira.portal
Class OfBizPortalPageStore

java.lang.Object
  extended by com.atlassian.jira.portal.OfBizPortalPageStore
All Implemented Interfaces:
PortalPageStore

public class OfBizPortalPageStore
extends Object
implements PortalPageStore

The PortalPageStore implementation that uses OfBiz

Since:
v3.13

Constructor Summary
OfBizPortalPageStore(OfBizDelegator delegator, UserManager userManager)
           
 
Method Summary
 PortalPage adjustFavouriteCount(SharedEntity portalPage, int incrementValue)
          Updates the favourite count of the PortalPage in the database.
 PortalPage create(PortalPage portalPage)
          Creates a PortalPage in the database
 void delete(Long portalPageId)
          Deletes the PortalPage with the specified portalPageId
 CloseableIterable get(SharedEntityAccessor.RetrievalDescriptor descriptor)
          Get a CloseableIterable of PortalPages for the specified List of ids.
 CloseableIterable getAll()
          Get a CloseableIterable of all PortalPages in the database.
 Collection getAllOwnedPortalPages(User owner)
          Gets all the PortalPage's owned by the specified User
 PortalPage getPortalPage(Long portalPageId)
          Gets the PortalPage with the specified portalPageId
 PortalPage getPortalPageByOwnerAndName(User owner, String name)
          Gets the specified PortalPage that is owned by the User and has the specified portalPageName
 PortalPage getSystemDefaultPortalPage()
          Goes to the database and fetches the system default dashboard configuration.
 PortalPage update(PortalPage portalPage)
          Updates the PortalPage in the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OfBizPortalPageStore

public OfBizPortalPageStore(OfBizDelegator delegator,
                            UserManager userManager)
Method Detail

get

public CloseableIterable get(SharedEntityAccessor.RetrievalDescriptor descriptor)
Description copied from interface: PortalPageStore
Get a CloseableIterable of PortalPages for the specified List of ids.

Make sure any CloseableIterator constructed has its close method called after iterating.

Specified by:
get in interface PortalPageStore
Parameters:
descriptor - retrieval descriptor
Returns:
CloseableIterable that contains reference to PortalPages with the specified ids.

getAll

public CloseableIterable getAll()
Description copied from interface: PortalPageStore
Get a CloseableIterable of all PortalPages in the database.

Make sure any CloseableIterator constructed has its close method called after iterating.

Specified by:
getAll in interface PortalPageStore
Returns:
CloseableIterable that contains reference to all PortalPages.

getAllOwnedPortalPages

public Collection getAllOwnedPortalPages(User owner)
Description copied from interface: PortalPageStore
Gets all the PortalPage's owned by the specified User

Specified by:
getAllOwnedPortalPages in interface PortalPageStore
Parameters:
owner - the User who is the owner of the PortalPages
Returns:
a NON NULL Collection of PortalPage objects

getPortalPageByOwnerAndName

public PortalPage getPortalPageByOwnerAndName(User owner,
                                              String name)
Description copied from interface: PortalPageStore
Gets the specified PortalPage that is owned by the User and has the specified portalPageName

Specified by:
getPortalPageByOwnerAndName in interface PortalPageStore
Parameters:
owner - the User how is the owner of the PortalPage
name - the name of the PortalPage
Returns:
a PortalPage object or null if it cant be found

getPortalPage

public PortalPage getPortalPage(Long portalPageId)
Description copied from interface: PortalPageStore
Gets the PortalPage with the specified portalPageId

Specified by:
getPortalPage in interface PortalPageStore
Parameters:
portalPageId - the id of the PortalPage to locate
Returns:
a PortalPage or null if it cant be found

update

public PortalPage update(PortalPage portalPage)
Description copied from interface: PortalPageStore
Updates the PortalPage in the database.

Specified by:
update in interface PortalPageStore
Parameters:
portalPage - the PortalPage to update
Returns:
a newly updated PortalPage object

adjustFavouriteCount

public PortalPage adjustFavouriteCount(SharedEntity portalPage,
                                       int incrementValue)
Description copied from interface: PortalPageStore
Updates the favourite count of the PortalPage in the database.

Specified by:
adjustFavouriteCount in interface PortalPageStore
Parameters:
portalPage - the portal page to change.
incrementValue - the value to increase the favourite count by. Can be a number < 0 to decrease the favourite count.
Returns:
a newly updated PortalPage object.

create

public PortalPage create(PortalPage portalPage)
Description copied from interface: PortalPageStore
Creates a PortalPage in the database

Specified by:
create in interface PortalPageStore
Parameters:
portalPage - the PortalPage to create
Returns:
the new PortalPage with its new database id

delete

public void delete(Long portalPageId)
Description copied from interface: PortalPageStore
Deletes the PortalPage with the specified portalPageId

Specified by:
delete in interface PortalPageStore
Parameters:
portalPageId - the id of the PortalPage to delete

getSystemDefaultPortalPage

public PortalPage getSystemDefaultPortalPage()
Description copied from interface: PortalPageStore
Goes to the database and fetches the system default dashboard configuration.

Specified by:
getSystemDefaultPortalPage in interface PortalPageStore
Returns:
the system default portal page.


Copyright © 2002-2009 Atlassian. All Rights Reserved.