Class ListenableStateRepository

java.lang.Object
org.togglz.core.repository.listener.ListenableStateRepository
All Implemented Interfaces:
StateRepository

public class ListenableStateRepository extends Object implements StateRepository
  • Constructor Details

  • Method Details

    • addFeatureStateChangedListener

      public final void addFeatureStateChangedListener(FeatureStateChangedListener listener)
    • getFeatureState

      public FeatureState getFeatureState(Feature feature)
      Description copied from interface: StateRepository
      Get the persisted state of a feature from the repository. If the repository doesn't contain any information regarding this feature it must return null.
      Specified by:
      getFeatureState in interface StateRepository
      Parameters:
      feature - The feature to read the state for
      Returns:
      The persisted feature state or null
    • setFeatureState

      public void setFeatureState(FeatureState featureState)
      Description copied from interface: StateRepository
      Persist the supplied feature state. The repository implementation must ensure that subsequent calls to StateRepository.getFeatureState(Feature) return the same state as persisted using this method.
      Specified by:
      setFeatureState in interface StateRepository
      Parameters:
      featureState - The feature state to persist