com.atlassian.jira.web.component
Class TableLayoutFactory

java.lang.Object
  extended by com.atlassian.jira.web.component.TableLayoutFactory

public class TableLayoutFactory
extends Object

A class for creating IssueTableLayoutBean objects.


Constructor Summary
TableLayoutFactory(ColumnLayoutManager columnLayoutManager, FieldManager fieldManager, TableLayoutUtils tableLayoutUtils, ColumnLayoutItemFactory columnLayoutItemFactory, UserPreferencesManager userPreferencesManager, SearchService searchService, SearchSortUtil searchSortUtil)
           
 
Method Summary
 IssueTableLayoutBean getAllColumnsExcelLayout(SearchRequest searchRequest, User user)
           
 IssueTableLayoutBean getDashboardLayout(User user, List<String> columnNames)
          Get the columns relevant for the dashboard, but limiting to a specific list of column names.
 IssueTableLayoutBean getLinkedIssuesLayout(User user, ColumnLayoutItem columnLayoutItem)
           
 IssueTableLayoutBean getPrintableLayout(SearchRequest searchRequest, User user)
           
 IssueTableLayoutBean getStandardExcelLayout(SearchRequest searchRequest, User user)
           
 IssueTableLayoutBean getStandardLayout(SearchRequest searchRequest, User user)
           
 IssueTableLayoutBean getSubTaskIssuesLayout(User user, Issue parentIssue, SubTaskBean subTaskBean, String subTaskView, boolean timeTrackingData)
          Get the layout for sub-tasks on the view issue page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableLayoutFactory

public TableLayoutFactory(ColumnLayoutManager columnLayoutManager,
                          FieldManager fieldManager,
                          TableLayoutUtils tableLayoutUtils,
                          ColumnLayoutItemFactory columnLayoutItemFactory,
                          UserPreferencesManager userPreferencesManager,
                          SearchService searchService,
                          SearchSortUtil searchSortUtil)
Method Detail

getStandardLayout

public IssueTableLayoutBean getStandardLayout(SearchRequest searchRequest,
                                              User user)

getDashboardLayout

public IssueTableLayoutBean getDashboardLayout(User user,
                                               List<String> columnNames)
                                        throws FieldException
Get the columns relevant for the dashboard, but limiting to a specific list of column names. The column names have to match IssueFieldConstants. If you pass null you will get the default columns.

Parameters:
columnNames - The columns to display. If no columns are specified, this will default to the columns specified in the jira-application.properties file with the key represented by APKeys.ISSUE_TABLE_COLS_DASHBOARD
Returns:
A layout using the columns specified or default, with the correct display properties for the Dashboard.
Throws:
FieldException

getPrintableLayout

public IssueTableLayoutBean getPrintableLayout(SearchRequest searchRequest,
                                               User user)

getStandardExcelLayout

public IssueTableLayoutBean getStandardExcelLayout(SearchRequest searchRequest,
                                                   User user)

getAllColumnsExcelLayout

public IssueTableLayoutBean getAllColumnsExcelLayout(SearchRequest searchRequest,
                                                     User user)

getLinkedIssuesLayout

public IssueTableLayoutBean getLinkedIssuesLayout(User user,
                                                  ColumnLayoutItem columnLayoutItem)
                                           throws ColumnLayoutStorageException,
                                                  FieldException
Parameters:
user - To get the available columns from
columnLayoutItem - The column to show the 'delete' button. If null, no column will be displayed
Returns:
the IssueTableLayoutBean for linked issues display.
Throws:
FieldException - if there is a problem with the underlying retrieval of field data.
ColumnLayoutStorageException - if there is a problem with the retrieval of column layout data.

getSubTaskIssuesLayout

public IssueTableLayoutBean getSubTaskIssuesLayout(User user,
                                                   Issue parentIssue,
                                                   SubTaskBean subTaskBean,
                                                   String subTaskView,
                                                   boolean timeTrackingData)
                                            throws ColumnLayoutStorageException,
                                                   FieldException
Get the layout for sub-tasks on the view issue page.

Users can specify which columns to show in jira-application.properties. The default columns that are always shown:

The standard columns are retrieved from ColumnLayoutItemFactory.

Parameters:
user - To get the available columns from
parentIssue - The parent issue of all the subTasks
subTaskBean - The subTask bean that contains all the subtasks that will be displayed on this page
subTaskView - The 'view' which is passed to the subTaskBean to get the list of subtasks to display. Usually either 'unresolved' or 'all'
timeTrackingData - whether or not time tracking data should be shown
Returns:
the IssueTableLayoutBean based on the application configuration.
Throws:
ColumnLayoutStorageException - if there is a problem accessing the column layout backing data
FieldException - if there is a problem accessing the field backing data


Copyright © 2002-2009 Atlassian. All Rights Reserved.