Package org.togglz.spring.repository
Class ApplicationEventPublisherRepository
- java.lang.Object
-
- org.togglz.spring.repository.ApplicationEventPublisherRepository
-
- All Implemented Interfaces:
StateRepository
public class ApplicationEventPublisherRepository extends Object implements StateRepository
Implementation ofStateRepositorythat publishes aFeatureStateChangedEventwhen theStateRepository.setFeatureState(FeatureState)method is called- Author:
- Igor Khudoshin
-
-
Constructor Summary
Constructors Constructor Description ApplicationEventPublisherRepository(StateRepository delegate, org.springframework.context.ApplicationEventPublisher applicationEventPublisher)Creates a facade for the suppliedStateRepository.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FeatureStategetFeatureState(Feature feature)voidsetFeatureState(FeatureState featureState)
-
-
-
Constructor Detail
-
ApplicationEventPublisherRepository
public ApplicationEventPublisherRepository(StateRepository delegate, org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
Creates a facade for the suppliedStateRepository.- Parameters:
delegate- The repository to delegate invocations toapplicationEventPublisher- TheApplicationEventPublisherto publish theFeatureStateChangedEventto
-
-
Method Detail
-
getFeatureState
public FeatureState getFeatureState(Feature feature)
- Specified by:
getFeatureStatein interfaceStateRepository
-
setFeatureState
public void setFeatureState(FeatureState featureState)
- Specified by:
setFeatureStatein interfaceStateRepository
-
-