Interface ControlPanelApi

All Known Implementing Classes:
ControlPanelController

public interface ControlPanelApi
HTTP API for the control panel UI.
Since:
1.0.0
Author:
Álvaro Sánchez-Mariscal
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.micronaut.http.HttpResponse<io.micronaut.views.ModelAndView<?>>
    byCategory(String categoryId, io.micronaut.http.HttpRequest<?> request)
    Renders the category view.
    io.micronaut.http.HttpResponse<io.micronaut.views.ModelAndView<?>>
    detail(String controlPanelName, io.micronaut.http.HttpRequest<?> request)
    Renders the control panel detailed view.
    io.micronaut.http.HttpResponse<io.micronaut.views.ModelAndView<?>>
    index(io.micronaut.http.HttpRequest<?> request)
    Renders the index view.
    io.micronaut.http.HttpResponse<Object>
    Refreshes the host application through a control-panel-owned write route.
    io.micronaut.http.HttpResponse<Object>
    Stops the host application through a control-panel-owned write route.
  • Field Details

  • Method Details

    • index

      @Get io.micronaut.http.HttpResponse<io.micronaut.views.ModelAndView<?>> index(io.micronaut.http.HttpRequest<?> request)
      Renders the index view.
      Parameters:
      request - the current HTTP request
      Returns:
      the model
    • byCategory

      @Get("/categories/{categoryId}") io.micronaut.http.HttpResponse<io.micronaut.views.ModelAndView<?>> byCategory(String categoryId, io.micronaut.http.HttpRequest<?> request)
      Renders the category view.
      Parameters:
      categoryId - the category id.
      request - the current HTTP request
      Returns:
      the model
    • detail

      @Get("/{controlPanelName}") io.micronaut.http.HttpResponse<io.micronaut.views.ModelAndView<?>> detail(String controlPanelName, io.micronaut.http.HttpRequest<?> request)
      Renders the control panel detailed view.
      Parameters:
      controlPanelName - the control panel name.
      request - the current HTTP request
      Returns:
      the model
    • refresh

      @Post("/application-control-panel-controller/refresh") io.micronaut.http.HttpResponse<Object> refresh(@Body @Nullable ControlPanelApi.RefreshRequest request)
      Refreshes the host application through a control-panel-owned write route.
      Parameters:
      request - the optional refresh request
      Returns:
      the refresh result
    • stop

      @Post("/application-control-panel-controller/stop") io.micronaut.http.HttpResponse<Object> stop()
      Stops the host application through a control-panel-owned write route.
      Returns:
      the stop result