Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform preparations to move to camel 4 #202

Merged
merged 4 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ public class BrokerConfigurerRuntime {
* @return the status (stopped or started) with status 200 (OK) or with status 404 (Not Found)
*/
@GetMapping("/brokers/{id}/configure")
public String getConfigurationBroker(@PathVariable("id") Long id, @RequestParam("brokerType") String brokerType) {
public String getConfigurationBroker(
@PathVariable(value = "id") Long id,
@RequestParam(value = "brokerType") String brokerType
) {
log.debug("REST request to get configuration of Broker : {}", id);

String configuration = "unknown";
Expand All @@ -48,7 +51,12 @@ public String getConfigurationBroker(@PathVariable("id") Long id, @RequestParam(
* @throws Exception
*/
@PostMapping(path = "/brokers/{id}/configure")
public ResponseEntity<String> setConfigurationBroker(@PathVariable("id") Long id, @RequestParam("brokerType") String brokerType, @RequestParam("brokerConfigurationType") String brokerConfigurationType, @RequestBody(required = false) String brokerConfiguration) throws Exception {
public ResponseEntity<String> setConfigurationBroker(
@PathVariable(value = "id") Long id,
@RequestBody(required = false) String brokerConfiguration,
@RequestParam(value = "brokerType") String brokerType,
@RequestParam(value = "brokerConfigurationType") String brokerConfigurationType
) throws Exception {
log.debug("REST request to set configuration of Broker : {}", id);

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ public class BrokerManagerRuntime {
* @return the status (stopped or started) with status 200 (OK) or with status 404 (Not Found)
*/
@GetMapping("/brokers/{id}/status")
public String statusBroker(@PathVariable("id") Long id, @RequestParam("brokerType") String brokerType) {
public String statusBroker(
@PathVariable(value = "id") Long id,
@RequestParam(value = "brokerType") String brokerType
) {
log.debug("REST request to get status of Broker : {}", id);

String status = "stopped";
Expand All @@ -53,7 +56,10 @@ public String statusBroker(@PathVariable("id") Long id, @RequestParam("brokerTyp
* @return the status (stopped or started) with status 200 (OK) or with status 404 (Not Found)
*/
@GetMapping("/brokers/{id}/info")
public String infoBroker(@PathVariable("id") Long id, @RequestParam("brokerType") String brokerType) {
public String infoBroker(
@PathVariable(value = "id") Long id,
@RequestParam(value = "brokerType") String brokerType
) {
log.debug("REST request to get status of Broker : {}", id);

String info = "unknown";
Expand All @@ -74,7 +80,11 @@ public String infoBroker(@PathVariable("id") Long id, @RequestParam("brokerType"
* @return the ResponseEntity with status 200 (OK) and with body the brokerDTO, or with status 404 (Not Found)
*/
@GetMapping("/brokers/{id}/start")
public ResponseEntity<String> startBroker(@PathVariable("id") Long id, @RequestParam("brokerType") String brokerType, @RequestParam("brokerConfigurationType") String brokerConfigurationType) throws Exception {
public ResponseEntity<String> startBroker(
@PathVariable(value = "id") Long id,
@RequestParam(value = "brokerType") String brokerType,
@RequestParam(value = "brokerConfigurationType") String brokerConfigurationType
) throws Exception {
log.debug("REST request to start Broker : {}", id);

try {
Expand All @@ -99,7 +109,11 @@ public ResponseEntity<String> startBroker(@PathVariable("id") Long id, @RequestP
* @return the ResponseEntity with status 200 (OK) and with body the brokerDTO, or with status 404 (Not Found)
*/
@GetMapping("/brokers/{id}/restart")
public ResponseEntity<String> restartBroker(@PathVariable("id") Long id, @RequestParam("brokerType") String brokerType, @RequestParam("brokerConfigurationType") String brokerConfigurationType) throws Exception {
public ResponseEntity<String> restartBroker(
@PathVariable(value = "id") Long id,
@RequestParam(value = "brokerType") String brokerType,
@RequestParam(value = "brokerConfigurationType") String brokerConfigurationType
) throws Exception {
log.debug("REST request to restart Broker : {}", id);

try {
Expand All @@ -120,7 +134,10 @@ public ResponseEntity<String> restartBroker(@PathVariable("id") Long id, @Reques
* @return the ResponseEntity with status 200 (OK) and with body the brokerDTO, or with status 404 (Not Found)
*/
@GetMapping("/brokers/{id}/stop")
public ResponseEntity<String> stopBroker(@PathVariable("id") Long id, @RequestParam("brokerType") String brokerType) throws Exception {
public ResponseEntity<String> stopBroker(
@PathVariable(value = "id") Long id,
@RequestParam(value = "brokerType") String brokerType
) throws Exception {
log.debug("REST request to stop Broker : {}", id);

try {
Expand All @@ -144,7 +161,10 @@ public ResponseEntity<String> stopBroker(@PathVariable("id") Long id, @RequestPa
path = "/brokers/{brokerType}/connections",
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_PLAIN_VALUE}
)
public ResponseEntity<String> getConnections(@Parameter(hidden = true) @RequestHeader("Accept") String mediaType, @PathVariable(value = "brokerType") String brokerType) throws Exception {
public ResponseEntity<String> getConnections(
@PathVariable(value = "brokerType") String brokerType,
@Parameter(hidden = true) @RequestHeader(value = "Accept") String mediaType
) throws Exception {

log.debug("REST request to get get connections");

Expand All @@ -168,7 +188,10 @@ public ResponseEntity<String> getConnections(@Parameter(hidden = true) @RequestH
path = "/brokers/{brokerType}/consumers",
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_PLAIN_VALUE}
)
public ResponseEntity<String> getConsumers(@Parameter(hidden = true) @RequestHeader("Accept") String mediaType, @PathVariable(value = "brokerType") String brokerType) throws Exception {
public ResponseEntity<String> getConsumers(
@PathVariable(value = "brokerType") String brokerType,
@Parameter(hidden = true) @RequestHeader(value = "Accept") String mediaType
) throws Exception {

log.debug("REST request to get get consumers");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ public class MessageBrokerRuntime {
path = "/brokers/{brokerType}/messages/{endpointName}/{filter}",
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_PLAIN_VALUE}
)
public Object listMessages(@Parameter(hidden = true) @RequestHeader("Accept") String mediaType, @PathVariable(value = "brokerType") String brokerType, @PathVariable(value = "endpointName") String endpointName, @RequestParam(value = "filter", required = false) String filter) throws Exception {
public Object listMessages(
@PathVariable(value = "brokerType") String brokerType,
@PathVariable(value = "endpointName") String endpointName,
@Parameter(hidden = true) @RequestHeader(value = "Accept") String mediaType,
@RequestParam(value = "filter", required = false) String filter
) throws Exception {

log.debug("REST request to list messages for queue : {}", endpointName);

Expand All @@ -66,7 +71,11 @@ public Object listMessages(@Parameter(hidden = true) @RequestHeader("Accept") St
path = "/brokers/{brokerType}/messages/count",
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_PLAIN_VALUE}
)
public Object countMessagesFromList(@Parameter(hidden = true) @RequestHeader("Accept") String mediaType, @PathVariable String brokerType, @RequestBody String endpointNames) throws Exception {
public Object countMessagesFromList(
@PathVariable(value = "brokerType") String brokerType,
@RequestBody String endpointNames,
@Parameter(hidden = true) @RequestHeader(value = "Accept") String mediaType
) throws Exception {

log.debug("REST request to count messages for queue : {}", endpointNames);

Expand All @@ -91,8 +100,8 @@ public Object countMessagesFromList(@Parameter(hidden = true) @RequestHeader("Ac
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_PLAIN_VALUE}
)
public Object getFlowsMessageCountList(
@Parameter(hidden = true) @RequestHeader("Accept") String mediaType,
@PathVariable String brokerType,
@PathVariable(value = "brokerType") String brokerType,
@Parameter(hidden = true) @RequestHeader(value = "Accept") String mediaType,
@RequestParam(value = "excludeEmptyQueues", required = false) boolean excludeEmptyQueues
) throws Exception {

Expand Down Expand Up @@ -121,7 +130,11 @@ public Object getFlowsMessageCountList(
path = "/brokers/{brokerType}/messages/{endpointName}/count",
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_PLAIN_VALUE}
)
public Object countMessages(@Parameter(hidden = true) @RequestHeader("Accept") String mediaType, @PathVariable(value = "brokerType") String brokerType, @PathVariable(value = "endpointName") String endpointName) throws Exception {
public Object countMessages(
@PathVariable(value = "brokerType") String brokerType,
@PathVariable(value = "endpointName") String endpointName,
@Parameter(hidden = true) @RequestHeader(value = "Accept") String mediaType
) throws Exception {

log.debug("REST request to list messages for queue : {}", endpointName);

Expand All @@ -148,7 +161,13 @@ public Object countMessages(@Parameter(hidden = true) @RequestHeader("Accept") S
path = "/brokers/{brokerType}/message/{endpointName}/browse/{messageId}",
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_PLAIN_VALUE}
)
public Object browseMessage(@Parameter(hidden = true) @RequestHeader("Accept") String mediaType, @PathVariable(value = "brokerType") String brokerType, @PathVariable(value = "endpointName") String endpointName, @PathVariable(value = "messageId") String messageId, @RequestParam(value = "excludeBody", required = false) boolean excludeBody) throws Exception {
public Object browseMessage(
@PathVariable(value = "brokerType") String brokerType,
@PathVariable(value = "endpointName") String endpointName,
@PathVariable(value = "messageId") String messageId,
@Parameter(hidden = true) @RequestHeader("Accept") String mediaType,
@RequestParam(value = "excludeBody", required = false) boolean excludeBody
) throws Exception {

log.debug("REST request to browse message on: {}", endpointName);

Expand All @@ -174,7 +193,14 @@ public Object browseMessage(@Parameter(hidden = true) @RequestHeader("Accept") S
path = "/brokers/{brokerType}/messages/{endpointName}/browse",
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_PLAIN_VALUE}
)
public Object browseMessages(@Parameter(hidden = true) @RequestHeader("Accept") String mediaType, @PathVariable(value = "brokerType") String brokerType, @PathVariable(value = "endpointName") String endpointName, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "numberOfMessages", required = false) Integer numberOfMessages, @RequestParam(value = "excludeBody", required = false) boolean excludeBody) throws Exception {
public Object browseMessages(
@PathVariable(value = "brokerType") String brokerType,
@PathVariable(value = "endpointName") String endpointName,
@Parameter(hidden = true) @RequestHeader(value = "Accept") String mediaType,
@RequestParam(value = "page", required = false) Integer page,
@RequestParam(value = "numberOfMessages", required = false) Integer numberOfMessages,
@RequestParam(value = "excludeBody", required = false) boolean excludeBody
) throws Exception {

log.debug("REST request to browse messages on: {}", endpointName);

Expand Down Expand Up @@ -202,7 +228,13 @@ public Object browseMessages(@Parameter(hidden = true) @RequestHeader("Accept")
consumes = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_PLAIN_VALUE},
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_PLAIN_VALUE}
)
public Object sendMessage(@Parameter(hidden = true) @RequestHeader("Accept") String mediaType, @PathVariable(value = "brokerType") String brokerType, @PathVariable(value = "endpointName") String endpointName, @RequestParam(value = "messageHeaders", required = false) String messageHeaders, @RequestBody String messageBody) throws Exception {
public Object sendMessage(
@PathVariable(value = "brokerType") String brokerType,
@PathVariable(value = "endpointName") String endpointName,
@RequestBody String messageBody,
@Parameter(hidden = true) @RequestHeader(value = "Accept") String mediaType,
@RequestParam(value = "messageHeaders", required = false) String messageHeaders
) throws Exception {

log.debug("REST request to send messages from queue : " + endpointName);

Expand Down Expand Up @@ -233,7 +265,12 @@ public Object sendMessage(@Parameter(hidden = true) @RequestHeader("Accept") Str
path = "/brokers/{brokerType}/message/{endpointName}/{messageId}",
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_PLAIN_VALUE}
)
public ResponseEntity<String> removeMessage(@Parameter(hidden = true) @RequestHeader("Accept") String mediaType, @PathVariable(value = "brokerType") String brokerType, @PathVariable(value = "endpointName") String endpointName, @PathVariable(value = "messageId") String messageId) throws Exception {
public ResponseEntity<String> removeMessage(
@PathVariable(value = "brokerType") String brokerType,
@PathVariable(value = "endpointName") String endpointName,
@PathVariable(value = "messageId") String messageId,
@Parameter(hidden = true) @RequestHeader(value = "Accept") String mediaType
) throws Exception {

log.debug("REST request to remove messages for queue : {}", endpointName);

Expand All @@ -258,7 +295,11 @@ public ResponseEntity<String> removeMessage(@Parameter(hidden = true) @RequestHe
path = "/brokers/{brokerType}/messages/{endpointName}",
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_PLAIN_VALUE}
)
public Object removeMessages(@Parameter(hidden = true) @RequestHeader("Accept") String mediaType, @PathVariable(value = "brokerType") String brokerType, @PathVariable(value = "endpointName") String endpointName) throws Exception {
public Object removeMessages(
@PathVariable(value = "brokerType") String brokerType,
@PathVariable(value = "endpointName") String endpointName,
@Parameter(hidden = true) @RequestHeader("Accept") String mediaType
) throws Exception {

log.debug("REST request to remove messages for endpoint : {}", endpointName);

Expand All @@ -284,7 +325,13 @@ public Object removeMessages(@Parameter(hidden = true) @RequestHeader("Accept")
path = "/brokers/{brokerType}/message/{sourceQueueName}/{targetQueueName}/{messageId}",
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_PLAIN_VALUE}
)
public Object moveMessage(@Parameter(hidden = true) @RequestHeader("Accept") String mediaType, @PathVariable(value = "brokerType") String brokerType, @PathVariable(value = "sourceQueueName") String sourceQueueName, @PathVariable(value = "targetQueueName") String targetQueueName, @PathVariable(value = "messageId") String messageId) throws Exception {
public Object moveMessage(
@PathVariable(value = "brokerType") String brokerType,
@PathVariable(value = "sourceQueueName") String sourceQueueName,
@PathVariable(value = "targetQueueName") String targetQueueName,
@PathVariable(value = "messageId") String messageId,
@Parameter(hidden = true) @RequestHeader(value = "Accept") String mediaType
) throws Exception {

log.debug("REST request to move messages from queue : " + sourceQueueName + " to " + targetQueueName);

Expand All @@ -311,7 +358,12 @@ public Object moveMessage(@Parameter(hidden = true) @RequestHeader("Accept") Str
path = "/brokers/{brokerType}/messages/{sourceQueueName}/{targetQueueName}",
produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.TEXT_PLAIN_VALUE}
)
public Object moveMessages(@Parameter(hidden = true) @RequestHeader("Accept") String mediaType, @PathVariable(value = "brokerType") String brokerType, @PathVariable(value = "sourceQueueName") String sourceQueueName, @PathVariable(value = "targetQueueName") String targetQueueName) throws Exception {
public Object moveMessages(
@PathVariable(value = "brokerType") String brokerType,
@PathVariable(value = "sourceQueueName") String sourceQueueName,
@PathVariable(value = "targetQueueName") String targetQueueName,
@Parameter(hidden = true) @RequestHeader(value = "Accept") String mediaType
) throws Exception {

log.debug("REST request to move messages from queue : " + sourceQueueName + " to " + targetQueueName);

Expand Down
Loading