public class ProjectsAndProjectCategoriesResource extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ProjectsAndProjectCategoriesResource.Option |
static class |
ProjectsAndProjectCategoriesResource.ProjectAndCategories |
Modifier and Type | Field and Description |
---|---|
static String |
ALL_CATEGORIES |
static String |
ALL_PROJECTS |
Constructor and Description |
---|
ProjectsAndProjectCategoriesResource(JiraAuthenticationContext authenticationContext,
PermissionManager permissionManager) |
Modifier and Type | Method and Description |
---|---|
static Set<Long> |
filterProjectCategoryIds(Collection<String> projectOrCategoryIds)
Filter project category ids from the given collection.
|
static Set<Long> |
filterProjectIds(Collection<String> projectOrCategoryIds)
Filter project ids from the given collection.
|
javax.ws.rs.core.Response |
generate()
Generates an option list of all projects and categories.
|
public static final String ALL_PROJECTS
public static final String ALL_CATEGORIES
public ProjectsAndProjectCategoriesResource(JiraAuthenticationContext authenticationContext, PermissionManager permissionManager)
public javax.ws.rs.core.Response generate()
This is the only REST endpoint, accessed via a GET method to the path annotating the class.
Currently, there is no parameter required.
The returned option list will always contain an option group for "Projects", which will always contain an option "All Projects" as the first element, even if there is no project at all.
The result may also contain a "Project Categories" option group, if any project is assigned a category. It should be noted that in this implementation, any existing project category is not included if there is no project is listed under that category. This is consistent with the implementation of the road map portlet.
There are some noticeable differences between this implementation of that of road map gadget:
ProjectsAndProjectCategoriesResource.ProjectAndCategories
object.public static Set<Long> filterProjectIds(Collection<String> projectOrCategoryIds)
projectOrCategoryIds
- collection of project or category idspublic static Set<Long> filterProjectCategoryIds(Collection<String> projectOrCategoryIds)
CATEGORY
) and XYZ is a
long number.projectOrCategoryIds
- collection of project or category idsCopyright © 2002-2016 Atlassian. All Rights Reserved.