com.atlassian.jira.portal
Class ProjectAndProjectCategoryValuesGenerator
java.lang.Object
com.atlassian.jira.portal.ProjectAndProjectCategoryValuesGenerator
- All Implemented Interfaces:
- com.atlassian.configurable.ValuesGenerator
public class ProjectAndProjectCategoryValuesGenerator
- extends Object
- implements com.atlassian.configurable.ValuesGenerator
Generator for project and category values.
This generator produces a map of value ->label for HTML select box options. The option may look like
All Projects
homosapian
monkey
for projects only, or:
Projects
- All Projects
- homosapian
- monkey
Project Categories
- Category 1
for projects and categories.
- Since:
- v3.11
Fields inherited from interface com.atlassian.configurable.ValuesGenerator |
NONE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProjectAndProjectCategoryValuesGenerator
public ProjectAndProjectCategoryValuesGenerator()
getValues
public Map getValues(Map params)
- Specified by:
getValues
in interface com.atlassian.configurable.ValuesGenerator
filterProjectIds
public static Set filterProjectIds(Collection projectOrCategoryIds)
- Filter project ids from the given collection. Returns a set of project ids as Long objects.
Value is a valid project id if it is a long number.
- Parameters:
projectOrCategoryIds
- collection of project or category ids
- Returns:
- set of project ids, never null
filterProjectCategoryIds
public static Set filterProjectCategoryIds(Collection projectOrCategoryIds)
- Filter project category ids from the given collection. Returns a set of project category ids as Long objects.
Value is a valid category if it takes form "catXYZ" where "cat" is the prefix (
Prefix#CATEGORY
)
and XYZ is a long number.
- Parameters:
projectOrCategoryIds
- collection of project or category ids
- Returns:
- set of project category ids, never null
Copyright © 2002-2009 Atlassian. All Rights Reserved.