Search in sources :

Example 1 with SysProvisioningBreakRecipientDto

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

the class IdentityDeleteProcessor method deleteProvisioningRecipients.

/**
 * Method remove all provisioning recipient for identity id given in parameter
 *
 * @param identityId
 */
private void deleteProvisioningRecipients(UUID identityId) {
    SysProvisioningBreakRecipientFilter filter = new SysProvisioningBreakRecipientFilter();
    filter.setIdentityId(identityId);
    for (SysProvisioningBreakRecipientDto recipient : provisioningBreakRecipientService.find(filter, null).getContent()) {
        LOG.debug("Remove recipient from provisioning break [{}]", recipient.getId());
        provisioningBreakRecipientService.delete(recipient);
    }
}
Also used : SysProvisioningBreakRecipientDto(eu.bcvsolutions.idm.acc.dto.SysProvisioningBreakRecipientDto) SysProvisioningBreakRecipientFilter(eu.bcvsolutions.idm.acc.dto.filter.SysProvisioningBreakRecipientFilter)

Example 2 with SysProvisioningBreakRecipientDto

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

the class RoleDeleteProcessor method deleteProvisioningRecipient.

/**
 * Method remove all provisioning recipient for role id given in parameter
 *
 * @param identityId
 */
private void deleteProvisioningRecipient(UUID roleId) {
    SysProvisioningBreakRecipientFilter filter = new SysProvisioningBreakRecipientFilter();
    filter.setRoleId(roleId);
    for (SysProvisioningBreakRecipientDto recipient : provisioningBreakRecipientService.find(filter, null).getContent()) {
        LOG.debug("Remove recipient from provisioning break [{}]", recipient.getId());
        provisioningBreakRecipientService.delete(recipient);
    }
}
Also used : SysProvisioningBreakRecipientDto(eu.bcvsolutions.idm.acc.dto.SysProvisioningBreakRecipientDto) SysProvisioningBreakRecipientFilter(eu.bcvsolutions.idm.acc.dto.filter.SysProvisioningBreakRecipientFilter)

Example 3 with SysProvisioningBreakRecipientDto

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

the class ProvisioningBreakProcessorTest method createRecipient.

/**
 * Method create recipient for provisioning break
 *
 * @param breakConfigId
 * @param identityId
 * @param roleId
 * @return
 */
private SysProvisioningBreakRecipientDto createRecipient(UUID breakConfigId, UUID identityId, UUID roleId) {
    SysProvisioningBreakRecipientDto breakRecipientDto = new SysProvisioningBreakRecipientDto();
    breakRecipientDto.setBreakConfig(breakConfigId);
    if (identityId != null) {
        breakRecipientDto.setIdentity(identityId);
    } else {
        breakRecipientDto.setRole(roleId);
    }
    // 
    return provisioningBreakRecipient.save(breakRecipientDto);
}
Also used : SysProvisioningBreakRecipientDto(eu.bcvsolutions.idm.acc.dto.SysProvisioningBreakRecipientDto)

Aggregations

SysProvisioningBreakRecipientDto (eu.bcvsolutions.idm.acc.dto.SysProvisioningBreakRecipientDto)3 SysProvisioningBreakRecipientFilter (eu.bcvsolutions.idm.acc.dto.filter.SysProvisioningBreakRecipientFilter)2