com.atlassian.jira.gadgets.system
Class IssueTableResource

java.lang.Object
  extended by com.atlassian.jira.gadgets.system.AbstractResource
      extended by com.atlassian.jira.gadgets.system.IssueTableResource

public class IssueTableResource
extends AbstractResource

REST resource to retreive a pre-rendered issue table.

Since:
v4.0

Nested Class Summary
static class IssueTableResource.IssueTable
           
 
Field Summary
protected static String PROJECT_ID
           
 
Constructor Summary
IssueTableResource(JiraAuthenticationContext authenticationContext, SearchService searchService, SearchProvider searchProvider, TableLayoutUtils tableLayoutUtils, SearchRequestService searchRequestService, FieldManager fieldManager, SearchSortUtil searchSortUtil, ProjectManager projectManager, PermissionManager permissionManager, VersionManager versionManager, VelocityRequestContextFactory velocityRequestContextFactory, ApplicationProperties applicationProperties, ColumnLayoutManager columnLayoutManager, JqlStringSupport jqlStringSupport)
           
 
Method Summary
 Map<String,String> generateColumnSortJql(SearchRequest sr, com.atlassian.jira.gadgets.system.IssueTableResource.LinkedLabelledQuery query, List<ColumnLayoutItem> columns)
           
 javax.ws.rs.core.Response getFilterTable(javax.servlet.http.HttpServletRequest request, String context, String filterId, List<String> columnNames, String sortBy, boolean isPaging, int start, String numberToShow, boolean enableSorting, boolean displayHeader, boolean showActions, boolean addDefaults)
          Validates and then creates an issue table based off a filter
 javax.ws.rs.core.Response getIterationTable(javax.servlet.http.HttpServletRequest request, String context, String projectId, boolean completed, List<String> columnNames, String sortBy, boolean isPaging, int start, String numberToShow, boolean enableSorting, boolean displayHeader, boolean showActions)
          Validates and then creates an issue table based the next unreleased version for a project
 javax.ws.rs.core.Response getJqlTable(javax.servlet.http.HttpServletRequest request, String context, String jql, String title, List<String> columnNames, String sortBy, boolean isPaging, int start, String numberToShow, boolean enableSorting, boolean displayHeader, boolean showActions, boolean addDefaults, boolean useConfiguredCols)
           
 javax.ws.rs.core.Response validateFilterTable(String filterId, List<String> columnNames, String numberToShow)
          Validates the input for an issue table based off a filter
 javax.ws.rs.core.Response validateIterationTable(String projectId, List<String> columnNames, String numberToShow)
          Validates the input for an issue table based the next unreleased version for a project
 javax.ws.rs.core.Response validateJql(String numberToShow, List<String> columnNames)
           
 
Methods inherited from class com.atlassian.jira.gadgets.system.AbstractResource
createErrorResponse, createIndexingUnavailableResponse, createValidationResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROJECT_ID

protected static final String PROJECT_ID
See Also:
Constant Field Values
Constructor Detail

IssueTableResource

public IssueTableResource(JiraAuthenticationContext authenticationContext,
                          SearchService searchService,
                          SearchProvider searchProvider,
                          TableLayoutUtils tableLayoutUtils,
                          SearchRequestService searchRequestService,
                          FieldManager fieldManager,
                          SearchSortUtil searchSortUtil,
                          ProjectManager projectManager,
                          PermissionManager permissionManager,
                          VersionManager versionManager,
                          VelocityRequestContextFactory velocityRequestContextFactory,
                          ApplicationProperties applicationProperties,
                          ColumnLayoutManager columnLayoutManager,
                          JqlStringSupport jqlStringSupport)
Method Detail

validateFilterTable

public javax.ws.rs.core.Response validateFilterTable(String filterId,
                                                     List<String> columnNames,
                                                     String numberToShow)
Validates the input for an issue table based off a filter

Parameters:
filterId - the filter id of the filter to create the table for
columnNames - the column names to display (this can be left blank to get the default columns)
numberToShow - the number of issues to display per page
Returns:
A response containing and empty 200 response or a 400 containg a ErrorCollection containg all validation errors

getFilterTable

public javax.ws.rs.core.Response getFilterTable(@Context
                                                javax.servlet.http.HttpServletRequest request,
                                                String context,
                                                String filterId,
                                                List<String> columnNames,
                                                String sortBy,
                                                boolean isPaging,
                                                int start,
                                                String numberToShow,
                                                boolean enableSorting,
                                                boolean displayHeader,
                                                boolean showActions,
                                                boolean addDefaults)
Validates and then creates an issue table based off a filter

Parameters:
filterId - the filter id of the filter to create the table for
columnNames - the column names to display (this can be left blank to get the default columns)
numberToShow - the number of issues to display per page
request - the current request.
context - the context which the table is being rendered. Used for getting default columns, and redirects
sortBy - The extra column to sort by with optional :ASC or :DESC suffix
isPaging - Is paging enabled
start - The issue to start from
enableSorting - enable sorting
displayHeader - display the header?
showActions - show the actions column
addDefaults - add the default columns to the table
Returns:
A response 200 response containing a IssueTableResource.IssueTable containg the rendered html and other nice to haves (counts, urls, titles) or a 400 containg a ErrorCollection containg all validation errors

validateJql

public javax.ws.rs.core.Response validateJql(String numberToShow,
                                             List<String> columnNames)

getJqlTable

public javax.ws.rs.core.Response getJqlTable(@Context
                                             javax.servlet.http.HttpServletRequest request,
                                             String context,
                                             String jql,
                                             String title,
                                             List<String> columnNames,
                                             String sortBy,
                                             boolean isPaging,
                                             int start,
                                             String numberToShow,
                                             boolean enableSorting,
                                             boolean displayHeader,
                                             boolean showActions,
                                             boolean addDefaults,
                                             boolean useConfiguredCols)

generateColumnSortJql

public Map<String,String> generateColumnSortJql(SearchRequest sr,
                                                com.atlassian.jira.gadgets.system.IssueTableResource.LinkedLabelledQuery query,
                                                List<ColumnLayoutItem> columns)

validateIterationTable

public javax.ws.rs.core.Response validateIterationTable(String projectId,
                                                        List<String> columnNames,
                                                        String numberToShow)
Validates the input for an issue table based the next unreleased version for a project

Parameters:
projectId - the project to get the next unreleased version for and base the table off
columnNames - the column names to display (this can be left blank to get the default columns)
numberToShow - the number of issues to display per page
Returns:
A response containing and empty 200 response or a 400 containg a ErrorCollection containg all validation errors

getIterationTable

public javax.ws.rs.core.Response getIterationTable(@Context
                                                   javax.servlet.http.HttpServletRequest request,
                                                   String context,
                                                   String projectId,
                                                   boolean completed,
                                                   List<String> columnNames,
                                                   String sortBy,
                                                   boolean isPaging,
                                                   int start,
                                                   String numberToShow,
                                                   boolean enableSorting,
                                                   boolean displayHeader,
                                                   boolean showActions)
Validates and then creates an issue table based the next unreleased version for a project

Parameters:
projectId - the project to get the next unreleased version for and base the table off
completed - Whether to show completed or uncompleted issues
columnNames - the column names to display (this can be left blank to get the default columns)
numberToShow - the number of issues to display per page
request - the current request.
context - the context which the table is being rendered. Used for getting default columns, and redirects
sortBy - The extra column to sort by with optional :ASC or :DESC suffix
isPaging - Is paging enabled
start - The issue to start from
enableSorting - enable sorting
displayHeader - display the header?
showActions - show the actions column
Returns:
A response 200 response containing a IssueTableResource.IssueTable containg the rendered html and other nice to haves (counts, urls, titles) or a 400 containg a ErrorCollection containg all validation errors


Copyright © 2002-2014 Atlassian. All Rights Reserved.