Package io.tesler.core.crudma.state.impl
Class BcStateAwareImpl
- java.lang.Object
-
- io.tesler.core.crudma.state.impl.BcStateAwareImpl
-
- All Implemented Interfaces:
BcStateAware
@Component public class BcStateAwareImpl extends Object implements BcStateAware
Implementation ofBcStateAware
that Uses HTTP servlet as state provider. Uses a "ClientId" HTTP header as store key and HttpSession attribute as store- See Also:
BcStateAware
,BcState
,HttpSession
-
-
Constructor Summary
Constructors Constructor Description BcStateAwareImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear all state records for current clientBcState
getState(BusinessComponent bc)
Obtain state for business component instanceboolean
isPersisted(BusinessComponent bc)
Obtain information if this record was already persisted.void
set(BusinessComponent bc, BcState bcState)
Change state for business component instance
-
-
-
Method Detail
-
clear
public void clear()
Description copied from interface:BcStateAware
Clear all state records for current client- Specified by:
clear
in interfaceBcStateAware
-
set
public void set(BusinessComponent bc, BcState bcState)
Description copied from interface:BcStateAware
Change state for business component instance- Specified by:
set
in interfaceBcStateAware
- Parameters:
bc
- is Business component state key (name and record identifier)bcState
- is BCState that must be changed
-
getState
public BcState getState(BusinessComponent bc)
Description copied from interface:BcStateAware
Obtain state for business component instance- Specified by:
getState
in interfaceBcStateAware
- Parameters:
bc
- is Business component state key (name and record identifier)- Returns:
- a state for current business component and current client
-
isPersisted
public boolean isPersisted(BusinessComponent bc)
Description copied from interface:BcStateAware
Obtain information if this record was already persisted. This method is necessary to determine whether to create a record from current state.- Specified by:
isPersisted
in interfaceBcStateAware
- Parameters:
bc
- is Business component state key (name and record identifier)
-
-