com.atlassian.jira.portal
Interface PortalManager
- All Known Implementing Classes:
- DefaultPortalManager, ProfessionalPortalManager
Deprecated. since v3.13. Use PortalPageService
instead.
public interface PortalManager
This class is a simple wrapper around
Method Summary |
Long |
createPortalPageConfiguration(User u,
String pagename,
String description)
Deprecated. since v3.13. Use PortalPageService.createPortalPage(JiraServiceContext, PortalPage) instead. |
Long |
createPortalPageConfiguration(User u,
String pagename,
String description,
Long copyPageId)
Deprecated. since v3.13. Use PortalPageService.createPortalPageByClone(JiraServiceContext, PortalPage, Long) . |
void |
decreasePageConfigurationSequence(User user,
int position)
Deprecated. since v3.13. Use PortalPageService.decreasePortalPageSequence(JiraServiceContext, Long) instead. |
void |
deletePortalPageConfiguration(User u,
Long pageId)
Deprecated. since v3.13. Use PortalPageService.deletePortalPage(JiraServiceContext, Long) instead. |
Collection |
getAllPortlets()
Deprecated. since v3.13. Use PortletAccessManager.getAllPortlets() instead. |
PortalPageConfiguration |
getDefaultPortalPage()
Deprecated. since v3.13. Use PortalPageService.getSystemDefaultPortalPage() instead. |
PortalPageConfiguration |
getEditablePortalPageConfiguration(User user,
Long pageId)
Deprecated. since v3.13. Use PortalPageService.getPortalPage(com.atlassian.jira.bc.JiraServiceContext, Long)
instead. |
PortalPageConfiguration |
getPortalPageConfiguration(User u,
Long pageId)
Deprecated. since v3.13. Use PortalPageService.getPortalPage(com.atlassian.jira.bc.JiraServiceContext, Long) and
PortalPageService.getSystemDefaultPortalPage() and an if statement instead. |
Map |
getPortalPageConfigurations(User user)
Deprecated. since v3.13. Use PortalPageService.getFavouritePortalPages(com.opensymphony.user.User) instead
and check the owner of the PortalPage is the same user. |
Portlet |
getPortlet(String id)
Deprecated. since v3.13. Use PortletAccessManager.getPortlet(String) instead. |
Collection |
getPortlets(User user)
Deprecated. since v3.13. Use PortletAccessManager.getVisiblePortlets(com.opensymphony.user.User) instead. |
boolean |
hasAccessToPage(User user,
Long selectPageId)
Deprecated. since v3.13. Use PortalPageService.getPortalPage(com.atlassian.jira.bc.JiraServiceContext, Long)
and check that its not null. |
void |
increasePageConfigurationSequence(User user,
int position)
Deprecated. since v3.13. Use PortalPageService.increasePortalPageSequence(JiraServiceContext, Long) instead. |
boolean |
isDefaultPortalPageName(String pageName)
Deprecated. since v3.13. There is no direct replacement for this method since the name "Dashboard" is no longer magic. |
boolean |
isMultiplePortalPagesEnabled()
Deprecated. since v3.13. Use PortalPageService.isMultiplePortalPagesEnabled() instead. |
boolean |
isUsingDefaultPortalPageConfigurations(User user)
Deprecated. since v3.13. Use PortalPageService.getOwnedPortalPages(com.opensymphony.user.User) and check that the returned collection is empty . |
void |
movePortlets(Long[] selectedPortlets,
PortalPageConfiguration sourcePage,
PortalPageConfiguration destinationPage)
Deprecated. since v3.13. Use PortalPageService.movePortletConfigurationToPortalPage(JiraServiceContext, PortalPage, PortalPage, Long) instead. |
void |
moveToEndPageConfigurationSequence(User user,
int position)
Deprecated. since v3.13. Use PortalPageService.moveToEndPortalPageSequence(JiraServiceContext, Long) instead. |
void |
moveToStartPageConfigurationSequence(User user,
int position)
Deprecated. since v3.13. Use PortalPageService.moveToStartPortalPageSequence(JiraServiceContext, Long) instead. |
void |
resetDefault(String pagename)
Deprecated. since v3.13. There is no need to call this method. |
void |
updatePortalPage(User user,
Long pageId,
String name,
String description)
Deprecated. since v3.12. Use PortalPageService.updatePortalPage(JiraServiceContext, PortalPage) instead. |
SYSTEM_PORTLET_PACKAGE
static final String SYSTEM_PORTLET_PACKAGE
- Deprecated.
- See Also:
- Constant Field Values
DASHBOARD_PAGE_NAME
static final String DASHBOARD_PAGE_NAME
- Deprecated.
- See Also:
- Constant Field Values
getPortlet
Portlet getPortlet(String id)
- Deprecated. since v3.13. Use
PortletAccessManager.getPortlet(String)
instead.
- Return portlet identified by the passed portlet key.
- Parameters:
id
- the plugin key of the portlet to return.
- Returns:
- the portlet if it exists or null otherwise.
getAllPortlets
Collection getAllPortlets()
- Deprecated. since v3.13. Use
PortletAccessManager.getAllPortlets()
instead.
- Return all the portlets on the system.
- Returns:
- all the portlets available in the system. Null should never be returned.
createPortalPageConfiguration
Long createPortalPageConfiguration(User u,
String pagename,
String description)
throws PortletConfigurationException
- Deprecated. since v3.13. Use
PortalPageService.createPortalPage(JiraServiceContext, PortalPage)
instead.
- Create a new portal page in JIRA. The new page will be blank unless the name is 'System Dashboard'. When named
'System Dashboard' the new page will be a copy of the 'System Dashboard'.
- Parameters:
u
- the user creating the page.pagename
- the name of the page.description
- the description for the page.
- Returns:
- the id of the page created or null if an error occurred.
- Throws:
PortletConfigurationException
- when an error occurs during page creation.
createPortalPageConfiguration
Long createPortalPageConfiguration(User u,
String pagename,
String description,
Long copyPageId)
throws PortletConfigurationException
- Deprecated. since v3.13. Use
PortalPageService.createPortalPageByClone(JiraServiceContext, PortalPage, Long)
.
- Create a new portal page in JIRA by copying one already in the system.
- Parameters:
u
- the user creating the page.pagename
- the name of the page.description
- the description for the page.copyPageId
- the id of the page to copy.
- Returns:
- the id of the page created or null if an error occurred.
- Throws:
PortletConfigurationException
- when an error occurs during page creation.
getPortalPageConfiguration
PortalPageConfiguration getPortalPageConfiguration(User u,
Long pageId)
throws PortletConfigurationException
- Deprecated. since v3.13. Use
PortalPageService.getPortalPage(com.atlassian.jira.bc.JiraServiceContext, Long)
and
PortalPageService.getSystemDefaultPortalPage()
and an if statement instead.
- Get a portal page configuration from the database. The will return the
the the system default portal page configuration if no such portal page configuration exists.
- Parameters:
u
- the user.pageId
- id of portal page to return. Passing null will return the system default dashboard.
- Returns:
- the requested page.
- Throws:
PortletConfigurationException
- if an error occurs while retrieving the portal page.
getEditablePortalPageConfiguration
PortalPageConfiguration getEditablePortalPageConfiguration(User user,
Long pageId)
throws PortletConfigurationException
- Deprecated. since v3.13. Use
PortalPageService.getPortalPage(com.atlassian.jira.bc.JiraServiceContext, Long)
instead.
- Get a PortalPageConfiguration from the database that the passed user can edit. The method will automatically create
a new cloned PortalPageConfiguration owned by the passed user if the requested PortalPageConfiguration cannot be edited by
the passed user. In this case, the queried and returned PortalPageConfigurations are two different entities.
- Parameters:
user
- the user who needs the editable page configuration.pageId
- the identifier of the portal page. Can be set to null to make a copy of the system default dashboard.
- Returns:
- a PortalPageConfiguration that may be edited by the passed user. This may be a direct reference to the requested entity if the
user owns the page or a new copy of the requested entity if the user does not own the page.
- Throws:
PortletConfigurationException
- if an error occurs while looking for the portal page.
getDefaultPortalPage
PortalPageConfiguration getDefaultPortalPage()
throws PortletConfigurationException
- Deprecated. since v3.13. Use
PortalPageService.getSystemDefaultPortalPage()
instead.
- Get the configuration for the default portal page.
WARNING: This method associates the anonymous user the configuration. This will mean
that the configuration returned by this method will not be editable. To get an editable
version of the configuration call
getPortalPageConfiguration(User, Long)
.
- Returns:
- Returns the default portal page configuration
- Throws:
PortletConfigurationException
- if an error occurs while retrieving the page.
deletePortalPageConfiguration
void deletePortalPageConfiguration(User u,
Long pageId)
throws PortletConfigurationException
- Deprecated. since v3.13. Use
PortalPageService.deletePortalPage(JiraServiceContext, Long)
instead.
- This function removes a portal page configuration for a user including all of its portlet configurations
and their properties.
- Parameters:
u
- the user.pageId
- id of portal page to remove.
- Throws:
PortletConfigurationException
- if an error occurs while deleting the page.
updatePortalPage
void updatePortalPage(User user,
Long pageId,
String name,
String description)
- Deprecated. since v3.12. Use
PortalPageService.updatePortalPage(JiraServiceContext, PortalPage)
instead.
- Updates the page with given name and description and persists it.
- Parameters:
user
- currently logged in userpageId
- page idname
- page namedescription
- page description
getPortlets
Collection getPortlets(User user)
- Deprecated. since v3.13. Use
PortletAccessManager.getVisiblePortlets(com.opensymphony.user.User)
instead.
- This function returns all the portlets a user has permission to see.
- Parameters:
user
- requesting portlets
- Returns:
- List of portlets for this user
resetDefault
void resetDefault(String pagename)
- Deprecated. since v3.13. There is no need to call this method.
- This function reloads the default portal page configuration from the database. This is
now a no-op.
- Parameters:
pagename
- is always ignored.
getPortalPageConfigurations
Map getPortalPageConfigurations(User user)
throws PortletConfigurationException
- Deprecated. since v3.13. Use
PortalPageService.getFavouritePortalPages(com.opensymphony.user.User)
instead
and check the owner of the PortalPage is the same user.
- Get all the portal pages that the passed user should see. On < v3.12 this returned a map of owned pages.
Under >= 3.13 this will return the user's favourites (under standard it will still return owned pages).
- Parameters:
user
- the user to query for. A null user will return a map with the system dashboard.
- Returns:
- A map from PortalPageConfiguration.id -> PortalPageConfiguration.
- Throws:
PortletConfigurationException
- when an error occurs
movePortlets
void movePortlets(Long[] selectedPortlets,
PortalPageConfiguration sourcePage,
PortalPageConfiguration destinationPage)
throws PortletConfigurationException,
org.ofbiz.core.entity.GenericEntityException
- Deprecated. since v3.13. Use
PortalPageService.movePortletConfigurationToPortalPage(JiraServiceContext, PortalPage, PortalPage, Long)
instead.
- Move passed portlets portlets from one page to another.
WARNING: This method will be executed as the user who retrieved sourcePgae.
- Parameters:
selectedPortlets
- the portlets of the source page to move.sourcePage
- the page to move the portlets from.destinationPage
- the page to move the portlets onto.
- Throws:
PortletConfigurationException
- if an error occurs while moving the portlets.
org.ofbiz.core.entity.GenericEntityException
- if an error occurs while accessing the database.
isUsingDefaultPortalPageConfigurations
boolean isUsingDefaultPortalPageConfigurations(User user)
- Deprecated. since v3.13. Use
PortalPageService.getOwnedPortalPages(com.opensymphony.user.User)
and check that the returned collection is empty .
- Returns true only if the passed user has no portal owned portal pages.
- Parameters:
user
- the user to check.
- Returns:
- true if and only if the passed user has no portal pages..
isMultiplePortalPagesEnabled
boolean isMultiplePortalPagesEnabled()
- Deprecated. since v3.13. Use
PortalPageService.isMultiplePortalPagesEnabled()
instead.
- Returns true if the user is allowed to create multiple PortalPage objects. On Standard JIRA this returns False. On all other editions it returns True.
increasePageConfigurationSequence
void increasePageConfigurationSequence(User user,
int position)
throws PortletConfigurationException
- Deprecated. since v3.13. Use
PortalPageService.increasePortalPageSequence(JiraServiceContext, Long)
instead.
- Increases the position of the page in the user's favourite page list.
- Parameters:
user
- the user performing the operation.position
- the current position of the page to re-sequence.
- Throws:
PortletConfigurationException
- if an error occurs while trying to re-order the page.
decreasePageConfigurationSequence
void decreasePageConfigurationSequence(User user,
int position)
throws PortletConfigurationException
- Deprecated. since v3.13. Use
PortalPageService.decreasePortalPageSequence(JiraServiceContext, Long)
instead.
- Decreases the position of the page in the user's favourite page list.
- Parameters:
user
- the user.position
- the current position of the page to re-sequence.
- Throws:
PortletConfigurationException
- if an error occurs while trying to re-order the page.
moveToStartPageConfigurationSequence
void moveToStartPageConfigurationSequence(User user,
int position)
throws PortletConfigurationException
- Deprecated. since v3.13. Use
PortalPageService.moveToStartPortalPageSequence(JiraServiceContext, Long)
instead.
- Moves the page at the given position to the start of the user's favourite page list.
- Parameters:
user
- the user.position
- the current position of the page to re-sequence.
- Throws:
PortletConfigurationException
- if an error occurs while trying to re-order the page.
moveToEndPageConfigurationSequence
void moveToEndPageConfigurationSequence(User user,
int position)
throws PortletConfigurationException
- Deprecated. since v3.13. Use
PortalPageService.moveToEndPortalPageSequence(JiraServiceContext, Long)
instead.
- Moves the page at the given position to the end of the user's favourite page list.
- Parameters:
user
- the user performing the operation.position
- the current position of the page to resequence.
- Throws:
PortletConfigurationException
- if an error occurs while trying to re-order the page.
isDefaultPortalPageName
boolean isDefaultPortalPageName(String pageName)
- Deprecated. since v3.13. There is no direct replacement for this method since the name "Dashboard" is no longer magic.
- This method always returns false.
This method used to return true when the string 'dashboard' was passed.
In the old days dashboard's with the name 'dashboard' where treated specially. This is no longer
the case.
- Parameters:
pageName
- the page name to check
- Returns:
- always false.
hasAccessToPage
boolean hasAccessToPage(User user,
Long selectPageId)
- Deprecated. since v3.13. Use
PortalPageService.getPortalPage(com.atlassian.jira.bc.JiraServiceContext, Long)
and check that its not null.
- Return true only if the given User has permission to view the PortalPage
with the id selectPageId. If there is no such PortalPage, it returns false.
- Parameters:
user
- the user.selectPageId
- the id of the page.
- Returns:
- whether the user has access to the view PortalPage.
Copyright © 2002-2008 Atlassian. All Rights Reserved.