use of eu.bcvsolutions.idm.core.scheduler.task.impl.RemoveAutomaticRoleTaskExecutor in project CzechIdMng by bcvsolutions.
the class DefaultIdmIdentityContractServiceIntegrationTest method deleteAutomaticRole.
private void deleteAutomaticRole(IdmRoleTreeNodeDto automaticRole) {
RemoveAutomaticRoleTaskExecutor task = new RemoveAutomaticRoleTaskExecutor();
task.setAutomaticRoleId(automaticRole.getId());
taskManager.executeSync(task);
}
use of eu.bcvsolutions.idm.core.scheduler.task.impl.RemoveAutomaticRoleTaskExecutor in project CzechIdMng by bcvsolutions.
the class AutomaticRoleAttributeDeleteProcessor method process.
@Override
public EventResult<IdmAutomaticRoleAttributeDto> process(EntityEvent<IdmAutomaticRoleAttributeDto> event) {
IdmAutomaticRoleAttributeDto content = event.getContent();
//
// delete all assigned roles gained by this automatic role by long running task
RemoveAutomaticRoleTaskExecutor automaticRoleTask = AutowireHelper.createBean(RemoveAutomaticRoleTaskExecutor.class);
automaticRoleTask.setAutomaticRoleId(content.getId());
longRunningTaskManager.executeSync(automaticRoleTask);
//
return new DefaultEventResult<>(event, this);
}
use of eu.bcvsolutions.idm.core.scheduler.task.impl.RemoveAutomaticRoleTaskExecutor in project CzechIdMng by bcvsolutions.
the class AutomaticRoleAttributeRuleDeleteProcessor method removeAllRoles.
/**
* Remove all identity role via request, but automatic role iselft will not be deleted.
*
* @param automaticRoleId
*/
private void removeAllRoles(UUID automaticRoleId) {
RemoveAutomaticRoleTaskExecutor automaticRoleTask = AutowireHelper.createBean(RemoveAutomaticRoleTaskExecutor.class);
automaticRoleTask.setAutomaticRoleId(automaticRoleId);
// we dont want delete entity
automaticRoleTask.setDeleteEntity(false);
longRunningTaskManager.executeSync(automaticRoleTask);
}
use of eu.bcvsolutions.idm.core.scheduler.task.impl.RemoveAutomaticRoleTaskExecutor in project CzechIdMng by bcvsolutions.
the class RoleTreeNodeDeleteProcessor method process.
@Override
public EventResult<IdmRoleTreeNodeDto> process(EntityEvent<IdmRoleTreeNodeDto> event) {
IdmRoleTreeNodeDto roleTreeNode = event.getContent();
// Find all automatic role requests and remove relation on automatic role
if (roleTreeNode.getId() != null) {
//
// delete all assigned roles gained by this automatic role by long running task
RemoveAutomaticRoleTaskExecutor automaticRoleTask = AutowireHelper.createBean(RemoveAutomaticRoleTaskExecutor.class);
automaticRoleTask.setAutomaticRoleId(roleTreeNode.getId());
longRunningTaskManager.executeSync(automaticRoleTask);
}
//
return new DefaultEventResult<>(event, this);
}
Aggregations