|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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,
PortletAccessManager portletAccessManager,
PortletConfigurationManager portletConfigurationManager,
SharedEntityIndexer indexer)
|
Method Summary | |
---|---|
PortletConfiguration |
addPortalPagePortletConfiguration(PortalPage portalPage,
String portletKey,
int column,
int row)
Adds a Portlet to the PortalPage and returns the [@link PortletConfiguration} that represents the newly added configuration. |
void |
adjustFavouriteCount(SharedEntity entity,
int adjustmentValue)
Adjusts the favourite counts for a given entity. |
boolean |
canUserSeePortlet(User user,
Portlet portlet)
Returns true if the user is able to view the passed portlet. |
boolean |
canUserSeePortlet(User user,
String portletKey)
Returns true if the user is able to view the Portlet identified by portletKey. |
PortalPage |
copyPortletConfigurationInPortalPage(PortalPage portalPage,
Long portletConfigId)
Make a new copy of a PortletConfiguration on a PortalPage. |
PortalPage |
create(PortalPage portalPage)
Creates the specified PortalPage in the database |
PortalPage |
createBasedOnClone(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(User user)
|
PortalPage |
deletePortalPagePortletConfiguration(PortalPage portalPage,
Long portletConfigId)
This can be called to delete a specific PortletConfiguration object by id inside a PortalPage object from the underlying
database store. |
boolean |
doesPortletExist(String portletKey)
This is called to see if the specified portlet plugin, identified by portletKey, exists at all. |
CloseableIterable |
get(SharedEntityAccessor.RetrievalDescriptor ids)
Used to get sharable entities from a search result. |
CloseableIterable |
getAll()
Get all sharable entities this accessor can see. |
Collection |
getAllOwnedPortalPages(User owner)
Returns a Collection of PortalPage objects that are owned by the specified User |
PortalPage |
getPortalPage(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(User owner,
String pageName)
Returns a PortalPage by searching for it by owner and pageName. |
String |
getPortalPageOwnerUserName(Long id)
Returns the user name of the user who owns the specified PortalPage |
SharedEntity |
getSharedEntity(Long entityId)
This will call back to ask for a SharedEntity based on id. |
SharedEntity |
getSharedEntity(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 |
getType()
Returns the type that this object can work with. |
Portlet |
getVisiblePortlet(User user,
String portletKey)
Returns a Portlet if the user can see it |
Collection |
getVisiblePortlets(User user)
This returns a collections of the all the Portlet 's a user can see |
boolean |
hasPermissionToUse(User user,
SharedEntity entity)
Returns true if the user has permission to use the SharedEntity |
PortalPage |
movePortletConfigurationToPortalPage(PortalPage srcPortalPage,
PortalPage targetPortalPage,
Long portletConfigId)
Move a PortletConfiguration from one PortalPage to another. |
PortalPage |
saveAllPortalPagePortletConfiguration(PortalPage portalPage)
This can be called to save the PortletConfiguration objects inside a PortalPage object to the underlying database store. |
PortalPage |
savePortalPagePortletConfiguration(PortalPage portalPage,
Long portletConfigId)
This can be called to save a PortletConfiguration object
inside a PortalPage object to the underlying database store. |
SharedEntitySearchResult |
search(SharedEntitySearchParameters searchParameters,
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, PortletAccessManager portletAccessManager, PortletConfigurationManager portletConfigurationManager, SharedEntityIndexer indexer)
Method Detail |
---|
public SharedEntity.TypeDescriptor getType()
SharedEntityAccessor
getType
in interface SharedEntityAccessor
public void adjustFavouriteCount(SharedEntity entity, int adjustmentValue)
SharedEntityAccessor
adjustFavouriteCount
in interface SharedEntityAccessor
entity
- the entity to adjustadjustmentValue
- the value to adjust by.public SharedEntity getSharedEntity(Long entityId)
SharedEntityAccessor
SharedEntity
based on id.
getSharedEntity
in interface SharedEntityAccessor
entityId
- the id of the SharedEntity
SharedEntity
or null if it cant be foundpublic SharedEntity getSharedEntity(User user, Long entityId)
SharedEntityAccessor
SharedEntity
by id If the user is allows to see it
getSharedEntity
in interface SharedEntityAccessor
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(User user, SharedEntity entity)
SharedEntityAccessor
SharedEntity
hasPermissionToUse
in interface SharedEntityAccessor
user
- the user in playentity
- the SharedEntity
to check
public CloseableIterable getAll()
SharedEntityAccessor
sharable entities
this accessor can see.
getAll
in interface SharedEntityAccessor
CloseableIterable
of SharedEntity
'spublic CloseableIterable get(SharedEntityAccessor.RetrievalDescriptor ids)
SharedEntityAccessor
sharable entities
from a search result.
get
in interface SharedEntityAccessor
ids
- retrieval descriptor
CloseableIterable
of SharedEntity
'spublic Collection getAllOwnedPortalPages(User owner)
PortalPageManager
getAllOwnedPortalPages
in interface PortalPageManager
owner
- the User who owns the PortalPage's
public PortalPage getPortalPageByName(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(User user, Long id)
PortalPageManager
getPortalPage
in interface PortalPageManager
user
- the User in playid
- the id of the PortalPage to return
public String getPortalPageOwnerUserName(Long id)
PortalPageManager
getPortalPageOwnerUserName
in interface PortalPageManager
id
- the id of the PortalPage
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(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(User user)
public void delete(Long portalPageId)
PortalPageManager
delete
in interface PortalPageManager
portalPageId
- the id of the PortalPage to deletepublic PortalPage saveAllPortalPagePortletConfiguration(PortalPage portalPage)
PortalPageManager
PortletConfiguration
objects inside a PortalPage
object to the underlying database store.
saveAllPortalPagePortletConfiguration
in interface PortalPageManager
portalPage
- the PortalPage in question
public PortalPage savePortalPagePortletConfiguration(PortalPage portalPage, Long portletConfigId)
PortalPageManager
PortletConfiguration
object
inside a PortalPage
object to the underlying database store.
savePortalPagePortletConfiguration
in interface PortalPageManager
portalPage
- the PortalPage in questionportletConfigId
- the id of the PortletConfiguration inside the PortalPage.
public PortalPage deletePortalPagePortletConfiguration(PortalPage portalPage, Long portletConfigId)
PortalPageManager
PortletConfiguration
object by id inside a PortalPage
object from the underlying
database store.
deletePortalPagePortletConfiguration
in interface PortalPageManager
portalPage
- the PortalPage in questionportletConfigId
- the id of the PortletConfiguration inside the PortalPage
public PortalPage copyPortletConfigurationInPortalPage(PortalPage portalPage, Long portletConfigId)
PortalPageManager
copyPortletConfigurationInPortalPage
in interface PortalPageManager
portalPage
- the PortalPage that contains the PortletConfiguration to copy.portletConfigId
- the id of the PortletConfiguration to copy. It must be attached to the passed PortalPage.
public PortalPage movePortletConfigurationToPortalPage(PortalPage srcPortalPage, PortalPage targetPortalPage, Long portletConfigId)
PortalPageManager
movePortletConfigurationToPortalPage
in interface PortalPageManager
srcPortalPage
- the PortalPage that contains the PortletConfiguration to move.targetPortalPage
- the PortalPage to receive the PortletConfiguration.portletConfigId
- the id of the PortletConfiguration to move.
public PortletConfiguration addPortalPagePortletConfiguration(PortalPage portalPage, String portletKey, int column, int row)
PortalPageManager
Portlet
to the PortalPage and returns the [@link PortletConfiguration} that represents the newly added configuration.
addPortalPagePortletConfiguration
in interface PortalPageManager
portalPage
- the PortalPage to add the Portlet toportletKey
- the key of the Portlet to addcolumn
- the suggested column inside the PortalPagerow
- the suggested row inside the PortalPage
public boolean canUserSeePortlet(User user, String portletKey)
PortalPageManager
canUserSeePortlet
in interface PortalPageManager
user
- the user to test.portletKey
- the plugin id of the portlet to test.
public boolean canUserSeePortlet(User user, Portlet portlet)
PortalPageManager
canUserSeePortlet
in interface PortalPageManager
user
- the user to test.portlet
- the portlet to check.
public boolean doesPortletExist(String portletKey)
PortalPageManager
doesPortletExist
in interface PortalPageManager
portletKey
- the identifier of the Portlet
public Collection getVisiblePortlets(User user)
PortalPageManager
Portlet
's a user can see
getVisiblePortlets
in interface PortalPageManager
user
- the user in play
Portlet
's the user can seepublic Portlet getVisiblePortlet(User user, String portletKey)
PortalPageManager
Portlet
if the user can see it
getVisiblePortlet
in interface PortalPageManager
user
- the User in playportletKey
- the plugin id of the Portlet
Portlet
if the user can see itpublic SharedEntitySearchResult search(SharedEntitySearchParameters searchParameters, 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |