public class SessionCookieImpl extends Object implements SessionCookie
| Constructor and Description |
|---|
SessionCookieImpl(Crypto crypto,
NinjaProperties ninjaProperties) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
String |
get(String key)
Returns the value of the key or null.
|
String |
getAuthenticityToken() |
Map<String,String> |
getData() |
String |
getId() |
void |
init(Context context)
Has to be called initially.
|
boolean |
isEmpty()
Returns true if the session is empty, e.g.
|
void |
put(String key,
String value)
Puts key into session.
|
String |
remove(String key)
Removes the value of the key and returns the value or null.
|
void |
save(Context context,
Result result) |
@Inject public SessionCookieImpl(Crypto crypto, NinjaProperties ninjaProperties)
public void init(Context context)
init in interface SessionCookiecontext - public String getId()
getId in interface SessionCookiepublic Map<String,String> getData()
getData in interface SessionCookiepublic String getAuthenticityToken()
getAuthenticityToken in interface SessionCookiepublic void save(Context context, Result result)
save in interface SessionCookiepublic void put(String key, String value)
put in interface SessionCookiekey - value - public String get(String key)
get in interface SessionCookiekey - public String remove(String key)
SessionCookieremove in interface SessionCookiepublic void clear()
clear in interface SessionCookiepublic boolean isEmpty()
isEmpty in interface SessionCookieCopyright © 2013. All Rights Reserved.