RichSession

org.scalatra.servlet.RichSession
case class RichSession(session: HttpSession) extends AttributesMap

Extension methods to the standard HttpSession.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def id: String

Inherited methods

def +=(kv: (String, Any)): AttributesMap.this.type

Sets an attribute on the underlying servlet object.

Sets an attribute on the underlying servlet object.

Value parameters

kv

the key/value pair. If the value is null, has the same effect as calling -=(kv._1).

Attributes

Returns

the map itself

Inherited from:
AttributesMap
def -=(key: String): AttributesMap.this.type

Removes an attribute from the underlying servlet object.

Removes an attribute from the underlying servlet object.

Value parameters

key

the key to remove

Attributes

Returns

the map itself

Inherited from:
AttributesMap
def apply(key: String): Any

Returns the attribute associated with the key or throw an exception when nothing found

Returns the attribute associated with the key or throw an exception when nothing found

Value parameters

key

The key to find

Attributes

Returns

an value for the attributed associated with the key in the underlying servlet object, or throw an exception if the key doesn't exist

Inherited from:
AttributesMap
def as[T](key: String)(implicit converter: TypeConverter[Any, T]): T

Returns the attribute associated with the key or throw an exception when nothing found

Returns the attribute associated with the key or throw an exception when nothing found

Type parameters

T

The type of the value

Value parameters

key

The key to find

Attributes

Returns

an value for the attributed associated with the key in the underlying servlet object, or throw an exception if the key doesn't exist

Inherited from:
AttributesMap
def contains(key: String): Boolean

Returns whether the specified key exists

Returns whether the specified key exists

Attributes

Returns

whether the specified key exists

Inherited from:
AttributesMap
def dumpAll: String

dumps all keys and values

dumps all keys and values

Attributes

Inherited from:
AttributesMap
def foreach[U](f: ((String, Any)) => U): Unit

Applies a function f to add attribute elements

Applies a function f to add attribute elements

Attributes

Inherited from:
AttributesMap
def get(key: String): Option[Any]

Optionally returns the attribute associated with the key

Optionally returns the attribute associated with the key

Value parameters

key

The key to find

Attributes

Returns

an option value containing the attribute associated with the key in the underlying servlet object, or None if none exists.

Inherited from:
AttributesMap
def getAs[T](key: String)(implicit converter: TypeConverter[Any, T]): Option[T]

Optionally returns and type cast the attribute associated with the key

Optionally returns and type cast the attribute associated with the key

Type parameters

T

The type of the value

Value parameters

key

The key to find

Attributes

Returns

an option value containing the attributed associated with the key in the underlying servlet object, or None if none exists

Inherited from:
AttributesMap
def getAsOrElse[T](key: String, default: => T)(implicit converter: TypeConverter[Any, T]): T

Returns the attribute associated with the key or default value

Returns the attribute associated with the key or default value

Type parameters

T

The type of the value

Value parameters

default

The default value, it will be returned when the key does not exist

key

The key to find

Attributes

Returns

an value for the attributed associated with the key in the underlying servlet object, or the default value if the key doesn't exist

Inherited from:
AttributesMap
def getOrElse(key: String, default: => Any): Any

Returns the attribute associated with the key or default value

Returns the attribute associated with the key or default value

Value parameters

default

The default value, it will be returned when the key does not exist

key

The key to find

Attributes

Returns

an value for the attributed associated with the key in the underlying servlet object, or the default value if the key doesn't exist

Inherited from:
AttributesMap
def getOrElseUpdate(key: String, value: => Any): Any

Returns the attribute associated with the key or update attributes with the specified value

Returns the attribute associated with the key or update attributes with the specified value

Value parameters

key

The key to find

value

The value that will be updated the attribute associated with the key when the key does not exist

Attributes

Returns

an value for the attributed associated with the key in the underlying servlet object, or the updated value if the key doesn't exist

Inherited from:
AttributesMap
def iterator: Iterator[(String, Any)]

Creates a new iterator over all attributes in the underlying servlet object.

Creates a new iterator over all attributes in the underlying servlet object.

Attributes

Returns

the new iterator

Inherited from:
AttributesMap
def keys: Iterator[String]

Returns an attributes keys

Returns an attributes keys

Attributes

Inherited from:
AttributesMap
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def update(key: String, value: Any): Unit

Updates the attribute associated with the key

Updates the attribute associated with the key

Value parameters

key

The key to update

value

The value to update

Attributes

Inherited from:
AttributesMap