Search in sources :

Example 11 with TopologyWindow

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));
}
Also used : TopologyWindow(com.hortonworks.streamline.streams.catalog.TopologyWindow) Path(javax.ws.rs.Path) DELETE(javax.ws.rs.DELETE) Timed(com.codahale.metrics.annotation.Timed)

Aggregations

TopologyWindow (com.hortonworks.streamline.streams.catalog.TopologyWindow)11 Timed (com.codahale.metrics.annotation.Timed)5 Path (javax.ws.rs.Path)5 TopologyBranchRule (com.hortonworks.streamline.streams.catalog.TopologyBranchRule)4 TopologyRule (com.hortonworks.streamline.streams.catalog.TopologyRule)4 QueryParam (com.hortonworks.registries.common.QueryParam)3 StorableKey (com.hortonworks.registries.storage.StorableKey)3 WSUtils.buildEdgesFromQueryParam (com.hortonworks.streamline.common.util.WSUtils.buildEdgesFromQueryParam)3 WSUtils.buildEdgesToQueryParam (com.hortonworks.streamline.common.util.WSUtils.buildEdgesToQueryParam)3 WSUtils.currentVersionQueryParam (com.hortonworks.streamline.common.util.WSUtils.currentVersionQueryParam)3 WSUtils.versionIdQueryParam (com.hortonworks.streamline.common.util.WSUtils.versionIdQueryParam)3 BaseTopologyRule (com.hortonworks.streamline.streams.catalog.BaseTopologyRule)2 TopologyEdge (com.hortonworks.streamline.streams.catalog.TopologyEdge)2 TopologyProcessor (com.hortonworks.streamline.streams.catalog.TopologyProcessor)2 TopologySink (com.hortonworks.streamline.streams.catalog.TopologySink)2 TopologySource (com.hortonworks.streamline.streams.catalog.TopologySource)2 TopologyTestRunCase (com.hortonworks.streamline.streams.catalog.TopologyTestRunCase)2 TopologyTestRunCaseSink (com.hortonworks.streamline.streams.catalog.TopologyTestRunCaseSink)2 TopologyTestRunCaseSource (com.hortonworks.streamline.streams.catalog.TopologyTestRunCaseSource)2 Rule (com.hortonworks.streamline.streams.layout.component.rule.Rule)2