public class DefaultPortalPageManager extends Object implements PortalPageManager
SharedEntityAccessor.Factory, SharedEntityAccessor.RetrievalDescriptor| Constructor and Description |
|---|
DefaultPortalPageManager(ShareManager shareManager,
PortalPageStore portalPageStore,
PortletConfigurationManager portletConfigurationManager,
SharedEntityIndexer indexer,
com.atlassian.event.api.EventPublisher eventPublisher,
JiraAuthenticationContext authenticationContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustFavouriteCount(SharedEntity entity,
int adjustmentValue)
Adjusts the favourite counts for a given entity.
|
PortalPage |
create(PortalPage portalPage)
Creates the specified PortalPage in the database
|
PortalPage |
createBasedOnClone(ApplicationUser pageOwner,
PortalPage portalPage,
PortalPage clonePortalPage)
Creates a PortalPage in the database by cloning its Portlet content from the specified clonePortalPage
|
protected PortalPage |
createNoEvent(PortalPage portalPage) |
void |
delete(Long portalPageId)
Deletes the PortalPage with the specified portalPageId
|
EnclosedIterable<PortalPage> |
get(ApplicationUser user,
SharedEntityAccessor.RetrievalDescriptor ids)
Used to get
sharable entities from a search result. |
EnclosedIterable<PortalPage> |
get(SharedEntityAccessor.RetrievalDescriptor descriptor)
Used to get
sharable entities from a search result. |
EnclosedIterable<PortalPage> |
getAll()
Get all PortalPages.
|
EnclosedIterable<SharedEntity> |
getAllIndexableSharedEntities()
Get all
sharable entities this accessor can see for use in indexing. |
Collection<PortalPage> |
getAllOwnedPortalPages(ApplicationUser owner)
Returns a Collection of PortalPage objects that are owned by the specified User
|
PortalPage |
getPortalPage(ApplicationUser user,
Long id)
Returns the PortalPage with the specified portalPageId, IF the user is allowed to see it.
|
PortalPage |
getPortalPageById(Long portalPageId)
Gets a PortalPage by id regardless of owner
|
PortalPage |
getPortalPageByName(ApplicationUser owner,
String pageName)
Returns a PortalPage by searching for it by owner and pageName.
|
List<List<PortletConfiguration>> |
getPortletConfigurations(Long portalPageId)
Returns a sorted immutable list of lists of portletconfigurations for a particular portal page.
|
PortalPage |
getSharedEntity(ApplicationUser user,
Long entityId)
This is called to get
SharedEntity by id If the user is allows to see it |
PortalPage |
getSharedEntity(Long entityId)
This will call back to ask for a
SharedEntity based on id. |
PortalPage |
getSystemDefaultPortalPage()
Returns the system default PortalPage.
|
SharedEntity.TypeDescriptor<PortalPage> |
getType()
Returns the type that this object can work with.
|
boolean |
hasPermissionToUse(ApplicationUser user,
PortalPage portalPage)
Returns true if the user has permission to use the
SharedEntity |
void |
saveLegacyPortletConfiguration(PortletConfiguration portletConfiguration)
This can be called to save a
PortletConfiguration object
inside a PortalPage object to the underlying database store. |
SharedEntitySearchResult<PortalPage> |
search(SharedEntitySearchParameters searchParameters,
ApplicationUser user,
int pagePosition,
int pageWidth)
Search for the PortalPages that match the passed SearchParameters.
|
PortalPage |
update(PortalPage portalPage)
Updates the specified PortalPage in the database
|
public DefaultPortalPageManager(ShareManager shareManager, PortalPageStore portalPageStore, PortletConfigurationManager portletConfigurationManager, SharedEntityIndexer indexer, com.atlassian.event.api.EventPublisher eventPublisher, JiraAuthenticationContext authenticationContext)
public SharedEntity.TypeDescriptor<PortalPage> getType()
SharedEntityAccessorgetType in interface SharedEntityAccessor<PortalPage>public void adjustFavouriteCount(SharedEntity entity, int adjustmentValue)
SharedEntityAccessoradjustFavouriteCount in interface SharedEntityAccessor<PortalPage>entity - the entity to adjustadjustmentValue - the value to adjust by.public PortalPage getSharedEntity(Long entityId)
SharedEntityAccessorSharedEntity based on id.getSharedEntity in interface SharedEntityAccessor<PortalPage>entityId - the id of the SharedEntitySharedEntity or null if it cant be foundpublic PortalPage getSharedEntity(ApplicationUser user, Long entityId)
SharedEntityAccessorSharedEntity by id If the user is allows to see itgetSharedEntity in interface SharedEntityAccessor<PortalPage>user - the user in playentityId - the id of the SharedEntitySharedEntity if it exists and the user can see it and null otherwisepublic boolean hasPermissionToUse(ApplicationUser user, PortalPage portalPage)
SharedEntityAccessorSharedEntityhasPermissionToUse in interface SharedEntityAccessor<PortalPage>user - the user in playportalPage - the SharedEntity to checkpublic EnclosedIterable<PortalPage> getAll()
PortalPageManagergetAll in interface PortalPageManagergetAll in interface SharedEntityAccessor<PortalPage>EnclosedIterable of PortalPagespublic EnclosedIterable<SharedEntity> getAllIndexableSharedEntities()
SharedEntityAccessorsharable entities this accessor can see for use in indexing.getAllIndexableSharedEntities in interface SharedEntityAccessor<PortalPage>EnclosedIterable of SharedEntity'spublic EnclosedIterable<PortalPage> get(SharedEntityAccessor.RetrievalDescriptor descriptor)
SharedEntityAccessorsharable entities from a search result.get in interface SharedEntityAccessor<PortalPage>descriptor - retrieval descriptorEnclosedIterable of SharedEntity'spublic EnclosedIterable<PortalPage> get(ApplicationUser user, SharedEntityAccessor.RetrievalDescriptor ids)
SharedEntityAccessorsharable entities from a search result.
The entities returned may be modified by the user parameter (e.g. permissions or clause sanitisation).get in interface SharedEntityAccessor<PortalPage>user - the user performing the searchids - retrieval descriptorEnclosedIterable of SharedEntity'spublic Collection<PortalPage> getAllOwnedPortalPages(ApplicationUser owner)
PortalPageManagergetAllOwnedPortalPages in interface PortalPageManagerowner - the User who owns the PortalPage'spublic PortalPage getPortalPageByName(ApplicationUser owner, String pageName)
PortalPageManagergetPortalPageByName in interface PortalPageManagerowner - the owner in playpageName - the name of the PortalPagepublic PortalPage getSystemDefaultPortalPage()
PortalPageManagergetSystemDefaultPortalPage in interface PortalPageManagerpublic PortalPage getPortalPage(ApplicationUser user, Long id)
PortalPageManagergetPortalPage in interface PortalPageManageruser - the User in playid - the id of the PortalPage to returnpublic PortalPage getPortalPageById(Long portalPageId)
PortalPageManagergetPortalPageById in interface PortalPageManagerportalPageId - the id of the PortalPage to retrievepublic PortalPage create(PortalPage portalPage)
PortalPageManagercreate in interface PortalPageManagerportalPage - the PortalPage to createprotected PortalPage createNoEvent(PortalPage portalPage)
public PortalPage createBasedOnClone(ApplicationUser pageOwner, PortalPage portalPage, PortalPage clonePortalPage)
PortalPageManagercreateBasedOnClone in interface PortalPageManagerpageOwner - the User who will own the cloned portal pageportalPage - the PortalPage to createclonePortalPage - the PortalPage to clone Portlet content frompublic PortalPage update(PortalPage portalPage)
PortalPageManagerupdate in interface PortalPageManagerportalPage - the PortalPage to updatepublic void delete(Long portalPageId)
PortalPageManagerdelete in interface PortalPageManagerportalPageId - the id of the PortalPage to deletepublic void saveLegacyPortletConfiguration(PortletConfiguration portletConfiguration)
PortalPageManagerPortletConfiguration object
inside a PortalPage object to the underlying database store.saveLegacyPortletConfiguration in interface PortalPageManagerportletConfiguration - The portletConfiguration to save.public SharedEntitySearchResult<PortalPage> search(SharedEntitySearchParameters searchParameters, ApplicationUser user, int pagePosition, int pageWidth)
PortalPageManagersearch in interface PortalPageManagersearchParameters - the SearchParameters to query.user - the user performing the search.pagePosition - the page to return.pageWidth - the number of results per page.public List<List<PortletConfiguration>> getPortletConfigurations(Long portalPageId)
PortalPageManagergetPortletConfigurations in interface PortalPageManagerportalPageId - The portal page id to fetch portlet configs forCopyright © 2002-2015 Atlassian. All Rights Reserved.