Commit e149b8ba authored by Raigo Ukkivi's avatar Raigo Ukkivi
Browse files

TEIS-365. Fix merge conflicts.

parent 08d2313c
......@@ -13,6 +13,7 @@ import ee.sm.ti.teis.domainrequest.DomainCreateDTO;
import ee.sm.ti.teis.domainrequest.DomainDeleteDTO;
import ee.sm.ti.teis.domainrequest.DomainQueryDTO;
import ee.sm.ti.teis.domainrequest.DomainRequestDTO;
import ee.sm.ti.teis.officegateway.official.AddOfficialsGroupMembersRequest;
import ee.sm.ti.teis.officegateway.official.request.*;
import org.springframework.context.annotation.Configuration;
......
package ee.sm.ti.teis.officials.group.listener;
import ee.sm.ti.teis.officegateway.official.AddOfficialsGroupMembersRequest;
import ee.sm.ti.teis.officegateway.official.AddOfficialsGroupMembersResponse;
import ee.sm.ti.teis.officegateway.official.dto.OfficialUserDto;
import ee.sm.ti.teis.officegateway.official.dto.OfficialsGroupDto;
import ee.sm.ti.teis.officegateway.official.request.CreateOfficialsGroupRequest;
import ee.sm.ti.teis.officegateway.official.request.DeleteOfficialsGroupRequest;
......@@ -82,7 +85,7 @@ public class OfficialsGroupGwListener {
return response;
}
@RabbitListener(queues = {QueueConfig.GW_ADD_OFFICIALS_GROUP_MEMBERS_QUEUE})
@RabbitListener(queues = {GW_ADD_OFFICIALS_GROUP_MEMBERS_QUEUE})
@PreAuthorize("@accessController.hasOfficialPrivilege({T(ee.sm.ti.teis.types.enums.RolePrivilegeCode).TI_MANAGE_OFFICIALS_GROUPS})")
public AddOfficialsGroupMembersResponse createOfficialsGroup(AddOfficialsGroupMembersRequest request) {
final List<OfficialUserDto> groupMembers = service.addMembersToGroup(
......
......@@ -5,12 +5,11 @@ import ee.sm.ti.teis.errors.ConstraintViolationDto;
import ee.sm.ti.teis.exceptions.TeisConstraintViolationException;
import ee.sm.ti.teis.exceptions.TeisIllegalArgumentException;
import ee.sm.ti.teis.exceptions.TeisResourceNotFoundException;
import ee.sm.ti.teis.officegateway.official.dto.OfficialUserDto;
import ee.sm.ti.teis.officegateway.official.dto.OfficialsGroupDto;
import ee.sm.ti.teis.officials.group.OfficialsGroupEntity;
import ee.sm.ti.teis.officials.group.OfficialsGroupMapper;
import ee.sm.ti.teis.officials.group.OfficialsGroupRepository;
import ee.sm.ti.teis.officegateway.official.OfficialUserDto;
import ee.sm.ti.teis.officegateway.official.OfficialsGroupDto;
import ee.sm.ti.teis.officials.official.OfficialService;
import ee.sm.ti.teis.officials.official.OfficialUserEntity;
import ee.sm.ti.teis.servicerequest.RequestMetaDTO;
......@@ -173,7 +172,7 @@ public class OfficialsGroupService {
}
@Transactional
List<OfficialUserDto> addMembersToGroup(String groupId, List<String> memberIds, RequestMetaDTO requestMetaDTO) {
public List<OfficialUserDto> addMembersToGroup(String groupId, List<String> memberIds, RequestMetaDTO requestMetaDTO) {
final OfficialsGroupEntity group = findGroupById(UUID.fromString(groupId));
validateGroupMembers(memberIds);
List<OfficialUserDto> groupMembers = new ArrayList<>();
......@@ -192,7 +191,7 @@ public class OfficialsGroupService {
memberIds = Collections.emptyList();
}
if (memberIds.isEmpty()) {
throw new TeisConstraintViolationException(ViolationDto.builder()
throw new TeisConstraintViolationException(ConstraintViolationDto.builder()
.fieldName("memberIds")
.message("Member id is mandatory.")
.build());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment