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 SessionCookie
context
- public String getId()
getId
in interface SessionCookie
public Map<String,String> getData()
getData
in interface SessionCookie
public String getAuthenticityToken()
getAuthenticityToken
in interface SessionCookie
public void save(Context context, Result result)
save
in interface SessionCookie
public void put(String key, String value)
put
in interface SessionCookie
key
- value
- public String get(String key)
get
in interface SessionCookie
key
- public String remove(String key)
SessionCookie
remove
in interface SessionCookie
public void clear()
clear
in interface SessionCookie
public boolean isEmpty()
isEmpty
in interface SessionCookie
Copyright © 2013. All Rights Reserved.