@GET @Path("/topologies/{topologyId}/versions/{versionId}/sinks") @Timed public Response listTopologySinksForVersion(@PathParam("topologyId") Long topologyId, @PathParam("versionId") Long versionId, @Context UriInfo uriInfo, @Context SecurityContext securityContext) throws Exception { return listTopologySinks( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, versionId, uriInfo), topologyId, securityContext); }
@GET @Path("/topologies/{topologyId}/versions/{versionId}/rules") @Timed public Response listTopologySourcesForVersion(@PathParam("topologyId") Long topologyId, @PathParam("versionId") Long versionId, @Context UriInfo uriInfo, @Context SecurityContext securityContext) throws Exception { return listTopologyRules( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, versionId, uriInfo), topologyId, securityContext); }
@GET @Path("/topologies/{topologyId}/versions/{versionId}/edges") @Timed public Response listTopologyEdgesForVersion(@PathParam("topologyId") Long topologyId, @PathParam("versionId") Long versionId, @Context UriInfo uriInfo, @Context SecurityContext securityContext) throws Exception { return listTopologyEdges( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, versionId, uriInfo), topologyId, securityContext); }
@GET @Path("/topologies/{topologyId}/versions/{versionId}/streams") @Timed public Response listStreamInfosForVersion(@PathParam("topologyId") Long topologyId, @PathParam("versionId") Long versionId, @Context UriInfo uriInfo, @Context SecurityContext securityContext) throws Exception { return listTopologyStreams( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, versionId, uriInfo), topologyId, securityContext); }
@GET @Path("/topologies/{topologyId}/versions/{versionId}/windows") @Timed public Response listTopologySourcesForVersion(@PathParam("topologyId") Long topologyId, @PathParam("versionId") Long versionId, @Context UriInfo uriInfo, @Context SecurityContext securityContext) throws Exception { return listTopologyWindows( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, versionId, uriInfo), topologyId, securityContext); }
@GET @Path("/topologies/{topologyId}/versions/{versionId}/sources") @Timed public Response listTopologySourcesForVersion(@PathParam("topologyId") Long topologyId, @PathParam("versionId") Long versionId, @Context UriInfo uriInfo, @Context SecurityContext securityContext) throws Exception { return listTopologySources( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, versionId, uriInfo), topologyId, securityContext); }
@GET @Path("/topologies/{topologyId}/versions/{versionId}/branchrules") @Timed public Response listTopologySourcesForVersion(@PathParam("topologyId") Long topologyId, @PathParam("versionId") Long versionId, @Context UriInfo uriInfo, @Context SecurityContext securityContext) throws Exception { return listTopologyBranchRules( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, versionId, uriInfo), topologyId, securityContext); }
@GET @Path("/topologies/{topologyId}/versions/{versionId}/processors") @Timed public Response listTopologyProcessorsForVersion(@PathParam("topologyId") Long topologyId, @PathParam("versionId") Long versionId, @Context UriInfo uriInfo, @Context SecurityContext securityContext) throws Exception { return listTopologyProcessors( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, versionId, uriInfo), topologyId, securityContext); }
@GET @Path("/topologies/{topologyId}/windows") @Timed public Response listTopologyWindows(@PathParam("topologyId") Long topologyId, @Context UriInfo uriInfo, @Context SecurityContext securityContext) throws Exception { Long currentVersionId = catalogService.getCurrentVersionId(topologyId); return listTopologyWindows( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, currentVersionId, uriInfo), topologyId, securityContext); }
public Collection<TopologyEditorMetadata> listTopologyEditorMetadata() { List<TopologyEditorMetadata> metadatas = new ArrayList<>(); Collection<TopologyVersion> currentVersions = listCurrentTopologyVersionInfos(); for (TopologyVersion version : currentVersions) { List<QueryParam> queryParams = WSUtils.buildTopologyIdAndVersionIdAwareQueryParams( version.getTopologyId(), version.getId(), null); metadatas.addAll(listTopologyEditorMetadata(queryParams)); } return metadatas; }
public TopologyStream getStreamInfoByName(Long topologyId, String streamId, Long versionId) { List<QueryParam> queryParams = WSUtils.buildTopologyIdAndVersionIdAwareQueryParams(topologyId, versionId, null); try { for (TopologyStream topologyStream : listStreamInfos(queryParams)) { if (topologyStream.getStreamId().equals(streamId)) { return topologyStream; } } } catch (Exception ex) { LOG.error("Got exception ", ex); throw new RuntimeException(ex); } return null; }
Long currentVersionId = catalogService.getCurrentVersionId(topologyId); return listTopologySinks( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, currentVersionId, uriInfo), topologyId, securityContext);
Long currentVersionId = catalogService.getCurrentVersionId(topologyId); return listTopologySources( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, currentVersionId, uriInfo), topologyId, securityContext);
Long currentVersionId = catalogService.getCurrentVersionId(topologyId); return listTopologyEdges( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, currentVersionId, uriInfo), topologyId, securityContext);
Long currentVersionId = catalogService.getCurrentVersionId(topologyId); return listTopologyProcessors( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, currentVersionId, uriInfo), topologyId, securityContext);
Long currentVersionId = catalogService.getCurrentVersionId(topologyId); return listTopologyBranchRules( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, currentVersionId, uriInfo), topologyId, securityContext);
Long currentVersionId = catalogService.getCurrentVersionId(topologyId); return listTopologyRules( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, currentVersionId, uriInfo), topologyId, securityContext);
@Context SecurityContext securityContext) throws Exception { return listTopologyStreams( buildTopologyIdAndVersionIdAwareQueryParams(topologyId, catalogService.getCurrentVersionId(topologyId), uriInfo), topologyId, securityContext);
List<com.hortonworks.registries.common.QueryParam> queryParams = WSUtils.buildTopologyIdAndVersionIdAwareQueryParams(topologyId, currentVersionId, uriInfo);
private void copyTopologyDependencies(Long topologyId, Long oldVersionId, Long newVersionId) throws Exception { List<QueryParam> topologyIdVersionIdQueryParams = WSUtils.buildTopologyIdAndVersionIdAwareQueryParams( topologyId, oldVersionId, null);