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
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationEventPublisher
protected com.google.common.collect.Multimap<String,
UserSubstitution> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addUserSubstitution
(UserSubstitution userSubstitution) void
clear()
protected void
fireUserSubstitutionsChanged
(String username) getUserSubstitutions
(String username, Date date) Method returns a collection ofUserSubstitution
available for the givenusername
and active at the givendate
.protected void
onUserRemove
(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:UserSubstitutionProvider
Method returns a collection ofUserSubstitution
available for the givenusername
and active at the givendate
. IfUserSubstitution.startDate
andUserSubstitution.endDate
are null then this substitution is considered active.- Specified by:
getUserSubstitutions
in interfaceUserSubstitutionProvider
-
addUserSubstitution
-
clear
public void clear() -
onUserRemove
-
fireUserSubstitutionsChanged
-