com.atlassian.jira.portal
Class AbstractPortalPageImpl

java.lang.Object
  extended by com.atlassian.jira.portal.AbstractPortalPageImpl
All Implemented Interfaces:
Favourite, PortalPage, SharedEntity
Direct Known Subclasses:
DefaultPortalPageImpl, PortalPageImpl

public abstract class AbstractPortalPageImpl
extends Object
implements PortalPage


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.sharing.SharedEntity
SharedEntity.Indentifier, SharedEntity.SharePermissions, SharedEntity.TypeDescriptor
 
Field Summary
 
Fields inherited from interface com.atlassian.jira.portal.PortalPage
ENTITY_TYPE
 
Constructor Summary
protected AbstractPortalPageImpl(AbstractPortalPageImpl page)
          Constructor for use by sub-classes in order to copy PortalPage.
  AbstractPortalPageImpl(Long id, String name, String description, String ownerUserName, Long favouriteCount)
           
  AbstractPortalPageImpl(String name, String description, String ownerUserName)
           
 
Method Summary
 void addPortletConfig(PortletConfiguration portletConfiguration)
          This adds a PortletConfiguration to the PortalPage.
 void deletePortletConfig(Long portletConfigId)
          Deletes the PortletConfiguration with the portletConfigId from this PortalPage
 List getColumn(int num)
           
 int getColumnCount()
           
 List getColumns()
           
 String getDescription()
          A general description of the entity.
 SharedEntity.TypeDescriptor getEntityType()
          The type of entity it is.
 Long getFavouriteCount()
          Used as a rough guide to how many people favourited this object.
 Long getId()
          The id of the entity.
 List getLeftPortletConfigs()
           
 String getName()
          The name of the entity.
 String getOwnerUserName()
          The user name of the owner of the entity.
 SharedEntity.SharePermissions getPermissions()
          The permissions for this entity.
 PortletConfiguration getPortletConfig(Long portletConfigId)
          Returns the FIRST PortletConfiguration inside the PortalPage identified by portletConfigId
protected  Map getPortletConfigsMap()
           
 List getPortletConfigurations()
          Returns the list of PortletConfiguration objects inside the PortalPage
 List getPortletConfigurations(String portletKey)
          Returns the ALL the PortletConfiguration's inside the PortalPage which have a Portlet identified by portletKey
 List getRightPortletConfigs()
           
 void movePortletPositionColumn(Long portletConfigId, Integer column)
           
 void movePortletPositionFirst(Long portletConfigId)
           
 void movePortletPositionLast(Long portletConfigId)
           
 void movePortletPositionRow(Long portletConfigId, boolean forward)
           
protected  void putInColumn(PortletConfiguration portletConfig)
           
protected  void renumberList(List portletConfigs)
           
protected  void renumberList(List portletConfigs, Integer columnPosition)
           
 void setDescription(String description)
          Sets the description of the PortalPage
protected  void setFavouriteCount(Long favouriteCount)
           
protected  void setId(Long id)
          This is only here for Test purposes.
 void setName(String name)
          Sets the name of the PortalPage
protected  void setOwnerUserName(String ownerUserName)
           
 void setPermissions(SharedEntity.SharePermissions sharePermissions)
          Sets the SharePermission objects associated with this object
 void setPortletConfigurations(List configs)
          Set the portlets on the portalpage.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.portal.PortalPage
copy, deletePortletConfigs, isSystemDefaultPortalPage
 

Constructor Detail

AbstractPortalPageImpl

public AbstractPortalPageImpl(Long id,
                              String name,
                              String description,
                              String ownerUserName,
                              Long favouriteCount)

AbstractPortalPageImpl

public AbstractPortalPageImpl(String name,
                              String description,
                              String ownerUserName)

AbstractPortalPageImpl

protected AbstractPortalPageImpl(AbstractPortalPageImpl page)
Constructor for use by sub-classes in order to copy PortalPage.

Parameters:
page - page to copy.
Method Detail

setPortletConfigurations

public void setPortletConfigurations(List configs)
Description copied from interface: PortalPage
Set the portlets on the portalpage. The portlets will be layed within the portal page on during this call.

Specified by:
setPortletConfigurations in interface PortalPage
Parameters:
configs - the portlets to be set on this page.

getId

public Long getId()
Description copied from interface: SharedEntity
The id of the entity.

Specified by:
getId in interface PortalPage
Specified by:
getId in interface SharedEntity
Returns:
the id of the PortalPage

setId

protected void setId(Long id)
This is only here for Test purposes. You are not meant to set ids into this object. Hence the protected level protection!

Parameters:
id - the Id

getName

public String getName()
Description copied from interface: SharedEntity
The name of the entity.

Specified by:
getName in interface PortalPage
Specified by:
getName in interface SharedEntity
Returns:
the name of the PortalPage

setName

public void setName(String name)
Description copied from interface: PortalPage
Sets the name of the PortalPage

Specified by:
setName in interface PortalPage
Parameters:
name - the name of the PortalPage

getDescription

public String getDescription()
Description copied from interface: SharedEntity
A general description of the entity.

Specified by:
getDescription in interface PortalPage
Specified by:
getDescription in interface SharedEntity
Returns:
the description of the PortalPage

setDescription

public void setDescription(String description)
Description copied from interface: PortalPage
Sets the description of the PortalPage

Specified by:
setDescription in interface PortalPage
Parameters:
description - the description of the PortalPage

getFavouriteCount

public Long getFavouriteCount()
Description copied from interface: PortalPage
Used as a rough guide to how many people favourited this object. A sort of popularity count

Specified by:
getFavouriteCount in interface Favourite
Specified by:
getFavouriteCount in interface PortalPage
Returns:
a non null count of how many people have favourited this PortalPage

setFavouriteCount

protected void setFavouriteCount(Long favouriteCount)

getEntityType

public final SharedEntity.TypeDescriptor getEntityType()
Description copied from interface: SharedEntity
The type of entity it is. Examples include SearchRequest ("SearchRequest") and PortalPage ("PortalPage")

Specified by:
getEntityType in interface SharedEntity
Returns:
the type of entity.

getOwnerUserName

public String getOwnerUserName()
Description copied from interface: SharedEntity
The user name of the owner of the entity. Will always have permission to see it and see all shares.

Specified by:
getOwnerUserName in interface SharedEntity
Returns:
The user name of the user who owns this entity. May be null.

setOwnerUserName

protected void setOwnerUserName(String ownerUserName)

getPermissions

public SharedEntity.SharePermissions getPermissions()
Description copied from interface: SharedEntity
The permissions for this entity.

Specified by:
getPermissions in interface SharedEntity
Returns:
the permissions object. Must not be null.

setPermissions

public void setPermissions(SharedEntity.SharePermissions sharePermissions)
Description copied from interface: PortalPage
Sets the SharePermission objects associated with this object

Specified by:
setPermissions in interface PortalPage
Parameters:
sharePermissions - the set of SharePermission's

getPortletConfigurations

public List getPortletConfigurations()
Description copied from interface: PortalPage
Returns the list of PortletConfiguration objects inside the PortalPage

Specified by:
getPortletConfigurations in interface PortalPage
Returns:
the list of PortletConfiguration objects inside the PortalPage

getPortletConfigsMap

protected Map getPortletConfigsMap()

getLeftPortletConfigs

public List getLeftPortletConfigs()
Specified by:
getLeftPortletConfigs in interface PortalPage

getRightPortletConfigs

public List getRightPortletConfigs()
Specified by:
getRightPortletConfigs in interface PortalPage

getPortletConfig

public PortletConfiguration getPortletConfig(Long portletConfigId)
Description copied from interface: PortalPage
Returns the FIRST PortletConfiguration inside the PortalPage identified by portletConfigId

Specified by:
getPortletConfig in interface PortalPage
Parameters:
portletConfigId - the if of the PortletConfiguration to retrieve
Returns:
the PortletConfiguration inside the PortalPage or null if its not there

getPortletConfigurations

public List getPortletConfigurations(String portletKey)
Description copied from interface: PortalPage
Returns the ALL the PortletConfiguration's inside the PortalPage which have a Portlet identified by portletKey

Specified by:
getPortletConfigurations in interface PortalPage
Parameters:
portletKey - the key of the contained Portlet
Returns:
a List of PortletConfiguration's inside the PortalPage or an empty list of its not there

putInColumn

protected void putInColumn(PortletConfiguration portletConfig)

renumberList

protected void renumberList(List portletConfigs)

renumberList

protected void renumberList(List portletConfigs,
                            Integer columnPosition)

movePortletPositionColumn

public void movePortletPositionColumn(Long portletConfigId,
                                      Integer column)
Specified by:
movePortletPositionColumn in interface PortalPage

movePortletPositionRow

public void movePortletPositionRow(Long portletConfigId,
                                   boolean forward)
Specified by:
movePortletPositionRow in interface PortalPage

movePortletPositionFirst

public void movePortletPositionFirst(Long portletConfigId)
Specified by:
movePortletPositionFirst in interface PortalPage

movePortletPositionLast

public void movePortletPositionLast(Long portletConfigId)
Specified by:
movePortletPositionLast in interface PortalPage

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface PortalPage

getColumns

public List getColumns()
Specified by:
getColumns in interface PortalPage

getColumn

public List getColumn(int num)
Specified by:
getColumn in interface PortalPage

addPortletConfig

public void addPortletConfig(PortletConfiguration portletConfiguration)
Description copied from interface: PortalPage
This adds a PortletConfiguration to the PortalPage. In fact this method is not expected to be directly called outside the PortalPageService.addPortalPagePortletConfiguration(com.atlassian.jira.bc.JiraServiceContext, PortalPage, String, int, int) method.

Specified by:
addPortletConfig in interface PortalPage
Parameters:
portletConfiguration - the PortletConfiguration to add

deletePortletConfig

public void deletePortletConfig(Long portletConfigId)
Description copied from interface: PortalPage
Deletes the PortletConfiguration with the portletConfigId from this PortalPage

Specified by:
deletePortletConfig in interface PortalPage
Parameters:
portletConfigId - the id of the PortletConfiguration

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2008 Atlassian. All Rights Reserved.