com.atlassian.jira.portal
Class PortletImpl

java.lang.Object
  extended by com.atlassian.jira.portal.PortletImpl
All Implemented Interfaces:
Portlet
Direct Known Subclasses:
AbstractChartPortlet, AbstractRequiresUserPortlet, AbstractVotesAndWatchesPortlet, AdminPortlet, IntroductionPortlet, ProjectPortlet, ProjectsPortlet, ProjectStatsPortlet, ProjectTablePortlet, RoadMapPortlet, StatsPortlet, TextPortlet, TwoDimensionalStatsPortlet, UserIssuesPortlet

public class PortletImpl
extends Object
implements Portlet


Field Summary
protected  ApplicationProperties applicationProperties
           
protected  JiraAuthenticationContext authenticationContext
           
protected  PermissionManager permissionManager
           
 
Constructor Summary
PortletImpl(JiraAuthenticationContext authenticationContext)
          Deprecated. Use full constructor instead.
PortletImpl(JiraAuthenticationContext authenticationContext, PermissionManager permissionManager, ApplicationProperties applicationProperties)
           
 
Method Summary
 boolean equals(Object o)
           
 String getCornerThumbnail()
           
 String getCornerThumbnailPath()
           
 String getDescription()
           
 PortletModuleDescriptor getDescriptor()
           
 String getId()
           
 IssueConstant getIssueConstant(org.ofbiz.core.entity.GenericValue issueConstantGV)
           
 List getListFromMultiSelectValue(String values)
          Retrieve a list of values from delimited String.
 String getName()
           
 ObjectConfiguration getObjectConfiguration(Map params)
           
 int getPermission()
          Returns the permission required to view this portlet.
 String getTemplateLocation()
           
 String getThumbnailfile()
          The path to a thumbnail image of this portlet.
 String getThumbnailPath()
           
protected  Map<String,Object> getVelocityParams(PortletConfiguration portletConfiguration)
          Allow for the addition of additional Velocity parameters to the context.
 String getViewHtml(PortletConfiguration portletConfiguration)
           
 int hashCode()
           
 boolean hasPermission()
          Returns true if the portlet requires a specific permission to view it.
 void init(PortletModuleDescriptor descriptor)
           
protected  Boolean isEditablePortletConfig(PortletConfiguration portletConfiguration)
          This is called to work out if a PortletConfiguration is on a page that is editable or not.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

authenticationContext

protected final JiraAuthenticationContext authenticationContext

permissionManager

protected PermissionManager permissionManager

applicationProperties

protected ApplicationProperties applicationProperties
Constructor Detail

PortletImpl

@Deprecated
public PortletImpl(JiraAuthenticationContext authenticationContext)
Deprecated. Use full constructor instead.


PortletImpl

public PortletImpl(JiraAuthenticationContext authenticationContext,
                   PermissionManager permissionManager,
                   ApplicationProperties applicationProperties)
Method Detail

init

public void init(PortletModuleDescriptor descriptor)
Specified by:
init in interface Portlet

getTemplateLocation

public String getTemplateLocation()
Specified by:
getTemplateLocation in interface Portlet

isEditablePortletConfig

protected Boolean isEditablePortletConfig(PortletConfiguration portletConfiguration)
This is called to work out if a PortletConfiguration is on a page that is editable or not.

Parameters:
portletConfiguration - the PortletConfiguration in play
Returns:
Boolean.TRUE if the parent PortalPage of the PortletConfiguration is owned and hence editable by the user

getViewHtml

public String getViewHtml(PortletConfiguration portletConfiguration)
Specified by:
getViewHtml in interface Portlet

getVelocityParams

protected Map<String,Object> getVelocityParams(PortletConfiguration portletConfiguration)
Allow for the addition of additional Velocity parameters to the context. Sub-classes may wish to override this to add their own object to the velocity context

Parameters:
portletConfiguration - portlet configuration
Returns:
map of velocity parameters, never null

getObjectConfiguration

public ObjectConfiguration getObjectConfiguration(Map params)
                                           throws ObjectConfigurationException
Specified by:
getObjectConfiguration in interface Portlet
Throws:
ObjectConfigurationException

getId

public String getId()
Specified by:
getId in interface Portlet

getName

public String getName()
Specified by:
getName in interface Portlet

getDescription

public String getDescription()
Specified by:
getDescription in interface Portlet

hasPermission

public boolean hasPermission()
Description copied from interface: Portlet
Returns true if the portlet requires a specific permission to view it.

Specified by:
hasPermission in interface Portlet
Returns:
true If this portlet requires a permission i.e. getPermission != -1

getPermission

public int getPermission()
Description copied from interface: Portlet
Returns the permission required to view this portlet. See Permissions for symbolic constants.

Specified by:
getPermission in interface Portlet
Returns:
Returns a Permission. or -1 indicating no permission.

getThumbnailfile

public String getThumbnailfile()
Description copied from interface: Portlet
The path to a thumbnail image of this portlet.

Specified by:
getThumbnailfile in interface Portlet
Returns:
Path to image.

getCornerThumbnail

public String getCornerThumbnail()
Specified by:
getCornerThumbnail in interface Portlet

getThumbnailPath

public String getThumbnailPath()

getCornerThumbnailPath

public String getCornerThumbnailPath()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getDescriptor

public PortletModuleDescriptor getDescriptor()
Specified by:
getDescriptor in interface Portlet

getIssueConstant

public IssueConstant getIssueConstant(org.ofbiz.core.entity.GenericValue issueConstantGV)

getListFromMultiSelectValue

public List getListFromMultiSelectValue(String values)
Retrieve a list of values from delimited String. Used for MultiSelect Object Configurables

Parameters:
values - Delimited String
Returns:
List of Strings, never null


Copyright © 2002-2009 Atlassian. All Rights Reserved.