Class MessageConfigurationResource
- java.lang.Object
-
- io.jans.configapi.core.rest.BaseResource
-
- io.jans.configapi.rest.resource.auth.ConfigBaseResource
-
- io.jans.configapi.rest.resource.auth.MessageConfigurationResource
-
@Path("/config/message") @Consumes("application/json") @Produces("application/json") public class MessageConfigurationResource extends ConfigBaseResourceConfiguration endpoints for messages- Author:
- Yuriy Movchan Date: 07/12/2023
-
-
Constructor Summary
Constructors Constructor Description MessageConfigurationResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.ws.rs.core.ResponsegetMessageConfiguration()Retrieve the current global MessageConfiguration.jakarta.ws.rs.core.ResponsegetPostgresConfiguration()Retrieve the Postgres message configuration.jakarta.ws.rs.core.ResponsegetRedisMessageConfiguration()Retrieve the Redis section of the global MessageConfiguration.jakarta.ws.rs.core.ResponsepatchMessageConfiguration(@NotNull String requestString)Applies a JSON Patch document to the global MessageConfiguration and persists the change.jakarta.ws.rs.core.ResponsepatchPostgresMessageConfiguration(@NotNull String requestString)Apply a JSON Patch to the Postgres message configuration.jakarta.ws.rs.core.ResponsepatchRedisMessageConfiguration(@NotNull String requestString)Applies a JSON Patch to the stored RedisMessageConfiguration and returns the updated configuration.jakarta.ws.rs.core.ResponseupdatePostgresMessageConfiguration(@NotNull io.jans.service.message.model.config.PostgresMessageConfiguration postgresMessageConfiguration)Replace the Postgres message configuration with the provided configuration.jakarta.ws.rs.core.ResponseupdateRedisMessageConfiguration(@NotNull io.jans.service.message.model.config.RedisMessageConfiguration redisConfiguration)Update the global Redis message configuration used by the application.-
Methods inherited from class io.jans.configapi.rest.resource.auth.ConfigBaseResource
getMaxCount
-
Methods inherited from class io.jans.configapi.core.rest.BaseResource
checkNotEmpty, checkNotEmpty, checkNotNull, checkNotNull, checkNotNull, checkResourceNotNull, createSearchRequest, findRootError, getBadRequestException, getBadRequestException, getBadRequestException, getHttpHeaders, getHttpRequest, getInternalServerException, getInternalServerException, getMissingAttributeError, getNotAcceptableException, getNotFoundError, getNotFoundError, getUriInfo, throwBadRequestException, throwBadRequestException, throwBadRequestException, throwInternalServerException, throwInternalServerException, throwInternalServerException, throwInternalServerException, throwMissingAttributeError, throwNotFoundException, throwNotFoundException
-
-
-
-
Method Detail
-
getMessageConfiguration
@GET public jakarta.ws.rs.core.Response getMessageConfiguration()
Retrieve the current global MessageConfiguration.- Returns:
- the current MessageConfiguration in the response body (HTTP 200)
-
patchMessageConfiguration
@PATCH @Consumes("application/json-patch+json") public jakarta.ws.rs.core.Response patchMessageConfiguration(@NotNull @NotNull String requestString)Applies a JSON Patch document to the global MessageConfiguration and persists the change.- Parameters:
requestString- a JSON Patch document (application/json-patch+json) as a string- Returns:
- a JAX-RS Response containing the updated MessageConfiguration
- Throws:
jakarta.ws.rs.InternalServerErrorException- if the patch cannot be applied or an I/O error occurs
-
getRedisMessageConfiguration
@GET @Path("/redis") public jakarta.ws.rs.core.Response getRedisMessageConfiguration()Retrieve the Redis section of the global MessageConfiguration.- Returns:
- a Response whose entity is the current RedisMessageConfiguration.
-
updateRedisMessageConfiguration
@PUT @Path("/redis") public jakarta.ws.rs.core.Response updateRedisMessageConfiguration(@NotNull @NotNull io.jans.service.message.model.config.RedisMessageConfiguration redisConfiguration)Update the global Redis message configuration used by the application.- Parameters:
redisConfiguration- the RedisMessageConfiguration to apply to the global MessageConfiguration- Returns:
- the updated RedisMessageConfiguration
-
patchRedisMessageConfiguration
@PATCH @Path("/redis") @Consumes("application/json-patch+json") public jakarta.ws.rs.core.Response patchRedisMessageConfiguration(@NotNull @NotNull String requestString)Applies a JSON Patch to the stored RedisMessageConfiguration and returns the updated configuration.- Parameters:
requestString- JSON Patch document as a string (media type application/json-patch+json) describing modifications to apply- Returns:
- the updated RedisMessageConfiguration after applying the patch
-
getPostgresConfiguration
@GET @Path("/postgres") public jakarta.ws.rs.core.Response getPostgresConfiguration()Retrieve the Postgres message configuration.- Returns:
- the current PostgresMessageConfiguration.
-
updatePostgresMessageConfiguration
@PUT @Path("/postgres") public jakarta.ws.rs.core.Response updatePostgresMessageConfiguration(@NotNull @NotNull io.jans.service.message.model.config.PostgresMessageConfiguration postgresMessageConfiguration)Replace the Postgres message configuration with the provided configuration. Persists the supplied PostgresMessageConfiguration into the global MessageConfiguration and returns the stored configuration.- Parameters:
postgresMessageConfiguration- the new PostgresMessageConfiguration to store; must not be null- Returns:
- the persisted PostgresMessageConfiguration
-
patchPostgresMessageConfiguration
@PATCH @Path("/postgres") @Consumes("application/json-patch+json") public jakarta.ws.rs.core.Response patchPostgresMessageConfiguration(@NotNull @NotNull String requestString)Apply a JSON Patch to the Postgres message configuration.- Parameters:
requestString- JSON Patch document (application/json-patch+json) as a string.- Returns:
- the updated PostgresMessageConfiguration.
- Throws:
jakarta.ws.rs.InternalServerErrorException- if the patch cannot be parsed or applied.
-
-