com.atlassian.jira.portal
Interface PortalManager

All Known Implementing Classes:
AbstractPortalManager

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.
 

Field Detail

SYSTEM_PORTLET_PACKAGE

public static final String SYSTEM_PORTLET_PACKAGE
See Also:
Constant Field Values

DASHBOARD_PAGE_NAME

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

getPortlet

public Portlet getPortlet(String id)

getAllPortlets

public Collection getAllPortlets()

createPortalPageConfiguration

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

createPortalPageConfiguration

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

getPortalPageConfiguration

public 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

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

Throws:
PortletConfigurationException

deletePortalPageConfiguration

public 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

getPortlets

public 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

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

resetDefault

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

Parameters:
pagename - e.g. dashboard.

getPortalPageConfigurations

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

Throws:
PortletConfigurationException

movePortlets

public 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

public 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

public boolean isMultiplePortalPagesEnabled()

increasePageConfigurationSequence

public 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

public 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

public 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

public 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

public boolean isDefaultPortalPageName(String pageName)

hasAccessToPage

public 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-2006 Atlassian. All Rights Reserved.