All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.allegro.tech.hermes.management.api.InactiveTopicsEndpoint Maven / Gradle / Ivy

There is a newer version: 2.10.4
Show newest version
package pl.allegro.tech.hermes.management.api;

import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON;

import io.swagger.annotations.ApiOperation;
import jakarta.annotation.security.RolesAllowed;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.HttpMethod;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import java.util.List;
import org.springframework.stereotype.Component;
import pl.allegro.tech.hermes.management.api.auth.Roles;
import pl.allegro.tech.hermes.management.domain.detection.InactiveTopic;
import pl.allegro.tech.hermes.management.domain.detection.InactiveTopicsStorageService;

@Component
@Path("/inactive-topics")
public class InactiveTopicsEndpoint {
  private final InactiveTopicsStorageService storageService;

  public InactiveTopicsEndpoint(InactiveTopicsStorageService storageService) {
    this.storageService = storageService;
  }

  @GET
  @Produces(APPLICATION_JSON)
  @RolesAllowed(Roles.ADMIN)
  @ApiOperation(value = "All inactive topics", response = List.class, httpMethod = HttpMethod.GET)
  public List getConsumersWorkloadConstraints() {
    return storageService.getInactiveTopics();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy