com.atlassian.jira.gadgets.system
Class RoadMapResource
java.lang.Object
com.atlassian.jira.gadgets.system.AbstractResource
com.atlassian.jira.gadgets.system.RoadMapResource
public class RoadMapResource
- extends AbstractResource
REST endpoint to retrieve a list of unreleased versions, according to the input criteria. It also provides a REST
endpoint to validate the input criteria to make sure specified projects exist, etc.
- Since:
- v4.0
Method Summary |
javax.ws.rs.core.Response |
generate(String projectsOrCategories,
int days,
int num)
Generates the road map data based on the given parameters. |
boolean |
isOverdue(Version version)
|
javax.ws.rs.core.Response |
validate(String projectsOrCategories,
String days,
String num)
Validates the given configuration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_DAYS_MAX_INCL
public static final int DEFAULT_DAYS_MAX_INCL
- See Also:
- Constant Field Values
DEFAULT_NUM_MAX_INCL
public static final int DEFAULT_NUM_MAX_INCL
- See Also:
- Constant Field Values
RoadMapResource
public RoadMapResource(JiraAuthenticationContext authCtx,
PermissionManager permissionManager,
ProjectManager projectManager,
VersionManager versionManager,
SearchProvider searchProvider,
SearchService searchService,
VelocityRequestContextFactory velocityRequestContextFactory,
DateTimeFormatter dateTimeFormatter)
validate
public javax.ws.rs.core.Response validate(String projectsOrCategories,
String days,
String num)
- Validates the given configuration.
- Parameters:
projectsOrCategories
- the ids of all selected projects and project categories, concatenated by pipe symbole
(|). A special id value of "allprojects" indicates all projects are
selected. Project ids must be numeric; otherwise, the id is ignored. Category ids
must be numeric and prefixed by "cat"; otherwise, the id is ignored. If
none is selected or one of the selecte projects/categories does not exist, a validate
error is returned in the response.days
- the number of days to cover. If zero, only overdue versions will be returned. Must
not be negative. If negative or non-numeric, a validation error is returnednum
- the maximum number of results. Must be positive. if negative, zero or non-numeric, a
validation error is returned
- Returns:
- a response with status code 200 if validation passes or with status code 400 if fail, in which case,
validation errors are included in the response
generate
public javax.ws.rs.core.Response generate(String projectsOrCategories,
int days,
int num)
- Generates the road map data based on the given parameters.
- Parameters:
projectsOrCategories
- the ids of all selected projects and project categories, concatenated by pipe symbole
(|). A special id value of "allprojects" indicates all projects are
selected. Project ids must be numeric; otherwise, the id is ignored. Category ids
must be numeric and prefixed by "cat"; otherwise, the id is ignored.days
- the number of days to cover. If zero, only overdue versions will be returned. Must
not be negative.num
- the maximum number of results. Must be positive.
- Returns:
- a response with status code 200 containing
RoadMapResource.RoadMapData
. If there is an error in the processing, a
response with status code 500 is returned
isOverdue
public boolean isOverdue(Version version)
Copyright © 2002-2012 Atlassian. All Rights Reserved.