|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 JiraAuthenticationContext
public boolean isLoggedInUser()
JiraAuthenticationContext
isLoggedInUser
in interface JiraAuthenticationContext
public com.atlassian.crowd.embedded.api.User getUser()
JiraAuthenticationContext
getUser
in interface JiraAuthenticationContext
public Locale getLocale()
JiraAuthenticationContext
getLocale
in interface JiraAuthenticationContext
public OutlookDate getOutlookDate()
JiraAuthenticationContext
getOutlookDate
in interface JiraAuthenticationContext
OutlookDate
public String getText(String key)
getText
in interface JiraAuthenticationContext
key
- the text key
public I18nHelper getI18nHelper()
JiraAuthenticationContext
getI18nHelper
in interface JiraAuthenticationContext
I18nHelper
public I18nHelper getI18nBean()
JiraAuthenticationContext
getI18nBean
in interface JiraAuthenticationContext
I18nHelper
public void setLoggedInUser(com.atlassian.crowd.embedded.api.User user)
JiraAuthenticationContext
setLoggedInUser
in interface JiraAuthenticationContext
user
- the currently logged in user
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |