Search in sources :

Example 1 with LocationController

use of cwms.radar.api.LocationController in project cwms-radar-api by USACE.

the class ApiServlet method configureRoutes.

protected void configureRoutes() {
    RouteRole[] requiredRoles = { new Role(CWMS_USERS_ROLE) };
    get("/", ctx -> ctx.result("Welcome to the CWMS REST API").contentType(Formats.PLAIN));
    radarCrud("/location/category/{category-id}", new LocationCategoryController(metrics), requiredRoles);
    radarCrud("/location/group/{group-id}", new LocationGroupController(metrics), requiredRoles);
    radarCrud("/locations/{location_code}", new LocationController(metrics), requiredRoles);
    radarCrud("/offices/{office}", new OfficeController(metrics), requiredRoles);
    radarCrud("/units/{unit_name}", new UnitsController(metrics), requiredRoles);
    radarCrud("/parameters/{param_name}", new ParametersController(metrics), requiredRoles);
    radarCrud("/timezones/{zone}", new TimeZoneController(metrics), requiredRoles);
    radarCrud("/levels/{location}", new LevelsController(metrics), requiredRoles);
    TimeSeriesController tsController = new TimeSeriesController(metrics);
    get("/timeseries/recent/{group-id}", tsController::getRecent);
    radarCrud("/timeseries/category/{category-id}", new TimeSeriesCategoryController(metrics), requiredRoles);
    radarCrud("/timeseries/group/{group-id}", new TimeSeriesGroupController(metrics), requiredRoles);
    radarCrud("/timeseries/{timeseries}", tsController, requiredRoles);
    radarCrud("/ratings/{rating}", new RatingController(metrics), requiredRoles);
    radarCrud("/catalog/{dataSet}", new CatalogController(metrics), requiredRoles);
    radarCrud("/basins/{basin-id}", new BasinController(metrics), requiredRoles);
    radarCrud("/blobs/{blob-id}", new BlobController(metrics), requiredRoles);
    radarCrud("/clobs/{clob-id}", new ClobController(metrics), requiredRoles);
    radarCrud("/pools/{pool-id}", new PoolController(metrics), requiredRoles);
}
Also used : BlobController(cwms.radar.api.BlobController) LevelsController(cwms.radar.api.LevelsController) CatalogController(cwms.radar.api.CatalogController) PoolController(cwms.radar.api.PoolController) LocationController(cwms.radar.api.LocationController) TimeZoneController(cwms.radar.api.TimeZoneController) LocationGroupController(cwms.radar.api.LocationGroupController) TimeSeriesCategoryController(cwms.radar.api.TimeSeriesCategoryController) ClobController(cwms.radar.api.ClobController) RouteRole(io.javalin.core.security.RouteRole) RouteRole(io.javalin.core.security.RouteRole) Role(cwms.radar.security.Role) UnitsController(cwms.radar.api.UnitsController) OfficeController(cwms.radar.api.OfficeController) LocationCategoryController(cwms.radar.api.LocationCategoryController) UnitsController(cwms.radar.api.UnitsController) TimeSeriesGroupController(cwms.radar.api.TimeSeriesGroupController) RatingController(cwms.radar.api.RatingController) ParametersController(cwms.radar.api.ParametersController) BasinController(cwms.radar.api.BasinController) TimeSeriesController(cwms.radar.api.TimeSeriesController)

Aggregations

BasinController (cwms.radar.api.BasinController)1 BlobController (cwms.radar.api.BlobController)1 CatalogController (cwms.radar.api.CatalogController)1 ClobController (cwms.radar.api.ClobController)1 LevelsController (cwms.radar.api.LevelsController)1 LocationCategoryController (cwms.radar.api.LocationCategoryController)1 LocationController (cwms.radar.api.LocationController)1 LocationGroupController (cwms.radar.api.LocationGroupController)1 OfficeController (cwms.radar.api.OfficeController)1 ParametersController (cwms.radar.api.ParametersController)1 PoolController (cwms.radar.api.PoolController)1 RatingController (cwms.radar.api.RatingController)1 TimeSeriesCategoryController (cwms.radar.api.TimeSeriesCategoryController)1 TimeSeriesController (cwms.radar.api.TimeSeriesController)1 TimeSeriesGroupController (cwms.radar.api.TimeSeriesGroupController)1 TimeZoneController (cwms.radar.api.TimeZoneController)1 UnitsController (cwms.radar.api.UnitsController)1 Role (cwms.radar.security.Role)1 RouteRole (io.javalin.core.security.RouteRole)1