Commit 919fb67c authored by Kristel Meikas's avatar Kristel Meikas
Browse files

Merge branch 'TEIS-2137' into 'develop'

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

Closes TEIS-2137

See merge request teis/common-api-gateway!205
parents ffa2f3c0 f3b6068b
......@@ -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
@AllArgsConstructor
@NoArgsConstructor
public static class Parameters {
@NotNull
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