|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.jira.portal.DefaultPortalPageManager
public class DefaultPortalPageManager
The base class for PortalPageManager implementations
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.jira.sharing.SharedEntityAccessor |
---|
SharedEntityAccessor.Factory, SharedEntityAccessor.RetrievalDescriptor |
Constructor Summary | |
---|---|
DefaultPortalPageManager(ShareManager shareManager,
PortalPageStore portalPageStore,
PortletConfigurationManager portletConfigurationManager,
SharedEntityIndexer indexer,
com.atlassian.event.api.EventPublisher eventPublisher,
JiraAuthenticationContext authenticationContext)
|
Method Summary | |
---|---|
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(com.atlassian.crowd.embedded.api.User pageOwner,
PortalPage portalPage,
PortalPage clonePortalPage)
Creates a PortalPage in the database by cloning its Portlet content from the specified clonePortalPage |
void |
delete(Long portalPageId)
Deletes the PortalPage with the specified portalPageId |
void |
deleteAllPortalPagesForUser(com.atlassian.crowd.embedded.api.User user)
|
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 sharable entities this accessor can see. |
EnclosedIterable<SharedEntity> |
getAllIndexableSharedEntities()
Get all sharable entities this accessor can see for use in indexing. |
Collection<PortalPage> |
getAllOwnedPortalPages(com.atlassian.crowd.embedded.api.User owner)
Returns a Collection of PortalPage objects that are owned by the specified User |
PortalPage |
getPortalPage(com.atlassian.crowd.embedded.api.User 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(com.atlassian.crowd.embedded.api.User 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(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,
com.atlassian.crowd.embedded.api.User 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultPortalPageManager(ShareManager shareManager, PortalPageStore portalPageStore, PortletConfigurationManager portletConfigurationManager, SharedEntityIndexer indexer, com.atlassian.event.api.EventPublisher eventPublisher, JiraAuthenticationContext authenticationContext)
Method Detail |
---|
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 it
getSharedEntity
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 check
public EnclosedIterable<PortalPage> getAll()
SharedEntityAccessor
sharable entities
this accessor can see.
getAll
in interface SharedEntityAccessor<PortalPage>
EnclosedIterable
of SharedEntity
'spublic 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 descriptor
EnclosedIterable
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 descriptor
EnclosedIterable
of SharedEntity
'spublic Collection<PortalPage> getAllOwnedPortalPages(com.atlassian.crowd.embedded.api.User owner)
PortalPageManager
getAllOwnedPortalPages
in interface PortalPageManager
owner
- the User who owns the PortalPage's
public PortalPage getPortalPageByName(com.atlassian.crowd.embedded.api.User owner, String pageName)
PortalPageManager
getPortalPageByName
in interface PortalPageManager
owner
- the owner in playpageName
- the name of the PortalPage
public PortalPage getSystemDefaultPortalPage()
PortalPageManager
getSystemDefaultPortalPage
in interface PortalPageManager
public PortalPage getPortalPage(com.atlassian.crowd.embedded.api.User user, Long id)
PortalPageManager
getPortalPage
in interface PortalPageManager
user
- the User in playid
- the id of the PortalPage to return
public PortalPage getPortalPageById(Long portalPageId)
PortalPageManager
getPortalPageById
in interface PortalPageManager
portalPageId
- the id of the PortalPage to retrieve
public PortalPage create(PortalPage portalPage)
PortalPageManager
create
in interface PortalPageManager
portalPage
- the PortalPage to create
public PortalPage createBasedOnClone(com.atlassian.crowd.embedded.api.User 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 from
public PortalPage update(PortalPage portalPage)
PortalPageManager
update
in interface PortalPageManager
portalPage
- the PortalPage to update
public void deleteAllPortalPagesForUser(com.atlassian.crowd.embedded.api.User user)
public 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, com.atlassian.crowd.embedded.api.User 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 List<List<PortletConfiguration>> getPortletConfigurations(Long portalPageId)
PortalPageManager
getPortletConfigurations
in interface PortalPageManager
portalPageId
- The portal page id to fetch portlet configs for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |