com.atlassian.jira.portal
Interface PortalManager

All Known Implementing Classes:
AbstractPortalManager, DefaultPortalManager, ProfessionalPortalManager

public interface PortalManager

Manager for Portal configuration. A user's dashboard is a portal configuration and may have a configuration


Field Summary
static String DASHBOARD_PAGE_NAME
           
static String SYSTEM_PORTLET_PACKAGE
           
 
Method Summary
 Long createPortalPageConfiguration(User u, String pagename, String description)
           
 Long createPortalPageConfiguration(User u, String pagename, String description, Long copyPageId)
           
 void decreasePageConfigurationSequence(User user, int position)
          Decreases the position of the page configuration in the user's page configuration set.
 void deletePortalPageConfiguration(User u, Long pageId)
          This function removes a portal page configuration for a user including all of its portlet configurations and their properties.
 Collection getAllPortlets()
           
 PortalPageConfiguration getDefaultPortalPage()
          Returns the default portal page configuration
 PortalPageConfiguration getEditablePortalPageConfiguration(User user, Long pageId)
           
 PortalPageConfiguration getPortalPageConfiguration(User u, Long pageId)
          Get a portlet configuration for a particular user and page from the database.
 Map getPortalPageConfigurations(User remoteUser)
          Get all the portal pages for a given user.
 Portlet getPortlet(String id)
           
 Collection getPortlets(User user)
          This function returns all the portlets a user has permission to see.
 boolean hasAccessToPage(User user, Long selectPageId)
          Return true only if the given User has permission to see the page with id selectPageId.
 void increasePageConfigurationSequence(User remoteUser, int position)
          Increases the position of the page configuration in the user's page configuration set
 boolean isDefaultPortalPageName(String pageName)
           
 boolean isMultiplePortalPagesEnabled()
           
 boolean isUsingDefaultPortalPageConfigurations(User remoteUser)
          Returns true only if the user has the default portal page configuration.
 void movePortlets(Long[] selectedPortlets, PortalPageConfiguration sourcePage, PortalPageConfiguration destinationPage)
          Move portlets from one page to another
 void moveToEndPageConfigurationSequence(User user, int position)
          Puts the page at the given position to the end fo the user's page configuration set.
 void moveToStartPageConfigurationSequence(User user, int position)
          Puts the page at the given position to the start of the user's page configuration set.
 void resetDefault(String pagename)
          This function reloads the default portal page configuration from the database.
 void updatePortalPage(User user, Long pageId, String name, String description)
          Updates the page with given name and description and persists it.
 

Field Detail

SYSTEM_PORTLET_PACKAGE

static final String SYSTEM_PORTLET_PACKAGE
See Also:
Constant Field Values

DASHBOARD_PAGE_NAME

static final String DASHBOARD_PAGE_NAME
See Also:
Constant Field Values
Method Detail

getPortlet

Portlet getPortlet(String id)

getAllPortlets

Collection getAllPortlets()

createPortalPageConfiguration

Long createPortalPageConfiguration(User u,
                                   String pagename,
                                   String description)
                                   throws PortletConfigurationException
Throws:
PortletConfigurationException

createPortalPageConfiguration

Long createPortalPageConfiguration(User u,
                                   String pagename,
                                   String description,
                                   Long copyPageId)
                                   throws PortletConfigurationException
Throws:
PortletConfigurationException

getPortalPageConfiguration

PortalPageConfiguration getPortalPageConfiguration(User u,
                                                   Long pageId)
                                                   throws PortletConfigurationException
Get a portlet configuration for a particular user and page from the database. If it does not exist, the default portlet configuration will be used.

Parameters:
u - the user.
pageId - id of portal page to remove.
Throws:
PortletConfigurationException

getDefaultPortalPage

PortalPageConfiguration getDefaultPortalPage()
                                             throws PortletConfigurationException
Returns the default portal page configuration

Throws:
PortletConfigurationException

deletePortalPageConfiguration

void deletePortalPageConfiguration(User u,
                                   Long pageId)
                                   throws PortletConfigurationException
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

updatePortalPage

void updatePortalPage(User user,
                      Long pageId,
                      String name,
                      String description)
Updates the page with given name and description and persists it.

Parameters:
user - currently logged in user
pageId - page id
name - page name
description - page description

getPortlets

Collection getPortlets(User user)
This function returns all the portlets a user has permission to see.

Parameters:
user - requesting portlets
Returns:
List of portlets for this user

getEditablePortalPageConfiguration

PortalPageConfiguration getEditablePortalPageConfiguration(User user,
                                                           Long pageId)
                                                           throws PortletConfigurationException
Throws:
PortletConfigurationException

resetDefault

void resetDefault(String pagename)
This function reloads the default portal page configuration from the database.

Parameters:
pagename - e.g. dashboard.

getPortalPageConfigurations

Map getPortalPageConfigurations(User remoteUser)
                                throws PortletConfigurationException
Get all the portal pages for a given user.

Throws:
PortletConfigurationException

movePortlets

void movePortlets(Long[] selectedPortlets,
                  PortalPageConfiguration sourcePage,
                  PortalPageConfiguration destinationPage)
                  throws PortletConfigurationException,
                         org.ofbiz.core.entity.GenericEntityException
Move portlets from one page to another

Throws:
PortletConfigurationException
org.ofbiz.core.entity.GenericEntityException

isUsingDefaultPortalPageConfigurations

boolean isUsingDefaultPortalPageConfigurations(User remoteUser)
Returns true only if the user has the default portal page configuration.

Parameters:
remoteUser - the user.
Returns:
true if and only if remoteUser has default dashboard.

isMultiplePortalPagesEnabled

boolean isMultiplePortalPagesEnabled()

increasePageConfigurationSequence

void increasePageConfigurationSequence(User remoteUser,
                                       int position)
                                       throws PortletConfigurationException
Increases the position of the page configuration in the user's page configuration set

Parameters:
remoteUser -
position - the current position of the page to resequence.
Throws:
PortletConfigurationException

decreasePageConfigurationSequence

void decreasePageConfigurationSequence(User user,
                                       int position)
                                       throws PortletConfigurationException
Decreases the position of the page configuration in the user's page configuration set.

Parameters:
user - the user.
position - the current position of the page to resequence.
Throws:
PortletConfigurationException

moveToStartPageConfigurationSequence

void moveToStartPageConfigurationSequence(User user,
                                          int position)
                                          throws PortletConfigurationException
Puts the page at the given position to the start of the user's page configuration set.

Parameters:
user - the user.
position - the current position of the page to resequence.
Throws:
PortletConfigurationException

moveToEndPageConfigurationSequence

void moveToEndPageConfigurationSequence(User user,
                                        int position)
                                        throws PortletConfigurationException
Puts the page at the given position to the end fo the user's page configuration set.

Parameters:
user -
position - the current position of the page to resequence.
Throws:
PortletConfigurationException

isDefaultPortalPageName

boolean isDefaultPortalPageName(String pageName)

hasAccessToPage

boolean hasAccessToPage(User user,
                        Long selectPageId)
Return true only if the given User has permission to see the page with id selectPageId. If there is no such page, returns false.

Parameters:
user - the user.
selectPageId - the id of the page.
Returns:
whether the user has access to the page.


Copyright © 2002-2007 Atlassian. All Rights Reserved.