use of io.hops.hopsworks.api.featurestore.datavalidation.alert.FeatureGroupAlertDTO in project hopsworks by logicalclocks.
the class ProjectAlertsResource method getAllAlerts.
@GET
@Path("all")
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value = "Get project, job and feature group alerts.", response = ProjectAllAlertsDTO.class)
@AllowedProjectRoles({ AllowedProjectRoles.DATA_OWNER, AllowedProjectRoles.DATA_SCIENTIST })
@JWTRequired(acceptedTokens = { Audience.API }, allowedUserRoles = { "HOPS_ADMIN", "HOPS_USER" })
public Response getAllAlerts(@Context UriInfo uriInfo, @Context SecurityContext sc) throws ProjectException {
ResourceRequest resourceRequest = new ResourceRequest(ResourceRequest.Name.ALERTS);
ProjectAlertsDTO projectAlertsDTO = projectAlertsBuilder.buildItemsAll(uriInfo, resourceRequest, getProject());
JobAlertsDTO jobAlertsDTO = jobAlertsBuilder.buildItems(uriInfo, resourceRequest, getProject());
FeatureGroupAlertDTO featureGroupAlertDTO = featureGroupAlertBuilder.buildItems(uriInfo, resourceRequest, getProject());
ProjectAllAlertsDTO projectAllAlertsDTO = new ProjectAllAlertsDTO();
projectAllAlertsDTO.setProjectAlerts(projectAlertsDTO);
projectAllAlertsDTO.setJobAlerts(jobAlertsDTO);
projectAllAlertsDTO.setFeatureGroupAlerts(featureGroupAlertDTO);
return Response.ok().entity(projectAllAlertsDTO).build();
}
Aggregations