com.atlassian.jira.security
Class JiraAuthenticationContextImpl

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

public class JiraAuthenticationContextImpl
extends java.lang.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(java.lang.String additionalBundleName)
          This method may be used to inject additional message bundles into the I18nHelper.
 I18nHelper getI18nHelper()
          Useful for localisation of messages.
 I18nHelper getI18nHelper(java.lang.String additionalBundle)
           
 java.util.Locale getLocale()
          Get the users locale.
 OutlookDate getOutlookDate()
          Method used to get a nice representation of a date using a user's locale.
static java.util.Map<java.lang.String,java.lang.Object> getRequestCache()
           
 java.lang.String getText(java.lang.String key)
           
 com.opensymphony.user.User getUser()
          Returns the currently logged in User.
 void setUser(com.opensymphony.user.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 java.util.Map<java.lang.String,java.lang.Object> getRequestCache()

getUser

public com.opensymphony.user.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 java.util.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 java.lang.String getText(java.lang.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(java.lang.String additionalBundle)
Specified by:
getI18nHelper in interface JiraAuthenticationContext

getI18nBean

public I18nBean getI18nBean(java.lang.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(com.opensymphony.user.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-2010 Atlassian. All Rights Reserved.