Task #1464 » DefaultChmiEntityEventManager.java
1 |
package eu.bcvsolutions.idm.chmi.model.service.impl; |
---|---|
2 | |
3 |
import org.springframework.beans.factory.annotation.Autowired; |
4 |
import org.springframework.context.ApplicationContext; |
5 |
import org.springframework.context.ApplicationEventPublisher; |
6 |
import org.springframework.context.annotation.Primary; |
7 |
import org.springframework.stereotype.Service; |
8 | |
9 |
import eu.bcvsolutions.idm.core.api.dto.IdmEntityEventDto; |
10 |
import eu.bcvsolutions.idm.core.api.service.EntityEventManager; |
11 |
import eu.bcvsolutions.idm.core.api.service.LookupService; |
12 |
import eu.bcvsolutions.idm.core.model.entity.IdmIdentityContract; |
13 |
import eu.bcvsolutions.idm.core.model.service.impl.DefaultEntityEventManager; |
14 |
import eu.bcvsolutions.idm.core.security.api.service.EnabledEvaluator; |
15 | |
16 |
@Primary
|
17 |
@Service("entityEventManager") |
18 |
public class DefaultChmiEntityEventManager extends DefaultEntityEventManager implements EntityEventManager { |
19 | |
20 |
@Autowired
|
21 |
public DefaultChmiEntityEventManager(ApplicationContext context, ApplicationEventPublisher publisher, |
22 |
EnabledEvaluator enabledEvaluator, LookupService lookupService) { |
23 |
super(context, publisher, enabledEvaluator, lookupService); |
24 |
}
|
25 | |
26 |
@Override
|
27 |
protected boolean isDuplicate(IdmEntityEventDto olderEvent, IdmEntityEventDto event) { |
28 |
if (IdmIdentityContract.class.getName().equals(event.getOwnerType())) { |
29 |
return false; |
30 |
}
|
31 |
return super.isDuplicate(olderEvent, event); |
32 |
}
|
33 |
}
|