Class BcStateAwareImpl

java.lang.Object
org.cxbox.core.crudma.state.impl.BcStateAwareImpl
All Implemented Interfaces:
BcStateAware

@Component public class BcStateAwareImpl extends Object implements BcStateAware
Implementation of BcStateAware that Uses HTTP servlet as state provider. Uses a "ClientId" HTTP header as store key and HttpSession attribute as store
See Also:
  • Constructor Details

    • BcStateAwareImpl

      public BcStateAwareImpl()
  • Method Details

    • clear

      public void clear(BusinessComponent bc)
      Description copied from interface: BcStateAware
      Clear all state records for current client
      Specified by:
      clear in interface BcStateAware
    • set

      public void set(BusinessComponent bc, BcState bcState)
      Description copied from interface: BcStateAware
      Change state for business component instance
      Specified by:
      set in interface BcStateAware
      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 interface BcStateAware
      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 interface BcStateAware
      Parameters:
      bc - is Business component state key (name and record identifier)