com.atlassian.jira.security
Class JiraAuthenticationContextImpl

java.lang.Object
  extended by com.atlassian.jira.security.JiraAuthenticationContextImpl
All Implemented Interfaces:
JiraAuthenticationContext

public class JiraAuthenticationContextImpl
extends Object
implements JiraAuthenticationContext


Constructor Summary
JiraAuthenticationContextImpl(com.atlassian.seraph.auth.AuthenticationContext authenticationContext, OutlookDateManager outlookDateManager)
           
 
Method Summary
static void clearRequestCache()
           
 I18nBean getI18nBean()
          Useful for localisation of messages.
 I18nBean getI18nBean(String additionalBundleName)
          This method may be used to inject additional message bundles into the I18nHelper.
 I18nHelper getI18nHelper()
          Useful for localisation of messages.
 I18nHelper getI18nHelper(String additionalBundle)
           
 Locale getLocale()
          Get the users locale.
 OutlookDate getOutlookDate()
          Method used to get a nice representation of a date using a user's locale.
static Map<String,Object> getRequestCache()
           
 String getText(String key)
           
 User getUser()
          Returns the currently logged in User.
 void setUser(User user)
          This comes to use in places like Jelly where we need to switch the identity of a user during execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiraAuthenticationContextImpl

public JiraAuthenticationContextImpl(com.atlassian.seraph.auth.AuthenticationContext authenticationContext,
                                     OutlookDateManager outlookDateManager)
Method Detail

clearRequestCache

public static void clearRequestCache()

getRequestCache

public static Map<String,Object> getRequestCache()

getUser

public User getUser()
Description copied from interface: JiraAuthenticationContext
Returns the currently logged in User.

Specified by:
getUser in interface JiraAuthenticationContext
Returns:
The logged in User, or null

getLocale

public Locale getLocale()
Description copied from interface: JiraAuthenticationContext
Get the users locale.

Specified by:
getLocale in interface JiraAuthenticationContext
Returns:
The user's locale, or the default system locale.

getOutlookDate

public OutlookDate getOutlookDate()
Description copied from interface: JiraAuthenticationContext
Method used to get a nice representation of a date using a user's locale.

Specified by:
getOutlookDate in interface JiraAuthenticationContext
Returns:
A OutlookDate

getText

public String getText(String key)
Specified by:
getText in interface JiraAuthenticationContext
Parameters:
key - the text key
Returns:
the translated text

getI18nHelper

public I18nHelper getI18nHelper()
Description copied from interface: JiraAuthenticationContext
Useful for localisation of messages.

Specified by:
getI18nHelper in interface JiraAuthenticationContext
Returns:
An instance of I18nHelper

getI18nBean

public I18nBean getI18nBean()
Description copied from interface: JiraAuthenticationContext
Useful for localisation of messages.

Specified by:
getI18nBean in interface JiraAuthenticationContext
Returns:
An instance of I18nHelper

getI18nHelper

public I18nHelper getI18nHelper(String additionalBundle)
Specified by:
getI18nHelper in interface JiraAuthenticationContext

getI18nBean

public I18nBean getI18nBean(String additionalBundleName)
Description copied from interface: JiraAuthenticationContext
This method may be used to inject additional message bundles into the I18nHelper.

Specified by:
getI18nBean in interface JiraAuthenticationContext
Parameters:
additionalBundleName - name of a resource bundle
Returns:
An instance of I18nHelper with additional message bundles.

setUser

public void setUser(User user)
Description copied from interface: JiraAuthenticationContext
This comes to use in places like Jelly where we need to switch the identity of a user during execution.

Specified by:
setUser in interface JiraAuthenticationContext
Parameters:
user - the currently logged in user


Copyright © 2002-2009 Atlassian. All Rights Reserved.