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
|
PortalPage |
createBasedOnClone(com.atlassian.crowd.embedded.api.User pageOwner,
PortalPage portalPage,
PortalPage clonePortalPage) |
void |
delete(Long portalPageId)
Deletes the PortalPage with the specified portalPageId
|
EnclosedIterable<PortalPage> |
get(SharedEntityAccessor.RetrievalDescriptor descriptor)
Used to get
sharable entities from a search result. |
EnclosedIterable<PortalPage> |
get(com.atlassian.crowd.embedded.api.User user,
SharedEntityAccessor.RetrievalDescriptor ids)
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
|
Collection<PortalPage> |
getAllOwnedPortalPages(com.atlassian.crowd.embedded.api.User owner) |
PortalPage |
getPortalPage(ApplicationUser user,
Long id)
Returns the PortalPage with the specified portalPageId, IF the user is allowed to see it.
|
PortalPage |
getPortalPage(com.atlassian.crowd.embedded.api.User user,
Long id) |
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.
|
PortalPage |
getPortalPageByName(com.atlassian.crowd.embedded.api.User owner,
String pageName) |
List<List<PortletConfiguration>> |
getPortletConfigurations(Long portalPageId)
Returns a sorted immutable list of lists of portletconfigurations for a particular portal page.
|
PortalPage |
getSharedEntity(Long entityId)
This will call back to ask for a
SharedEntity based on id. |
PortalPage |
getSharedEntity(com.atlassian.crowd.embedded.api.User user,
Long entityId)
This is called to get
SharedEntity by id If the user is allows to see it |
PortalPage |
getSystemDefaultPortalPage()
Returns the system default PortalPage.
|
SharedEntity.TypeDescriptor<PortalPage> |
getType()
Returns the type that this object can work with.
|
boolean |
hasPermissionToUse(com.atlassian.crowd.embedded.api.User 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.
|
SharedEntitySearchResult<PortalPage> |
search(SharedEntitySearchParameters searchParameters,
com.atlassian.crowd.embedded.api.User user,
int pagePosition,
int pageWidth) |
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()
SharedEntityAccessor
getType
in interface SharedEntityAccessor<PortalPage>
public void adjustFavouriteCount(SharedEntity entity, int adjustmentValue)
SharedEntityAccessor
adjustFavouriteCount
in interface SharedEntityAccessor<PortalPage>
entity
- the entity to adjustadjustmentValue
- the value to adjust by.public PortalPage getSharedEntity(Long entityId)
SharedEntityAccessor
SharedEntity
based on id.getSharedEntity
in interface SharedEntityAccessor<PortalPage>
entityId
- the id of the SharedEntity
SharedEntity
or null if it cant be foundpublic PortalPage getSharedEntity(com.atlassian.crowd.embedded.api.User user, Long entityId)
SharedEntityAccessor
SharedEntity
by id If the user is allows to see itgetSharedEntity
in interface SharedEntityAccessor<PortalPage>
user
- the user in playentityId
- the id of the SharedEntity
SharedEntity
if it exists and the user can see it and null otherwisepublic boolean hasPermissionToUse(com.atlassian.crowd.embedded.api.User user, PortalPage portalPage)
SharedEntityAccessor
SharedEntity
hasPermissionToUse
in interface SharedEntityAccessor<PortalPage>
user
- the user in playportalPage
- the SharedEntity
to checkpublic EnclosedIterable<PortalPage> getAll()
PortalPageManager
getAll
in interface PortalPageManager
getAll
in interface SharedEntityAccessor<PortalPage>
EnclosedIterable
of PortalPagespublic EnclosedIterable<SharedEntity> getAllIndexableSharedEntities()
SharedEntityAccessor
sharable entities
this accessor can see for use in indexing.getAllIndexableSharedEntities
in interface SharedEntityAccessor<PortalPage>
EnclosedIterable
of SharedEntity
'spublic EnclosedIterable<PortalPage> get(SharedEntityAccessor.RetrievalDescriptor descriptor)
SharedEntityAccessor
sharable entities
from a search result.get
in interface SharedEntityAccessor<PortalPage>
descriptor
- retrieval descriptorEnclosedIterable
of SharedEntity
'spublic EnclosedIterable<PortalPage> get(com.atlassian.crowd.embedded.api.User user, SharedEntityAccessor.RetrievalDescriptor ids)
SharedEntityAccessor
sharable 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)
PortalPageManager
getAllOwnedPortalPages
in interface PortalPageManager
owner
- the User who owns the PortalPage'spublic Collection<PortalPage> getAllOwnedPortalPages(com.atlassian.crowd.embedded.api.User owner)
getAllOwnedPortalPages
in interface PortalPageManager
owner
- the User who owns the PortalPage'spublic PortalPage getPortalPageByName(ApplicationUser owner, String pageName)
PortalPageManager
getPortalPageByName
in interface PortalPageManager
owner
- the owner in playpageName
- the name of the PortalPagepublic PortalPage getPortalPageByName(com.atlassian.crowd.embedded.api.User owner, String pageName)
getPortalPageByName
in interface PortalPageManager
owner
- the owner in playpageName
- the name of the PortalPagepublic PortalPage getSystemDefaultPortalPage()
PortalPageManager
getSystemDefaultPortalPage
in interface PortalPageManager
public PortalPage getPortalPage(ApplicationUser user, Long id)
PortalPageManager
getPortalPage
in interface PortalPageManager
user
- the User in playid
- the id of the PortalPage to returnpublic PortalPage getPortalPage(com.atlassian.crowd.embedded.api.User user, Long id)
getPortalPage
in interface PortalPageManager
user
- the User in playid
- the id of the PortalPage to returnpublic PortalPage getPortalPageById(Long portalPageId)
PortalPageManager
getPortalPageById
in interface PortalPageManager
portalPageId
- the id of the PortalPage to retrievepublic PortalPage create(PortalPage portalPage)
PortalPageManager
create
in interface PortalPageManager
portalPage
- the PortalPage to createpublic PortalPage createBasedOnClone(ApplicationUser pageOwner, PortalPage portalPage, PortalPage clonePortalPage)
PortalPageManager
createBasedOnClone
in interface PortalPageManager
pageOwner
- the User who will own the cloned portal pageportalPage
- the PortalPage to createclonePortalPage
- the PortalPage to clone Portlet content frompublic PortalPage createBasedOnClone(com.atlassian.crowd.embedded.api.User pageOwner, PortalPage portalPage, PortalPage clonePortalPage)
createBasedOnClone
in interface PortalPageManager
pageOwner
- the User who will own the cloned portal pageportalPage
- the PortalPage to createclonePortalPage
- the PortalPage to clone Portlet content frompublic PortalPage update(PortalPage portalPage)
PortalPageManager
update
in interface PortalPageManager
portalPage
- the PortalPage to updatepublic void delete(Long portalPageId)
PortalPageManager
delete
in interface PortalPageManager
portalPageId
- the id of the PortalPage to deletepublic void saveLegacyPortletConfiguration(PortletConfiguration portletConfiguration)
PortalPageManager
PortletConfiguration
object
inside a PortalPage
object to the underlying database store.saveLegacyPortletConfiguration
in interface PortalPageManager
portletConfiguration
- The portletConfiguration to save.public SharedEntitySearchResult<PortalPage> search(SharedEntitySearchParameters searchParameters, ApplicationUser user, int pagePosition, int pageWidth)
PortalPageManager
search
in interface PortalPageManager
searchParameters
- the SearchParameters to query.user
- the user performing the search.pagePosition
- the page to return.pageWidth
- the number of results per page.public SharedEntitySearchResult<PortalPage> search(SharedEntitySearchParameters searchParameters, com.atlassian.crowd.embedded.api.User user, int pagePosition, int pageWidth)
search
in interface PortalPageManager
searchParameters
- 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)
PortalPageManager
getPortletConfigurations
in interface PortalPageManager
portalPageId
- The portal page id to fetch portlet configs forCopyright © 2002-2015 Atlassian. All Rights Reserved.