Package io.jmix.securitydata.impl
Class DatabaseUserSubstitutionProvider
java.lang.Object
io.jmix.securitydata.impl.DatabaseUserSubstitutionProvider
- All Implemented Interfaces:
UserSubstitutionProvider
@Component("sec_DatabaseUserSubstitutionProvider")
public class DatabaseUserSubstitutionProvider
extends Object
implements UserSubstitutionProvider
A
UserSubstitutionProvider
that stores UserSubstitution
in a database.-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationEventPublisher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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
-
eventPublisher
@Autowired protected org.springframework.context.ApplicationEventPublisher eventPublisher
-
-
Constructor Details
-
DatabaseUserSubstitutionProvider
public DatabaseUserSubstitutionProvider()
-
-
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
-
onUserRemove
@Transactional @TransactionalEventListener(phase=BEFORE_COMMIT, fallbackExecution=true) protected void onUserRemove(UserRemovedEvent event) -
fireUserSubstitutionsChanged
-