|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.mock.security.MockSimpleAuthenticationContext
public class MockSimpleAuthenticationContext
Simple authentication context that can be used for testing.
| Constructor Summary | |
|---|---|
MockSimpleAuthenticationContext(com.atlassian.crowd.embedded.api.User user)
|
|
MockSimpleAuthenticationContext(com.atlassian.crowd.embedded.api.User user,
Locale locale)
|
|
MockSimpleAuthenticationContext(com.atlassian.crowd.embedded.api.User user,
Locale locale,
I18nHelper helper)
|
|
| Method Summary | |
|---|---|
I18nHelper |
getI18nBean()
Useful for localisation of messages. |
I18nHelper |
getI18nHelper()
Useful for localisation of messages. |
Locale |
getLocale()
Get the users locale. |
com.atlassian.crowd.embedded.api.User |
getLoggedInUser()
Returns the currently logged in User. |
OutlookDate |
getOutlookDate()
Method used to get a nice representation of a date using a user's locale. |
String |
getText(String key)
|
com.atlassian.crowd.embedded.api.User |
getUser()
Returns the currently logged in User. |
boolean |
isLoggedInUser()
Returns a boolean indicating whether there is a currently logged in user. |
void |
setLoggedInUser(com.atlassian.crowd.embedded.api.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 |
|---|
public MockSimpleAuthenticationContext(com.atlassian.crowd.embedded.api.User user)
public MockSimpleAuthenticationContext(com.atlassian.crowd.embedded.api.User user,
Locale locale)
public MockSimpleAuthenticationContext(com.atlassian.crowd.embedded.api.User user,
Locale locale,
I18nHelper helper)
| Method Detail |
|---|
public com.atlassian.crowd.embedded.api.User getLoggedInUser()
JiraAuthenticationContext
getLoggedInUser in interface JiraAuthenticationContextpublic boolean isLoggedInUser()
JiraAuthenticationContext
isLoggedInUser in interface JiraAuthenticationContextpublic com.atlassian.crowd.embedded.api.User getUser()
JiraAuthenticationContext
getUser in interface JiraAuthenticationContextpublic Locale getLocale()
JiraAuthenticationContext
getLocale in interface JiraAuthenticationContextpublic OutlookDate getOutlookDate()
JiraAuthenticationContext
getOutlookDate in interface JiraAuthenticationContextOutlookDatepublic String getText(String key)
getText in interface JiraAuthenticationContextkey - the text key
public I18nHelper getI18nHelper()
JiraAuthenticationContext
getI18nHelper in interface JiraAuthenticationContextI18nHelperpublic I18nHelper getI18nBean()
JiraAuthenticationContext
getI18nBean in interface JiraAuthenticationContextI18nHelperpublic void setLoggedInUser(com.atlassian.crowd.embedded.api.User user)
JiraAuthenticationContext
setLoggedInUser in interface JiraAuthenticationContextuser - the currently logged in user
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||