use of eu.bcvsolutions.idm.core.eav.api.dto.filter.IdmCodeListItemFilter in project CzechIdMng by bcvsolutions.
the class DefaultIdmCodeListService method deleteInternal.
@Override
@Transactional
public void deleteInternal(IdmCodeListDto dto) {
Assert.notNull(dto, "DTO is required.");
Assert.notNull(dto.getId(), "DTO identifier is required.");
//
// delete code list items
IdmCodeListItemFilter filter = new IdmCodeListItemFilter();
filter.setCodeListId(dto.getId());
codeListItemService.find(filter, null).forEach(codeListItem -> {
codeListItemService.delete(codeListItem);
});
//
super.deleteInternal(dto);
//
// delete form definition
// previous delete of code list items will delete associated form values.
formDefinitionService.deleteById(dto.getFormDefinition());
}
use of eu.bcvsolutions.idm.core.eav.api.dto.filter.IdmCodeListItemFilter in project CzechIdMng by bcvsolutions.
the class DefaultCodeListManager method getItems.
@Override
public List<IdmCodeListItemDto> getItems(Serializable codeListIdentifier, Pageable pageable, BasePermission... permission) {
Assert.notNull(codeListIdentifier, "CodeList identifier is required.");
IdmCodeListDto codeList = get(codeListIdentifier);
Assert.notNull(codeList, "CodeList is required.");
//
IdmCodeListItemFilter filter = new IdmCodeListItemFilter();
filter.setCodeListId(codeList.getId());
//
return codeListItemService.find(filter, pageable, permission).getContent();
}
use of eu.bcvsolutions.idm.core.eav.api.dto.filter.IdmCodeListItemFilter in project CzechIdMng by bcvsolutions.
the class IdmCodeListItemController method toFilter.
@Override
protected IdmCodeListItemFilter toFilter(MultiValueMap<String, Object> parameters) {
IdmCodeListItemFilter filter = new IdmCodeListItemFilter(parameters);
//
filter.setCodeListId(getParameterConverter().toEntityUuid(parameters, IdmCodeListItemFilter.PARAMETER_CODE_LIST_ID, IdmCodeListDto.class));
//
return filter;
}
Aggregations