com.pyxis.greenhopper.jira.boards
Class AbstractBoard

java.lang.Object
  extended by com.pyxis.greenhopper.jira.boards.AbstractBoard
All Implemented Interfaces:
Board, java.lang.Comparable<Board>
Direct Known Subclasses:
AbstractModalBoard, AbstractPlanningBoard, StepBoard

public abstract class AbstractBoard
extends java.lang.Object
implements Board, java.lang.Comparable<Board>


Field Summary
protected  java.lang.Boolean canBoardRank
           
protected  Context context
           
protected  java.lang.String id
           
protected  IssueView issueView
           
protected  org.apache.log4j.Logger log
           
protected  java.lang.String name
           
protected  TBPageFilter pager
           
 
Constructor Summary
AbstractBoard(BoardContext boardContext, java.lang.String boardId, java.lang.String boardName)
           
 
Method Summary
 boolean canBoardRank()
           
 boolean canManageStats()
           
 boolean canRank(BoardIssue boardIssue)
          Retrieves whether or not the ranking is enabled in the board
 boolean canSelect(BoardIssue boardIssue)
           
 int compareTo(Board board)
           
 int computeStartFor(com.atlassian.jira.issue.Issue issue, int fallBackStart)
          Retrieves the page number where the issue is displayed
 boolean containsIssue(com.atlassian.jira.issue.MutableIssue issueObject)
          Checks if whether or not the issue is associated with the board
 boolean equals(java.lang.Object o)
           
 void focusOn(java.lang.String focussedKey, int defaultStart)
           
 java.util.List<com.atlassian.jira.issue.Issue> getAllIssues(boolean filter)
          Retrieves ALL issues associated with the board.
 BoardContext getBoardContext()
          Retrieves the BoardContext
 BoardIssue getBoardIssue(com.atlassian.jira.issue.Issue issue)
          Retrieves the decorated isssue
 java.lang.String getBoxCss()
           
 Context getContext()
          Retrieves the selected context of the board
 java.lang.String getCursor(BoardIssue boardIssue)
          Retrieves the cursor of the issue based on the possible actions
 java.lang.String getDecoratedName()
          Retrieves the decorated name of the board
protected  int getDefaultStart()
           
 java.lang.String getDescription(com.atlassian.jira.issue.Issue issue)
           
 java.util.List<com.atlassian.jira.issue.Issue> getDisplayableIssues(java.util.List<com.atlassian.jira.issue.Issue> issues, com.atlassian.jira.issue.Issue issue)
           
 java.util.List<com.atlassian.jira.issue.Issue> getDisplayableIssuesFrom(java.util.List<com.atlassian.jira.issue.Issue> issues, int start)
           
 com.atlassian.query.Query getDisplayQuery(boolean filter)
          Builds the query of the issues to display on the board
protected  com.atlassian.jira.issue.Issue getFocussedIssue()
           
 java.util.List<com.atlassian.jira.issue.Issue> getHighLightedIssues()
           
 java.lang.String getId()
          Retrieves the unique id of the board'
 java.util.LinkedList<java.lang.String> getIssueKeys()
           
 java.util.List<com.atlassian.jira.issue.Issue> getIssues(boolean filter, com.atlassian.jira.web.bean.PagerFilter pager)
          Retrieves all issues associated with the board.
protected  java.util.List<com.atlassian.jira.issue.Issue> getIssues(com.atlassian.query.Query query, com.atlassian.jira.web.bean.PagerFilter pager)
           
 java.util.List<com.atlassian.jira.issue.Issue> getIssuesInPage(int start)
          Retrieves the issues associated with the board at the specified page start
 IssueView getIssueView()
           
 int getMaxIssues()
          Retrieves the maximum number of issues that can be displayed
 int getMaxPagine()
           
 java.lang.String getName()
          Retrieves the name of the board
 com.atlassian.query.Query getNavigatorQuery()
          Builds the pretty query (names instead of ids) to retrieve the issues associated with the board
 int getPageNumber(java.lang.Integer start)
           
 TBPageFilter getPager()
           
 TBPageFilter getPager(int start)
           
 Pagination getPagination()
           
 java.util.List<Link> getPluginLinks()
           
protected abstract  com.atlassian.query.Query getPrettyQuery()
           
 com.atlassian.jira.project.Project getProject()
          Retrieves the project that the board is associated to
 java.lang.Long getProjectId()
          Retrieves the id of the project that the board is associated to
protected abstract  com.atlassian.query.Query getQuery()
           
 com.atlassian.query.Query getQuery(boolean filter)
          Builds the query to retrieve the issues associated with the board
 java.lang.String getRawName()
           
 int getStart()
           
 BoardSummary getSummary(boolean filter)
          Retrieves the statistic component of the board
 int hashCode()
           
 boolean hasMenuItems(BoardIssue boardIssue)
          Returns whether or not the issue has menu items to display in the card menu
 boolean hideDone()
           
 boolean hideSubs()
           
protected  int indexOf(java.util.List<com.atlassian.jira.issue.Issue> issues, com.atlassian.jira.issue.Issue issue)
           
 boolean isAssignedToMeOn()
          Returns whether or not only the user issues should be displayed
 boolean isCapacitySupported()
           
 boolean isCardsDisplayed()
           
 boolean isHighLighting()
           
 boolean isListDisplayed()
           
 boolean isLocked()
           
 boolean isMarkersSupported()
           
 boolean isModifierOn()
           
protected  boolean isProjectAdmin()
           
 boolean isSelectable()
          Returns whether or not the board can be selected
 int issueCount()
          Retrieves the number of issues associated with the board under the context.
 int issuePagineCount()
           
 boolean isSummariesDisplayed()
           
 boolean showParentSubInfo()
          Show or not the parent/sub info
 boolean showProgressStats()
          Returns whether or not the progress related stats (timetracking, status) can be shown
 boolean showStats()
          Returns whether or not the watched fields stats can be shown
 java.lang.String truncate(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.pyxis.greenhopper.jira.boards.Board
canDrag, getDisplayableBoardForIssue, getKey, getView, hasSettings, isAssociatedWith, showLegendBar
 

Field Detail

log

protected final org.apache.log4j.Logger log

id

protected final java.lang.String id

name

protected java.lang.String name

context

protected Context context

issueView

protected IssueView issueView

canBoardRank

protected java.lang.Boolean canBoardRank

pager

protected TBPageFilter pager
Constructor Detail

AbstractBoard

public AbstractBoard(BoardContext boardContext,
                     java.lang.String boardId,
                     java.lang.String boardName)
Method Detail

getProject

public com.atlassian.jira.project.Project getProject()
Description copied from interface: Board
Retrieves the project that the board is associated to

Specified by:
getProject in interface Board
Returns:
the Project

getProjectId

public java.lang.Long getProjectId()
Description copied from interface: Board
Retrieves the id of the project that the board is associated to

Specified by:
getProjectId in interface Board
Returns:
the id of the project that the board is associated to

getId

public java.lang.String getId()
Description copied from interface: Board
Retrieves the unique id of the board'

Specified by:
getId in interface Board
Returns:
the unique id of the board'

getName

public java.lang.String getName()
Description copied from interface: Board
Retrieves the name of the board

Specified by:
getName in interface Board
Returns:
the name

getRawName

public java.lang.String getRawName()

getDecoratedName

public java.lang.String getDecoratedName()
Description copied from interface: Board
Retrieves the decorated name of the board

Specified by:
getDecoratedName in interface Board
Returns:
the decorated name of the board

getBoardContext

public BoardContext getBoardContext()
Description copied from interface: Board
Retrieves the BoardContext

Specified by:
getBoardContext in interface Board
Returns:
the BoardContext

issueCount

public int issueCount()
Description copied from interface: Board
Retrieves the number of issues associated with the board under the context.

Specified by:
issueCount in interface Board
Returns:
the number of issues

issuePagineCount

public int issuePagineCount()

getQuery

public com.atlassian.query.Query getQuery(boolean filter)
Description copied from interface: Board
Builds the query to retrieve the issues associated with the board

Specified by:
getQuery in interface Board
Parameters:
filter - true if the query should filter based on the context
Returns:
the Query

getDisplayQuery

public com.atlassian.query.Query getDisplayQuery(boolean filter)
Description copied from interface: Board
Builds the query of the issues to display on the board

Specified by:
getDisplayQuery in interface Board
Parameters:
filter - true if the query should filter based on the context
Returns:
the Query

getNavigatorQuery

public com.atlassian.query.Query getNavigatorQuery()
Description copied from interface: Board
Builds the pretty query (names instead of ids) to retrieve the issues associated with the board

Specified by:
getNavigatorQuery in interface Board
Returns:
the Query

getAllIssues

public java.util.List<com.atlassian.jira.issue.Issue> getAllIssues(boolean filter)
Description copied from interface: Board
Retrieves ALL issues associated with the board. To use if only the complete list of issues is required. Use Board.getIssues(boolean filter, PagerFilter pager) instead.

Specified by:
getAllIssues in interface Board
Parameters:
filter - true if the query should filter based on the context
Returns:
A collection of issue Issues

getIssues

public java.util.List<com.atlassian.jira.issue.Issue> getIssues(boolean filter,
                                                                com.atlassian.jira.web.bean.PagerFilter pager)
Description copied from interface: Board
Retrieves all issues associated with the board. Note: This does not load all results into memory and provides better performance than Board.getAllIssues(boolean filter)

Specified by:
getIssues in interface Board
Parameters:
filter - true if the query should filter based on the context
pager - Pager filter
Returns:
A collection of issue Issues

getIssueKeys

public java.util.LinkedList<java.lang.String> getIssueKeys()

getPageNumber

public int getPageNumber(java.lang.Integer start)

getDisplayableIssuesFrom

public java.util.List<com.atlassian.jira.issue.Issue> getDisplayableIssuesFrom(java.util.List<com.atlassian.jira.issue.Issue> issues,
                                                                               int start)

getDisplayableIssues

public java.util.List<com.atlassian.jira.issue.Issue> getDisplayableIssues(java.util.List<com.atlassian.jira.issue.Issue> issues,
                                                                           com.atlassian.jira.issue.Issue issue)

getIssuesInPage

public java.util.List<com.atlassian.jira.issue.Issue> getIssuesInPage(int start)
Description copied from interface: Board
Retrieves the issues associated with the board at the specified page start

Specified by:
getIssuesInPage in interface Board
Parameters:
start - pager start
Returns:
A collection of issue Issues

isHighLighting

public boolean isHighLighting()
Specified by:
isHighLighting in interface Board

getHighLightedIssues

public java.util.List<com.atlassian.jira.issue.Issue> getHighLightedIssues()
Specified by:
getHighLightedIssues in interface Board

getPagination

public Pagination getPagination()
Specified by:
getPagination in interface Board

focusOn

public void focusOn(java.lang.String focussedKey,
                    int defaultStart)
Specified by:
focusOn in interface Board

getStart

public int getStart()
Specified by:
getStart in interface Board

getMaxPagine

public int getMaxPagine()
Specified by:
getMaxPagine in interface Board

getPager

public TBPageFilter getPager(int start)

getPager

public TBPageFilter getPager()

computeStartFor

public int computeStartFor(com.atlassian.jira.issue.Issue issue,
                           int fallBackStart)
Description copied from interface: Board
Retrieves the page number where the issue is displayed

Specified by:
computeStartFor in interface Board
Returns:
page number where the issue is displayed

containsIssue

public boolean containsIssue(com.atlassian.jira.issue.MutableIssue issueObject)
Description copied from interface: Board
Checks if whether or not the issue is associated with the board

Specified by:
containsIssue in interface Board

getMaxIssues

public int getMaxIssues()
Description copied from interface: Board
Retrieves the maximum number of issues that can be displayed

Specified by:
getMaxIssues in interface Board
Returns:
the maximum number of issues that can be displayed

getContext

public Context getContext()
Description copied from interface: Board
Retrieves the selected context of the board

Specified by:
getContext in interface Board
Returns:
the Context

getSummary

public BoardSummary getSummary(boolean filter)
Description copied from interface: Board
Retrieves the statistic component of the board

Specified by:
getSummary in interface Board
Parameters:
filter - true if the query should filter based on the context
Returns:
the board BoardSummary

canManageStats

public boolean canManageStats()
Specified by:
canManageStats in interface Board

canBoardRank

public boolean canBoardRank()
Specified by:
canBoardRank in interface Board
Returns:
whether or not the ranking is enabled in the board

canRank

public boolean canRank(BoardIssue boardIssue)
Description copied from interface: Board
Retrieves whether or not the ranking is enabled in the board

Specified by:
canRank in interface Board
Returns:
True if ranking is enabled in the board

isProjectAdmin

protected boolean isProjectAdmin()

isMarkersSupported

public boolean isMarkersSupported()
Specified by:
isMarkersSupported in interface Board

isCapacitySupported

public boolean isCapacitySupported()
Specified by:
isCapacitySupported in interface Board

isLocked

public boolean isLocked()
Specified by:
isLocked in interface Board
Returns:
whether or not the board is locked.

getBoardIssue

public BoardIssue getBoardIssue(com.atlassian.jira.issue.Issue issue)
Description copied from interface: Board
Retrieves the decorated isssue

Specified by:
getBoardIssue in interface Board
Returns:
the BoardIssue

getIssueView

public IssueView getIssueView()
Specified by:
getIssueView in interface Board

isCardsDisplayed

public boolean isCardsDisplayed()
Specified by:
isCardsDisplayed in interface Board
Returns:
whether or not the Cards are displayed

isSummariesDisplayed

public boolean isSummariesDisplayed()
Specified by:
isSummariesDisplayed in interface Board
Returns:
whether or not the summary are displayed

isListDisplayed

public boolean isListDisplayed()
Specified by:
isListDisplayed in interface Board
Returns:
whether or not the list is displayed

isModifierOn

public boolean isModifierOn()
Specified by:
isModifierOn in interface Board
Returns:
whether or not a modifier is enabled

hideSubs

public boolean hideSubs()
Specified by:
hideSubs in interface Board
Returns:
if the subtasks should be hidden or not

isAssignedToMeOn

public boolean isAssignedToMeOn()
Description copied from interface: Board
Returns whether or not only the user issues should be displayed

Specified by:
isAssignedToMeOn in interface Board
Returns:
true if only the user issues needs to be displayed

hideDone

public boolean hideDone()
Specified by:
hideDone in interface Board
Returns:
if the don issues should be hidden or not

getDescription

public java.lang.String getDescription(com.atlassian.jira.issue.Issue issue)

hasMenuItems

public boolean hasMenuItems(BoardIssue boardIssue)
Description copied from interface: Board
Returns whether or not the issue has menu items to display in the card menu

Specified by:
hasMenuItems in interface Board
Parameters:
boardIssue - the selected issue
Returns:
true if any menu has any items

canSelect

public boolean canSelect(BoardIssue boardIssue)
Specified by:
canSelect in interface Board
Returns:
whether or not the issue can be selected in the board

getCursor

public java.lang.String getCursor(BoardIssue boardIssue)
Description copied from interface: Board
Retrieves the cursor of the issue based on the possible actions

Specified by:
getCursor in interface Board
Returns:
the String url path of the cursor

getBoxCss

public java.lang.String getBoxCss()
Specified by:
getBoxCss in interface Board

isSelectable

public boolean isSelectable()
Description copied from interface: Board
Returns whether or not the board can be selected

Specified by:
isSelectable in interface Board
Returns:
true if the board can be selected

showStats

public boolean showStats()
Description copied from interface: Board
Returns whether or not the watched fields stats can be shown

Specified by:
showStats in interface Board
Returns:
true if the watched fields stats can be shown

showProgressStats

public boolean showProgressStats()
Description copied from interface: Board
Returns whether or not the progress related stats (timetracking, status) can be shown

Specified by:
showProgressStats in interface Board
Returns:
true if the progress related stats can be shown

showParentSubInfo

public boolean showParentSubInfo()
Description copied from interface: Board
Show or not the parent/sub info

Specified by:
showParentSubInfo in interface Board
Returns:
true if the parent/sub info should be shown

truncate

public java.lang.String truncate(java.lang.String s)

compareTo

public int compareTo(Board board)
Specified by:
compareTo in interface java.lang.Comparable<Board>

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getQuery

protected abstract com.atlassian.query.Query getQuery()

getPrettyQuery

protected abstract com.atlassian.query.Query getPrettyQuery()

getIssues

protected java.util.List<com.atlassian.jira.issue.Issue> getIssues(com.atlassian.query.Query query,
                                                                   com.atlassian.jira.web.bean.PagerFilter pager)

indexOf

protected int indexOf(java.util.List<com.atlassian.jira.issue.Issue> issues,
                      com.atlassian.jira.issue.Issue issue)

getFocussedIssue

protected com.atlassian.jira.issue.Issue getFocussedIssue()

getDefaultStart

protected int getDefaultStart()

getPluginLinks

public java.util.List<Link> getPluginLinks()


Copyright © 2007-2011 Atlassian. All Rights Reserved.