ninja.session
Interface SessionCookie

All Known Implementing Classes:
SessionCookieImpl

public interface SessionCookie

Session Cookie... Mostly an adaption of Play1's excellent cookie system that in turn is based on the new client side rails cookies.


Method Summary
 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)
           
 boolean isEmpty()
          Returns true if the session is empty, e.g. does not contain anything else than the timestamp key.
 void put(String key, String value)
           
 String remove(String key)
          Removes the value of the key and returns the value or null.
 void save(Context context)
           
 

Method Detail

init

void init(Context context)

getId

String getId()
Returns:
id of a session.

getData

Map<String,String> getData()
Returns:
complete content of session.

getAuthenticityToken

String getAuthenticityToken()
Returns:
an authenticity token or generates a new one.

save

void save(Context context)

put

void put(String key,
         String value)

get

String get(String key)
Returns the value of the key or null.

Parameters:
key -
Returns:

remove

String remove(String key)
Removes the value of the key and returns the value or null.

Parameters:
key -
Returns:

clear

void clear()

isEmpty

boolean isEmpty()
Returns true if the session is empty, e.g. does not contain anything else than the timestamp key.



Copyright © 2012. All Rights Reserved.