net.sourceforge.scopes.builders
Interface StateBuilder<T>

Type Parameters:
T - The object containing the raw data, usually a request.
All Known Implementing Classes:
StateBuilderImpl

public interface StateBuilder<T>

It represents an object that can create a state, starting from another object, usually a request, that contains the "raw" data.


Method Summary
 void addAllManagers(java.util.Map<java.lang.String,ScopeManager<? super T>> managerMap)
          Adds all the managers contained in the map.
 void addManager(java.lang.String scopeName, ScopeManager<? super T> manager)
          Adds a scope manager to the builder, to add a context to the resulting state.
 void clear()
          Clears the list of contained scope managers.
 State createState(T request)
          Creates a state from raw data, usually a request.
 

Method Detail

addManager

void addManager(java.lang.String scopeName,
                ScopeManager<? super T> manager)
Adds a scope manager to the builder, to add a context to the resulting state.

Parameters:
scopeName - The name of the scope.
manager - The manager that can build a scope.

addAllManagers

void addAllManagers(java.util.Map<java.lang.String,ScopeManager<? super T>> managerMap)
Adds all the managers contained in the map.

Parameters:
managerMap - A map of type: scope name -> scope manager.

clear

void clear()
Clears the list of contained scope managers.


createState

State createState(T request)
Creates a state from raw data, usually a request.

Parameters:
request - The raw data, i.e. the request.
Returns:
The created state.