Interface ConfigurationRestService

All Known Implementing Classes:
ConfigurationRestServiceImpl

@Produces("application/json") public interface ConfigurationRestService
  • Field Details

  • Method Details

    • createConfiguration

      @POST @Consumes("application/json") @Produces("application/json") jakarta.ws.rs.core.Response createConfiguration(CreateConfigurationDto configurationDto, @Context jakarta.ws.rs.core.UriInfo uriInfo)
      Creates a new configuration entry.

      If tenantId is omitted or blank the entry is treated as a global configuration applicable to all tenants. A duplicate (configKey, tenantId) combination with STATUS_=ACTIVE results in a 409 Conflict.

      Parameters:
      configurationDto - the create request containing configKey, configValue and an optional tenantId
      uriInfo - JAX-RS URI context used to build the Location header
      Returns:
      201 Created with the persisted configuration and a Location header pointing to the new resource
    • getConfigurations

      @GET List<ConfigurationDto> getConfigurations(@QueryParam("tenantId") String tenantId, @QueryParam("includeInactive") Boolean includeInactive)
      Returns the configurations applicable to a tenant. If tenantId is omitted or blank, the global default configurations are returned. For a tenant, active global configurations are returned with the tenant's active entries overriding global entries of the same key. With includeInactive=true, all global and tenant entries of every status are returned without merging.
      Parameters:
      tenantId - optional tenant scope
      includeInactive - whether to include inactive configurations
      Returns:
      configurations applicable to the requested scope
    • getConfiguration

      @GET @Path("/{configurationId}") ConfigurationDto getConfiguration(@PathParam("configurationId") String configurationId)
      Returns a configuration by id.
      Parameters:
      configurationId - the configuration id
      Returns:
      the configuration
    • updateConfiguration

      @PUT @Path("/{configurationId}") @Consumes("application/json") ConfigurationDto updateConfiguration(@PathParam("configurationId") String configurationId, UpdateConfigurationDto configurationDto)
      Updates an active configuration by creating a new version.

      The existing entry is marked INACTIVE and a new ACTIVE entry with the same key and tenant scope and an incremented version is created.

      Parameters:
      configurationId - the id of the active configuration to update
      configurationDto - the update request containing the new configValue
      Returns:
      the newly created active configuration version
    • deleteConfiguration

      @DELETE @Path("/{configurationId}") void deleteConfiguration(@PathParam("configurationId") String configurationId)
      Soft-deletes an active configuration by marking it INACTIVE.
      Parameters:
      configurationId - the id of the active configuration to delete