Commit f3b6068b authored by Kristel Meikas's avatar Kristel Meikas
Browse files

TEIS-2137: added new field to GET message permission request

parent ffa2f3c0
......@@ -6,7 +6,6 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.util.UUID;
public class MessagePermissionRequest extends AbstractDTO<MessagePermissionRequest.Parameters, ErrorDTO> {
......@@ -21,10 +20,9 @@ public class MessagePermissionRequest extends AbstractDTO<MessagePermissionReque
public static class Parameters {
private UUID id;
private String contextType;
private String messageDefinitionCode;
......@@ -52,9 +52,10 @@ public class ProceedingController extends TeisBaseController {
@ApiImplicitParams(@ApiImplicitParam(name = "id", value = "${teis.api.messages.proceeding.get-proceeding-id}"))
@GetMapping(value = "{id}/message-permissions")
public List<MessagePermissionDto> getMessagePermission(@PathVariable UUID id,
@RequestParam(required = false) String contextType, RequestMetaDTO requestMetaDTO) {
@RequestParam(required = false) String contextType,
@RequestParam(required = false) String messageDefinitionCode, RequestMetaDTO requestMetaDTO) {
MessagePermissionRequest request = new MessagePermissionRequest();
request.setPayload(new MessagePermissionRequest.Parameters(id, contextType), requestMetaDTO);
request.setPayload(new MessagePermissionRequest.Parameters(id, contextType, messageDefinitionCode), requestMetaDTO);
return (List<MessagePermissionDto>) service.sendAndReceive(request);
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