Package io.jmix.core.usersubstitution
Class InMemoryUserSubstitutionProvider
java.lang.Object
io.jmix.core.usersubstitution.InMemoryUserSubstitutionProvider
- All Implemented Interfaces:
UserSubstitutionProvider
@Component("core_InMemoryUserSubstitutionProvider")
public class InMemoryUserSubstitutionProvider
extends Object
implements UserSubstitutionProvider
A
UserSubstitutionProvider that stores UserSubstitution in memory.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationEventPublisherprotected com.google.common.collect.Multimap<String,UserSubstitution> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddUserSubstitution(UserSubstitution userSubstitution) voidclear()protected voidfireUserSubstitutionsChanged(String username) getUserSubstitutions(String username, Date date) Method returns a collection ofUserSubstitutionavailable for the givenusernameand active at the givendate.protected voidonUserRemove(UserRemovedEvent event)
-
Field Details
-
userSubstitutions
-
eventPublisher
@Autowired protected org.springframework.context.ApplicationEventPublisher eventPublisher
-
-
Constructor Details
-
InMemoryUserSubstitutionProvider
public InMemoryUserSubstitutionProvider()
-
-
Method Details
-
getUserSubstitutions
Description copied from interface:UserSubstitutionProviderMethod returns a collection ofUserSubstitutionavailable for the givenusernameand active at the givendate. IfUserSubstitution.startDateandUserSubstitution.endDateare null then this substitution is considered active.- Specified by:
getUserSubstitutionsin interfaceUserSubstitutionProvider
-
addUserSubstitution
-
clear
public void clear() -
onUserRemove
-
fireUserSubstitutionsChanged
-