use of com.hortonworks.streamline.streams.catalog.TopologyWindow in project streamline by hortonworks.
the class WindowCatalogResource method removeWindowById.
@DELETE
@Path("/topologies/{topologyId}/windows/{id}")
@Timed
public Response removeWindowById(@PathParam("topologyId") Long topologyId, @PathParam("id") Long windowId, @Context SecurityContext securityContext) throws Exception {
SecurityUtil.checkRoleOrPermissions(authorizer, securityContext, Roles.ROLE_TOPOLOGY_SUPER_ADMIN, Topology.NAMESPACE, topologyId, WRITE);
TopologyWindow topologyWindow = catalogService.removeWindow(topologyId, windowId);
if (topologyWindow != null) {
return WSUtils.respondEntity(topologyWindow, OK);
}
throw EntityNotFoundException.byId(buildMessageForCompositeId(topologyId, windowId));
}
Aggregations