com.pyxis.greenhopper.jira.boards.context
Class DefaultBoardContext

java.lang.Object
  extended by com.pyxis.greenhopper.jira.boards.context.DefaultBoardContext
All Implemented Interfaces:
BoardContext, I18n
Direct Known Subclasses:
AnonymousBoardContext

public class DefaultBoardContext
extends java.lang.Object
implements BoardContext


Field Summary
protected  CardLayouts cardLayouts
           
protected  ListLayouts listLayouts
           
protected  org.apache.log4j.Logger log
           
protected  SummaryLayouts summaryLayouts
           
 
Constructor Summary
DefaultBoardContext(com.atlassian.jira.project.Project project, com.atlassian.crowd.embedded.api.User user)
           
 
Method Summary
 void addWatchedField(java.lang.String fieldId)
           
 java.util.Map<java.lang.String,AssigneeBoard> getAllAssigneeBoards()
           
 java.util.Map<java.lang.String,AssigneeBoard> getAllAssigneeBoards(com.atlassian.jira.project.Project project)
           
 java.util.Set<IssueField> getAllAvailableWatchedFields()
           
 java.util.Map<java.lang.String,ComponentBoard> getAllComponentBoards()
           
 java.util.TreeSet<VersionBoard> getAllSortedArchivedChartBoards()
           
 java.util.TreeSet<VersionBoard> getAllSortedVersionBoards()
           
 ArchivedChartBoard getArchivedChartBoard(com.atlassian.jira.project.version.Version version)
           
 java.util.Set<VersionBoard> getArchivedChartBoards(java.util.Collection<java.lang.String> ids)
           
 AssigneeBoard getAssigneeBoard(java.lang.String id)
           
 java.util.Map<java.lang.String,java.lang.String> getCardColors()
           
 CardLayouts getCardLayouts()
           
 ChartBoard getChartBoard(com.atlassian.jira.project.version.Version version)
           
 ChartOverviewBoard getChartOverviewBoard()
           
 ComponentAssociations getComponentAssociations()
           
 ComponentBoard getComponentBoard(java.lang.String id)
           
 ProjectConfiguration getConfiguration()
          Retrieves the project configuration
 Contexts getContexts()
           
 VersionBoard getDeepestVersionBoard()
           
 FlagField getFlagField()
           
 GreenHopper getGreenHopperService()
           
 java.lang.String getHtmlEncodedText(java.lang.String key)
           
 IssueFieldManager getIssueFieldManager()
           
 ListLayouts getListLayouts()
           
 UserBoardsPreferences getPreferences()
          Retrieves the user's project preferences
 com.atlassian.jira.project.Project getProject()
          Retrieves the board context project
 ProjectBoard getProjectBoard()
           
 java.lang.Long getProjectId()
          Retrieves the id of the board context project
 java.util.Set<IssueField> getRankingFields()
           
 VersionAssociations getReleasedVersionAssociations()
           
 java.util.Map<java.lang.String,VersionBoard> getReleasedVersionBoards()
           
 CustomFieldMultiVersion getReleasedVersionHistoryField()
           
 ScrumDefaultConfiguration getScrumConfiguration()
           
 SearchBoard getSearchBoard(java.lang.String searchType, java.lang.String searchKey)
           
 Context getSelectedContext(java.lang.String view)
          Retrieves the selected context of the selected view
 java.util.TreeSet<AssigneeBoard> getSortedAssigneeBoards()
           
 java.util.TreeSet<ComponentBoard> getSortedComponentBoards()
           
 java.util.TreeSet<VersionBoard> getSortedReleasedVersionBoards()
           
 java.util.TreeSet<VersionBoard> getSortedVersionBoards()
           
 java.util.Set<IssueField> getSortFields()
           
 SummaryLayouts getSummaryLayouts()
           
 TaskBoard getTaskBoard(java.lang.String id)
           
 TaskBoardConfiguration getTaskBoardConfiguration()
          Retrieves the project TaskBoardConfiguration
 java.lang.String getText(java.lang.String key)
           
 java.lang.String getText(java.lang.String key, java.util.Locale locale)
           
 java.lang.String getText(java.lang.String key, java.lang.Object parameters)
           
 com.atlassian.jira.timezone.TimeZoneInfo getTimeZoneInfo()
           
 java.util.Map<java.lang.String,VersionBoard> getUnreleasedVersionBoards()
           
 com.atlassian.crowd.embedded.api.User getUser()
          Retrieves the user of the board context project
 java.lang.String getUserFullName()
           
 UserBoardSettings getUserSettings()
          Retrieves the users project settings
 VersionAssociations getVersionAssociations()
           
 VersionBoard getVersionBoard(java.lang.String id)
           
 java.util.Set<VersionBoard> getVersionBoards(java.util.Collection<java.lang.String> ids)
           
 WatchedField getWatchedField(java.lang.String fieldId)
           
 java.util.Set<WatchedField> getWatchedFields()
           
 boolean isEpicLabel(com.atlassian.jira.issue.fields.CustomField field)
           
 boolean isEpicType(com.atlassian.jira.issue.issuetype.IssueType type)
           
 java.lang.String pushAssigneeBoardId(java.lang.String newId)
           
 java.lang.String pushChartBoardId(java.lang.String id)
           
 java.lang.String pushComponentBoardId(java.lang.String id)
           
 java.lang.String pushVersionBoardId(java.lang.String id, boolean unscheduleAllowed)
           
 void removeWatchedField(java.lang.String fieldId)
           
 void saveConfiguration()
          Saves the project configuration
 void savePreferences()
          Saves the user's project preferences
 void saveTaskBoardConfiguration()
          Saves the project TaskBoardConfiguration
 void saveUserSettings()
          Saves the user's project settings
 void updatePreferences(java.lang.String key, java.lang.Object value)
          Updates the user's project preferences with the new key/value pair
 void updateUserSettings(java.lang.String key, java.lang.Object value)
          Updates the user's project settings with the new key/value pair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.log4j.Logger log

cardLayouts

protected CardLayouts cardLayouts

summaryLayouts

protected SummaryLayouts summaryLayouts

listLayouts

protected ListLayouts listLayouts
Constructor Detail

DefaultBoardContext

public DefaultBoardContext(com.atlassian.jira.project.Project project,
                           com.atlassian.crowd.embedded.api.User user)
Method Detail

getGreenHopperService

public GreenHopper getGreenHopperService()
Specified by:
getGreenHopperService in interface BoardContext

getIssueFieldManager

public IssueFieldManager getIssueFieldManager()
Specified by:
getIssueFieldManager in interface BoardContext

getConfiguration

public ProjectConfiguration getConfiguration()
Description copied from interface: BoardContext
Retrieves the project configuration

Specified by:
getConfiguration in interface BoardContext
Returns:
the ProjectConfiguration

getScrumConfiguration

public ScrumDefaultConfiguration getScrumConfiguration()

getTaskBoardConfiguration

public TaskBoardConfiguration getTaskBoardConfiguration()
Description copied from interface: BoardContext
Retrieves the project TaskBoardConfiguration

Specified by:
getTaskBoardConfiguration in interface BoardContext
Returns:
the TaskBoardConfiguration

getPreferences

public UserBoardsPreferences getPreferences()
Description copied from interface: BoardContext
Retrieves the user's project preferences

Specified by:
getPreferences in interface BoardContext
Returns:
the UserBoardsPreferences

getUserSettings

public UserBoardSettings getUserSettings()
Description copied from interface: BoardContext
Retrieves the users project settings

Specified by:
getUserSettings in interface BoardContext
Returns:
the UserBoardSettings

isEpicType

public boolean isEpicType(com.atlassian.jira.issue.issuetype.IssueType type)
Specified by:
isEpicType in interface BoardContext

isEpicLabel

public boolean isEpicLabel(com.atlassian.jira.issue.fields.CustomField field)
Specified by:
isEpicLabel in interface BoardContext

updatePreferences

public void updatePreferences(java.lang.String key,
                              java.lang.Object value)
Description copied from interface: BoardContext
Updates the user's project preferences with the new key/value pair

Specified by:
updatePreferences in interface BoardContext

updateUserSettings

public void updateUserSettings(java.lang.String key,
                               java.lang.Object value)
Description copied from interface: BoardContext
Updates the user's project settings with the new key/value pair

Specified by:
updateUserSettings in interface BoardContext

saveConfiguration

public void saveConfiguration()
Description copied from interface: BoardContext
Saves the project configuration

Specified by:
saveConfiguration in interface BoardContext

saveTaskBoardConfiguration

public void saveTaskBoardConfiguration()
Description copied from interface: BoardContext
Saves the project TaskBoardConfiguration

Specified by:
saveTaskBoardConfiguration in interface BoardContext

savePreferences

public void savePreferences()
Description copied from interface: BoardContext
Saves the user's project preferences

Specified by:
savePreferences in interface BoardContext

saveUserSettings

public void saveUserSettings()
Description copied from interface: BoardContext
Saves the user's project settings

Specified by:
saveUserSettings in interface BoardContext

getProject

public com.atlassian.jira.project.Project getProject()
Description copied from interface: BoardContext
Retrieves the board context project

Specified by:
getProject in interface BoardContext
Returns:
a Project

getProjectId

public java.lang.Long getProjectId()
Description copied from interface: BoardContext
Retrieves the id of the board context project

Specified by:
getProjectId in interface BoardContext
Returns:
the id of the board context project

getUser

public com.atlassian.crowd.embedded.api.User getUser()
Description copied from interface: BoardContext
Retrieves the user of the board context project

Specified by:
getUser in interface BoardContext
Returns:
a User

getUserFullName

public java.lang.String getUserFullName()

getSelectedContext

public Context getSelectedContext(java.lang.String view)
Description copied from interface: BoardContext
Retrieves the selected context of the selected view

Specified by:
getSelectedContext in interface BoardContext
Returns:
Context

getProjectBoard

public ProjectBoard getProjectBoard()
Specified by:
getProjectBoard in interface BoardContext

getVersionBoard

public VersionBoard getVersionBoard(java.lang.String id)
Specified by:
getVersionBoard in interface BoardContext

getDeepestVersionBoard

public VersionBoard getDeepestVersionBoard()
Specified by:
getDeepestVersionBoard in interface BoardContext

getTaskBoard

public TaskBoard getTaskBoard(java.lang.String id)
Specified by:
getTaskBoard in interface BoardContext

getComponentBoard

public ComponentBoard getComponentBoard(java.lang.String id)
Specified by:
getComponentBoard in interface BoardContext

pushVersionBoardId

public java.lang.String pushVersionBoardId(java.lang.String id,
                                           boolean unscheduleAllowed)
Specified by:
pushVersionBoardId in interface BoardContext

pushChartBoardId

public java.lang.String pushChartBoardId(java.lang.String id)
Specified by:
pushChartBoardId in interface BoardContext

pushComponentBoardId

public java.lang.String pushComponentBoardId(java.lang.String id)
Specified by:
pushComponentBoardId in interface BoardContext

pushAssigneeBoardId

public java.lang.String pushAssigneeBoardId(java.lang.String newId)
Specified by:
pushAssigneeBoardId in interface BoardContext

getAssigneeBoard

public AssigneeBoard getAssigneeBoard(java.lang.String id)
Specified by:
getAssigneeBoard in interface BoardContext

getChartBoard

public ChartBoard getChartBoard(com.atlassian.jira.project.version.Version version)
Specified by:
getChartBoard in interface BoardContext

getSearchBoard

public SearchBoard getSearchBoard(java.lang.String searchType,
                                  java.lang.String searchKey)
Specified by:
getSearchBoard in interface BoardContext

getArchivedChartBoard

public ArchivedChartBoard getArchivedChartBoard(com.atlassian.jira.project.version.Version version)
Specified by:
getArchivedChartBoard in interface BoardContext

getChartOverviewBoard

public ChartOverviewBoard getChartOverviewBoard()
Specified by:
getChartOverviewBoard in interface BoardContext

getSortedVersionBoards

public java.util.TreeSet<VersionBoard> getSortedVersionBoards()
Specified by:
getSortedVersionBoards in interface BoardContext

getSortedReleasedVersionBoards

public java.util.TreeSet<VersionBoard> getSortedReleasedVersionBoards()
Specified by:
getSortedReleasedVersionBoards in interface BoardContext

getAllSortedVersionBoards

public java.util.TreeSet<VersionBoard> getAllSortedVersionBoards()
Specified by:
getAllSortedVersionBoards in interface BoardContext

getVersionBoards

public java.util.Set<VersionBoard> getVersionBoards(java.util.Collection<java.lang.String> ids)
Specified by:
getVersionBoards in interface BoardContext

getAllSortedArchivedChartBoards

public java.util.TreeSet<VersionBoard> getAllSortedArchivedChartBoards()
Specified by:
getAllSortedArchivedChartBoards in interface BoardContext
Returns:
a tree of Versions (wrapped in ChartBoards), where all released versions are present, plus their respective parent Versions, even if the parent is not yet released.

getArchivedChartBoards

public java.util.Set<VersionBoard> getArchivedChartBoards(java.util.Collection<java.lang.String> ids)
Specified by:
getArchivedChartBoards in interface BoardContext

getVersionAssociations

public VersionAssociations getVersionAssociations()
Specified by:
getVersionAssociations in interface BoardContext

getReleasedVersionAssociations

public VersionAssociations getReleasedVersionAssociations()
Specified by:
getReleasedVersionAssociations in interface BoardContext

getSortedComponentBoards

public java.util.TreeSet<ComponentBoard> getSortedComponentBoards()
Specified by:
getSortedComponentBoards in interface BoardContext

getComponentAssociations

public ComponentAssociations getComponentAssociations()
Specified by:
getComponentAssociations in interface BoardContext

getSortedAssigneeBoards

public java.util.TreeSet<AssigneeBoard> getSortedAssigneeBoards()
Specified by:
getSortedAssigneeBoards in interface BoardContext

getAllAssigneeBoards

public java.util.Map<java.lang.String,AssigneeBoard> getAllAssigneeBoards(com.atlassian.jira.project.Project project)

getCardLayouts

public CardLayouts getCardLayouts()
Specified by:
getCardLayouts in interface BoardContext

getSummaryLayouts

public SummaryLayouts getSummaryLayouts()
Specified by:
getSummaryLayouts in interface BoardContext

getListLayouts

public ListLayouts getListLayouts()
Specified by:
getListLayouts in interface BoardContext

getSortFields

public java.util.Set<IssueField> getSortFields()
Specified by:
getSortFields in interface BoardContext

getRankingFields

public java.util.Set<IssueField> getRankingFields()
Specified by:
getRankingFields in interface BoardContext

getReleasedVersionHistoryField

public CustomFieldMultiVersion getReleasedVersionHistoryField()
Specified by:
getReleasedVersionHistoryField in interface BoardContext

getFlagField

public FlagField getFlagField()
Specified by:
getFlagField in interface BoardContext

getAllAvailableWatchedFields

public java.util.Set<IssueField> getAllAvailableWatchedFields()
Specified by:
getAllAvailableWatchedFields in interface BoardContext

getWatchedFields

public java.util.Set<WatchedField> getWatchedFields()
Specified by:
getWatchedFields in interface BoardContext

addWatchedField

public void addWatchedField(java.lang.String fieldId)
                     throws GreenHopperException
Specified by:
addWatchedField in interface BoardContext
Throws:
GreenHopperException

removeWatchedField

public void removeWatchedField(java.lang.String fieldId)
Specified by:
removeWatchedField in interface BoardContext

getWatchedField

public WatchedField getWatchedField(java.lang.String fieldId)
Specified by:
getWatchedField in interface BoardContext

getCardColors

public java.util.Map<java.lang.String,java.lang.String> getCardColors()
Specified by:
getCardColors in interface BoardContext

getContexts

public Contexts getContexts()
Specified by:
getContexts in interface BoardContext

getText

public java.lang.String getText(java.lang.String key)
Specified by:
getText in interface I18n

getText

public java.lang.String getText(java.lang.String key,
                                java.util.Locale locale)
Specified by:
getText in interface I18n

getHtmlEncodedText

public java.lang.String getHtmlEncodedText(java.lang.String key)
Specified by:
getHtmlEncodedText in interface I18n

getText

public java.lang.String getText(java.lang.String key,
                                java.lang.Object parameters)
Specified by:
getText in interface I18n

getUnreleasedVersionBoards

public java.util.Map<java.lang.String,VersionBoard> getUnreleasedVersionBoards()
Specified by:
getUnreleasedVersionBoards in interface BoardContext

getReleasedVersionBoards

public java.util.Map<java.lang.String,VersionBoard> getReleasedVersionBoards()
Specified by:
getReleasedVersionBoards in interface BoardContext

getAllComponentBoards

public java.util.Map<java.lang.String,ComponentBoard> getAllComponentBoards()
Specified by:
getAllComponentBoards in interface BoardContext

getAllAssigneeBoards

public java.util.Map<java.lang.String,AssigneeBoard> getAllAssigneeBoards()
Specified by:
getAllAssigneeBoards in interface BoardContext

getTimeZoneInfo

public com.atlassian.jira.timezone.TimeZoneInfo getTimeZoneInfo()
Specified by:
getTimeZoneInfo in interface BoardContext


Copyright © 2007-2012 Atlassian. All Rights Reserved.