org.mb.session
Class Conversation

java.lang.Object
  extended by org.mb.session.Conversation

public class Conversation
extends java.lang.Object

Converations is whole time the app runs the same object instance witch travels from one controller to another.

Author:
gubriansky

Field Summary
static java.lang.String CANCEL_CONTROLLER
          cancel controller key
static java.lang.String CONTROLLER
          controller key
static java.lang.String MIDLET
          midlet key
 
Constructor Summary
Conversation()
           
 
Method Summary
 void addNewMap()
          resize current map and adds one new map at the end of array
 void clear()
          see init()
 java.lang.Object getAttribute(java.lang.Class key)
          Get attribute from last map in map array
 java.lang.Object getAttribute(java.lang.String key)
          Get attribute from last map in map array
 java.lang.Class getCancelController()
          Returns cancel controller class from current conversation
 java.lang.Object getController()
          return actual controller from conversation
 long getId()
          id getter
 MicroMIDlet getMIDlet()
          return actual midlet from conversation
static Conversation init()
          initialize Conversation and sets random ID
 void removeAttribute(java.lang.String formKey)
          Remove attribute from current map conversation
 void removeLastMap()
          resize current map and substracts one map from the end of array
 void setAttribute(java.lang.Class key, java.lang.Object value)
          Set attribute to last map in map array
 void setAttribute(java.lang.String key, java.lang.Object value)
          Set attribute to last map in map array
 void setId(long newId)
          id setter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CANCEL_CONTROLLER

public static final java.lang.String CANCEL_CONTROLLER
cancel controller key

See Also:
Constant Field Values

CONTROLLER

public static final java.lang.String CONTROLLER
controller key

See Also:
Constant Field Values

MIDLET

public static final java.lang.String MIDLET
midlet key

See Also:
Constant Field Values
Constructor Detail

Conversation

public Conversation()
Method Detail

init

public static Conversation init()
initialize Conversation and sets random ID

Returns:
new Conversation

clear

public void clear()
see init()


addNewMap

public void addNewMap()
resize current map and adds one new map at the end of array


removeLastMap

public void removeLastMap()
resize current map and substracts one map from the end of array


getId

public long getId()
id getter

Returns:
long id

setId

public void setId(long newId)
id setter

Parameters:
newId -

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object value)
Set attribute to last map in map array

Parameters:
key -
value -

setAttribute

public void setAttribute(java.lang.Class key,
                         java.lang.Object value)
Set attribute to last map in map array

Parameters:
key -
value -

getAttribute

public java.lang.Object getAttribute(java.lang.Class key)
Get attribute from last map in map array

Parameters:
key -
Returns:

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
Get attribute from last map in map array

Parameters:
key -
Returns:

getCancelController

public java.lang.Class getCancelController()
Returns cancel controller class from current conversation

Returns:

removeAttribute

public void removeAttribute(java.lang.String formKey)
Remove attribute from current map conversation

Parameters:
formKey -

getMIDlet

public MicroMIDlet getMIDlet()
return actual midlet from conversation

Returns:

getController

public java.lang.Object getController()
return actual controller from conversation

Returns: