com.atlassian.jira.web.action.util
Class PortalPageDisplayBean

java.lang.Object
  extended by com.atlassian.jira.web.action.util.PortalPageDisplayBean
All Implemented Interfaces:
SharesListHelper

public class PortalPageDisplayBean
extends Object
implements SharesListHelper

Utility class for displaying a PortalPage. Does a lot of the calculations that need to be done.

Since:
v3.13

Constructor Summary
PortalPageDisplayBean(JiraAuthenticationContext authCtx, PortalPage portalPage, FavouritesService favouriteService, PermissionManager permissionManager, ShareTypeFactory shareTypeFactory, UserFormatManager userFormatManager)
           
 
Method Summary
 boolean canEditColumns()
          Is it possible to edit columns in this version of JIRA
 boolean canShare()
          Is it possible to share pages
 Collection<SharePermission> getAllSharePermissions()
           
 long getAlternateFavouriteCount()
          How many times has this page been favourited altered by whether it will disabled or enabled
 String getDescription()
           
 Long getFavouriteCount()
          How many times has this page been favourited
 Long getId()
          Return the ID of the entity that owns the shares.
 String getName()
           
 String getOwnerFullName()
           
 String getOwnerUserName()
           
 Collection<SharePermission> getSharePermissions()
          Returns the share permissions associated with the entity.
 String getShareView(SharePermission sharePermission)
          Return HTML view of the current sharing status of the page.
 String getSimpleDescription(SharePermission sharePermission)
          Return a simple description of the passed in permission.
 boolean isCurrentOwner()
           
 boolean isFavourite()
          Is this page a favourite of the current user
 boolean isPrivate()
          Is this privately shared?
 boolean isSystemDashboard()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortalPageDisplayBean

public PortalPageDisplayBean(JiraAuthenticationContext authCtx,
                             PortalPage portalPage,
                             FavouritesService favouriteService,
                             PermissionManager permissionManager,
                             ShareTypeFactory shareTypeFactory,
                             UserFormatManager userFormatManager)
Method Detail

getId

public Long getId()
Description copied from interface: SharesListHelper
Return the ID of the entity that owns the shares. Needs to be unique on a page.

Specified by:
getId in interface SharesListHelper
Returns:
the ID of the entity that owns the shared. Needs to be unique on a page.

getOwnerUserName

public String getOwnerUserName()

getOwnerFullName

public String getOwnerFullName()

getName

public String getName()

isCurrentOwner

public boolean isCurrentOwner()

getDescription

public String getDescription()

isPrivate

public boolean isPrivate()
Is this privately shared?

Specified by:
isPrivate in interface SharesListHelper
Returns:
true if its has privacy set to Private, else false

isFavourite

public boolean isFavourite()
Is this page a favourite of the current user

Returns:
true if the user has favourited this page, else false

getFavouriteCount

public Long getFavouriteCount()
How many times has this page been favourited

Returns:
the count of favourites of this page

getAlternateFavouriteCount

public long getAlternateFavouriteCount()
How many times has this page been favourited altered by whether it will disabled or enabled

Returns:
the count of favourites of this page altered by whether it will disabled or enabled

canShare

public boolean canShare()
Is it possible to share pages

Returns:
true if it is Enterprise or Professional and the current user has the Share permission

canEditColumns

public boolean canEditColumns()
Is it possible to edit columns in this version of JIRA

Returns:
true if it is possible (it is an Enterprise or Professional instance), else false

getSharePermissions

public Collection<SharePermission> getSharePermissions()
Description copied from interface: SharesListHelper
Returns the share permissions associated with the entity.

Specified by:
getSharePermissions in interface SharesListHelper
Returns:
a collection of shares associated with the entity.

getAllSharePermissions

public Collection<SharePermission> getAllSharePermissions()

getShareView

public String getShareView(SharePermission sharePermission)
Return HTML view of the current sharing status of the page.

Parameters:
sharePermission - the share permission to render.
Returns:
html view of the current sharing state.

getSimpleDescription

public String getSimpleDescription(SharePermission sharePermission)
Return a simple description of the passed in permission.

Parameters:
sharePermission - The permission to describe.
Returns:
a simple description of the passed in permission.

isSystemDashboard

public boolean isSystemDashboard()


Copyright © 2002-2013 Atlassian. All Rights Reserved.