Search in sources :

Example 6 with AccContractAccountFilter

use of eu.bcvsolutions.idm.acc.dto.filter.AccContractAccountFilter in project CzechIdMng by bcvsolutions.

the class IdentityContractDeleteProcessor method process.

@Override
public EventResult<IdmIdentityContractDto> process(EntityEvent<IdmIdentityContractDto> event) {
    // delete relations on account (includes delete of account	)
    AccContractAccountFilter filter = new AccContractAccountFilter();
    filter.setEntityId(event.getContent().getId());
    entityAccountService.find(filter, null).forEach(entityAccount -> {
        LOG.debug("Remove contract-account for account [{}]", entityAccount.getId());
        entityAccountService.delete(entityAccount);
    });
    return new DefaultEventResult<>(event, this);
}
Also used : DefaultEventResult(eu.bcvsolutions.idm.core.api.event.DefaultEventResult) AccContractAccountFilter(eu.bcvsolutions.idm.acc.dto.filter.AccContractAccountFilter)

Aggregations

AccContractAccountFilter (eu.bcvsolutions.idm.acc.dto.filter.AccContractAccountFilter)6 AccContractAccountDto (eu.bcvsolutions.idm.acc.dto.AccContractAccountDto)4 AccAccountDto (eu.bcvsolutions.idm.acc.dto.AccAccountDto)2 DefaultEventResult (eu.bcvsolutions.idm.core.api.event.DefaultEventResult)2 UUID (java.util.UUID)2 SystemEntityType (eu.bcvsolutions.idm.acc.domain.SystemEntityType)1 AbstractSysSyncConfigDto (eu.bcvsolutions.idm.acc.dto.AbstractSysSyncConfigDto)1 AccIdentityAccountDto (eu.bcvsolutions.idm.acc.dto.AccIdentityAccountDto)1 AccRoleAccountDto (eu.bcvsolutions.idm.acc.dto.AccRoleAccountDto)1 AccRoleCatalogueAccountDto (eu.bcvsolutions.idm.acc.dto.AccRoleCatalogueAccountDto)1 AccTreeAccountDto (eu.bcvsolutions.idm.acc.dto.AccTreeAccountDto)1 SysSyncContractConfigDto (eu.bcvsolutions.idm.acc.dto.SysSyncContractConfigDto)1 SysSyncLogDto (eu.bcvsolutions.idm.acc.dto.SysSyncLogDto)1 SysSystemDto (eu.bcvsolutions.idm.acc.dto.SysSystemDto)1 AccContractSliceAccountFilter (eu.bcvsolutions.idm.acc.dto.filter.AccContractSliceAccountFilter)1 AccIdentityAccountFilter (eu.bcvsolutions.idm.acc.dto.filter.AccIdentityAccountFilter)1 AccRoleAccountFilter (eu.bcvsolutions.idm.acc.dto.filter.AccRoleAccountFilter)1 AccRoleCatalogueAccountFilter (eu.bcvsolutions.idm.acc.dto.filter.AccRoleCatalogueAccountFilter)1 AccTreeAccountFilter (eu.bcvsolutions.idm.acc.dto.filter.AccTreeAccountFilter)1 EntityAccountFilter (eu.bcvsolutions.idm.acc.dto.filter.EntityAccountFilter)1