com.atlassian.jira.portal
Class AbstractPortalManager

java.lang.Object
  extended bycom.atlassian.jira.portal.AbstractPortalManager
All Implemented Interfaces:
PortalManager
Direct Known Subclasses:
DefaultPortalManager, ProfessionalPortalManager

public abstract class AbstractPortalManager
extends java.lang.Object
implements PortalManager


Field Summary
protected  OfBizDelegator delegator
           
protected  org.apache.log4j.Category log
           
protected  com.atlassian.plugin.PluginManager pluginManager
           
 
Fields inherited from interface com.atlassian.jira.portal.PortalManager
DASHBOARD_PAGE_NAME, SYSTEM_PORTLET_PACKAGE
 
Constructor Summary
AbstractPortalManager(com.atlassian.plugin.PluginManager pluginManager, OfBizDelegator delegator, CollectionReorderer collectionReorderer)
           
 
Method Summary
 java.lang.Long createPortalPageConfiguration(com.opensymphony.user.User u, java.lang.String pagename, java.lang.String description)
          Creates a new Portal Page Configuration in the database.
 java.lang.Long createPortalPageConfiguration(com.opensymphony.user.User u, java.lang.String pagename, java.lang.String description, java.lang.Long copyPageId)
           
 void decreasePageConfigurationSequence(com.opensymphony.user.User remoteUser, int position)
           
 void deletePortalPageConfiguration(com.opensymphony.user.User u, java.lang.Long pageId)
          This function removed a portal page configuration for a user including all of its portlet configurations and there properties
 java.util.Collection getAllPortlets()
          Get all the available portlets.
 PortalPageConfiguration getDefaultPortalPage()
          Goes to the database and fetches the default dashboard configuration.
 PortalPageConfiguration getEditablePortalPageConfiguration(com.opensymphony.user.User user, java.lang.Long pageId)
           
 PortalPageConfiguration getPortalPageConfiguration(com.opensymphony.user.User user, java.lang.Long pageId)
          Get a portlet configuration for a particular user and page from the database.
 java.util.Map getPortalPageConfigurations(com.opensymphony.user.User user)
          Get all the portal pages for a given user.
 Portlet getPortlet(java.lang.String id)
          Get a particular portlet, based on it's id.
 java.util.Collection getPortlets(com.opensymphony.user.User user)
          This function returns all the portlets a user has permission to see.
 void increasePageConfigurationSequence(com.opensymphony.user.User remoteUser, int position)
          Increases the position of the page configuration ofr the user's page configuration set
protected abstract  boolean isAllowedPortalName(java.lang.String name)
           
 boolean isDefaultPortalPageName(java.lang.String pageName)
           
 boolean isUsingDefaultPortalPageConfigurations(com.opensymphony.user.User remoteUser)
           
 void movePortlets(java.lang.Long[] selectedPortlets, PortalPageConfiguration sourcePage, PortalPageConfiguration destinationPage)
          Move portlets from one page to another
 void moveToEndPageConfigurationSequence(com.opensymphony.user.User remoteUser, int position)
           
 void moveToStartPageConfigurationSequence(com.opensymphony.user.User remoteUser, int position)
           
 void resetDefault(java.lang.String pagename)
          This function reloads the default portal page configuration from the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.portal.PortalManager
isMultiplePortalPagesEnabled
 

Field Detail

log

protected final org.apache.log4j.Category log

pluginManager

protected final com.atlassian.plugin.PluginManager pluginManager

delegator

protected final OfBizDelegator delegator
Constructor Detail

AbstractPortalManager

public AbstractPortalManager(com.atlassian.plugin.PluginManager pluginManager,
                             OfBizDelegator delegator,
                             CollectionReorderer collectionReorderer)
Method Detail

isAllowedPortalName

protected abstract boolean isAllowedPortalName(java.lang.String name)

getAllPortlets

public java.util.Collection getAllPortlets()
Get all the available portlets.

Specified by:
getAllPortlets in interface PortalManager
Returns:
A Collection of all available portlets.

getPortlets

public java.util.Collection getPortlets(com.opensymphony.user.User user)
This function returns all the portlets a user has permission to see.

Specified by:
getPortlets in interface PortalManager
Parameters:
user - requesting portlets
Returns:
List of portlets for this user

createPortalPageConfiguration

public java.lang.Long createPortalPageConfiguration(com.opensymphony.user.User u,
                                                    java.lang.String pagename,
                                                    java.lang.String description)
                                             throws PortletConfigurationException
Creates a new Portal Page Configuration in the database.

Specified by:
createPortalPageConfiguration in interface PortalManager
Parameters:
u -
pagename -
Throws:
PortletConfigurationException

createPortalPageConfiguration

public java.lang.Long createPortalPageConfiguration(com.opensymphony.user.User u,
                                                    java.lang.String pagename,
                                                    java.lang.String description,
                                                    java.lang.Long copyPageId)
                                             throws PortletConfigurationException
Specified by:
createPortalPageConfiguration in interface PortalManager
Throws:
PortletConfigurationException

getPortalPageConfiguration

public PortalPageConfiguration getPortalPageConfiguration(com.opensymphony.user.User user,
                                                          java.lang.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.

Specified by:
getPortalPageConfiguration in interface PortalManager
Throws:
PortletConfigurationException

getEditablePortalPageConfiguration

public PortalPageConfiguration getEditablePortalPageConfiguration(com.opensymphony.user.User user,
                                                                  java.lang.Long pageId)
                                                           throws PortletConfigurationException
Specified by:
getEditablePortalPageConfiguration in interface PortalManager
Throws:
PortletConfigurationException

resetDefault

public void resetDefault(java.lang.String pagename)
This function reloads the default portal page configuration from the database. Into the static variable.

Specified by:
resetDefault in interface PortalManager
Parameters:
pagename - e.g. dashboard.

getPortalPageConfigurations

public java.util.Map getPortalPageConfigurations(com.opensymphony.user.User user)
                                          throws PortletConfigurationException
Description copied from interface: PortalManager
Get all the portal pages for a given user.

Specified by:
getPortalPageConfigurations in interface PortalManager
Throws:
PortletConfigurationException

movePortlets

public void movePortlets(java.lang.Long[] selectedPortlets,
                         PortalPageConfiguration sourcePage,
                         PortalPageConfiguration destinationPage)
                  throws PortletConfigurationException,
                         org.ofbiz.core.entity.GenericEntityException
Description copied from interface: PortalManager
Move portlets from one page to another

Specified by:
movePortlets in interface PortalManager
Throws:
PortletConfigurationException
org.ofbiz.core.entity.GenericEntityException

isUsingDefaultPortalPageConfigurations

public boolean isUsingDefaultPortalPageConfigurations(com.opensymphony.user.User remoteUser)
Specified by:
isUsingDefaultPortalPageConfigurations in interface PortalManager

increasePageConfigurationSequence

public void increasePageConfigurationSequence(com.opensymphony.user.User remoteUser,
                                              int position)
                                       throws PortletConfigurationException
Description copied from interface: PortalManager
Increases the position of the page configuration ofr the user's page configuration set

Specified by:
increasePageConfigurationSequence in interface PortalManager
Parameters:
remoteUser -
position - the current position of the portal page configuration to move
Throws:
PortletConfigurationException

decreasePageConfigurationSequence

public void decreasePageConfigurationSequence(com.opensymphony.user.User remoteUser,
                                              int position)
                                       throws PortletConfigurationException
Specified by:
decreasePageConfigurationSequence in interface PortalManager
Throws:
PortletConfigurationException

moveToStartPageConfigurationSequence

public void moveToStartPageConfigurationSequence(com.opensymphony.user.User remoteUser,
                                                 int position)
                                          throws PortletConfigurationException
Specified by:
moveToStartPageConfigurationSequence in interface PortalManager
Throws:
PortletConfigurationException

moveToEndPageConfigurationSequence

public void moveToEndPageConfigurationSequence(com.opensymphony.user.User remoteUser,
                                               int position)
                                        throws PortletConfigurationException
Specified by:
moveToEndPageConfigurationSequence in interface PortalManager
Throws:
PortletConfigurationException

getDefaultPortalPage

public PortalPageConfiguration getDefaultPortalPage()
                                             throws PortletConfigurationException
Goes to the database and fetches the default dashboard configuration.

Specified by:
getDefaultPortalPage in interface PortalManager
Returns:
Throws:
PortletConfigurationException

deletePortalPageConfiguration

public void deletePortalPageConfiguration(com.opensymphony.user.User u,
                                          java.lang.Long pageId)
                                   throws PortletConfigurationException
Description copied from interface: PortalManager
This function removed a portal page configuration for a user including all of its portlet configurations and there properties

Specified by:
deletePortalPageConfiguration in interface PortalManager
Parameters:
u - Owner
pageId - id of portalpage
Throws:
PortletConfigurationException

getPortlet

public Portlet getPortlet(java.lang.String id)
Get a particular portlet, based on it's id.

Specified by:
getPortlet in interface PortalManager

isDefaultPortalPageName

public boolean isDefaultPortalPageName(java.lang.String pageName)
Specified by:
isDefaultPortalPageName in interface PortalManager


Copyright © 2002-2005 Atlassian. All Rights Reserved.