Class ContextProviderUtils
java.lang.Object
com.atlassian.jira.projectconfig.contextproviders.ContextProviderUtils
Provides common utilities aimed at context providers, such as retrieving the current project.
- Since:
- v4.4
-
Constructor Summary
ConstructorsConstructorDescriptionContextProviderUtils(ProjectConfigRequestCache cache, OrderFactory orderFactory, ContextProviderHelper contextProviderHelper) -
Method Summary
Modifier and TypeMethodDescriptioncreateUrlBuilder(String basename) flattenErrors(ErrorCollection collection) Provides a default context that should be provided to all context providers.
-
Constructor Details
-
ContextProviderUtils
@Autowired public ContextProviderUtils(ProjectConfigRequestCache cache, OrderFactory orderFactory, ContextProviderHelper contextProviderHelper)
-
-
Method Details
-
getProject
-
getStringComparator
-
getDefaultContext
Provides a default context that should be provided to all context providers. In particular, contains:- project
- The current project, null if no project was selected
- isAdmin
- True if current user is a system admin
- isProjectAdmin
- True if current user is a project admin
- i18n
- An i18nHelper object
- Returns:
- the default context
-
flattenErrors
-
getBaseUrl
-
createUrlBuilder
-