com.atlassian.jira.projectconfig.contextproviders
Class ContextProviderUtils

java.lang.Object
  extended by com.atlassian.jira.projectconfig.contextproviders.ContextProviderUtils

public class ContextProviderUtils
extends Object

Provides common utilities aimed at context providers, such as retrieving the current project.

Since:
v4.4

Constructor Summary
ContextProviderUtils(ProjectConfigRequestCache cache, OrderFactory orderFactory, ContextProviderHelper contextProviderHelper)
           
 
Method Summary
 UrlBuilder createUrlBuilder(String basename)
           
 Set<String> flattenErrors(ErrorCollection collection)
           
 String getBaseUrl()
           
 Map<String,Object> getDefaultContext()
          Provides a default context that should be provided to all context providers.
 Project getProject()
           
 Comparator<String> getStringComparator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextProviderUtils

public ContextProviderUtils(ProjectConfigRequestCache cache,
                            OrderFactory orderFactory,
                            ContextProviderHelper contextProviderHelper)
Method Detail

getProject

public Project getProject()

getStringComparator

public Comparator<String> getStringComparator()

getDefaultContext

public Map<String,Object> 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:

flattenErrors

public Set<String> flattenErrors(ErrorCollection collection)

getBaseUrl

public String getBaseUrl()

createUrlBuilder

public UrlBuilder createUrlBuilder(String basename)


Copyright © 2002-2014 Atlassian. All Rights Reserved.