@Test public void shouldFetchIntegrationDeployments() { final IntegrationDeployment expected = deployment(0); when(dataManager.fetch(IntegrationDeployment.class, compositeId(INTEGRATION_ID, 3))).thenReturn(expected); final IntegrationDeployment got = handler.get(INTEGRATION_ID, 3); assertThat(got).isEqualTo(expected); }
@GET @Produces(MediaType.APPLICATION_JSON) @Path("/{version}") public IntegrationDeployment get(@NotNull @PathParam("id") @Parameter(required = true) final String id, @NotNull @PathParam("version") @Parameter(required = true) final int version) { final String compositeId = IntegrationDeployment.compositeId(id, version); return getDataManager().fetch(IntegrationDeployment.class, compositeId); }
IntegrationDeploymentHandler extends BaseHandler { @GET @Produces(MediaType.APPLICATION_JSON) @Path("/{version}") public IntegrationDeployment get(@NotNull @PathParam("id") @Parameter(required = true) final String id, @NotNull @PathParam("version") @Parameter(required = true) final int version) { final String compositeId = IntegrationDeployment.compositeId(id, version); return getDataManager().fetch(IntegrationDeployment.class, compositeId); } }
IntegrationDeploymentHandler extends BaseHandler { @GET @Produces(MediaType.APPLICATION_JSON) @Path("/{version}") public IntegrationDeployment get(@NotNull @PathParam("id") @Parameter(required = true) final String id, @NotNull @PathParam("version") @Parameter(required = true) final int version) { final String compositeId = IntegrationDeployment.compositeId(id, version); return getDataManager().fetch(IntegrationDeployment.class, compositeId); } @Autowired  IntegrationDeploymentHandler(final DataManager dataMgr, OpenShiftService openShiftService,
            UserConfigurationProperties properties); }
IntegrationDeploymentHandler extends BaseHandler { @GET @Produces(MediaType.APPLICATION_JSON) @Path("/{version}") public IntegrationDeployment get(@NotNull @PathParam("id") @Parameter(required = true) final String id, @NotNull @PathParam("version") @Parameter(required = true) final int version) { final String compositeId = IntegrationDeployment.compositeId(id, version); return getDataManager().fetch(IntegrationDeployment.class, compositeId); } @Autowired  IntegrationDeploymentHandler(final DataManager dataMgr, OpenShiftService openShiftService,
            UserConfigurationProperties properties); @GET @Produces(MediaType.APPLICATION_JSON) @Path("/{version}") IntegrationDeployment get(@NotNull @PathParam("id") @Parameter(required = true) final String id,
        @NotNull @PathParam("version") @Parameter(required = true) final int version); @GET @Produces(MediaType.APPLICATION_JSON) ListResult<IntegrationDeployment> list(
        @NotNull @PathParam("id") @Parameter(required = true) final String id,
        @Parameter(required = false, description = "Page number to return") @QueryParam("page") @DefaultValue("1") int page,
        @Parameter(required = false, description = "Number of records per page") @QueryParam("per_page") @DefaultValue("20") int perPage
    ); @PUT @Produces(MediaType.APPLICATION_JSON) IntegrationDeployment update(@Context final SecurityContext sec,
        @NotNull @PathParam("id") @Parameter(required = true) final String id); @POST @Produces(MediaType.APPLICATION_JSON) @Path("/{version}/targetState") void updateTargetState(@NotNull @PathParam("id") @Parameter(required = true) final String id,
        @NotNull @PathParam("version") @Parameter(required = true) final int version,
        @Parameter(required = true) final TargetStateRequest request); }
IntegrationDeploymentHandler extends BaseHandler { @GET @Produces(MediaType.APPLICATION_JSON) @Path("/{version}") public IntegrationDeployment get(@NotNull @PathParam("id") @Parameter(required = true) final String id, @NotNull @PathParam("version") @Parameter(required = true) final int version) { final String compositeId = IntegrationDeployment.compositeId(id, version); return getDataManager().fetch(IntegrationDeployment.class, compositeId); } @Autowired  IntegrationDeploymentHandler(final DataManager dataMgr, OpenShiftService openShiftService,
            UserConfigurationProperties properties); @GET @Produces(MediaType.APPLICATION_JSON) @Path("/{version}") IntegrationDeployment get(@NotNull @PathParam("id") @Parameter(required = true) final String id,
        @NotNull @PathParam("version") @Parameter(required = true) final int version); @GET @Produces(MediaType.APPLICATION_JSON) ListResult<IntegrationDeployment> list(
        @NotNull @PathParam("id") @Parameter(required = true) final String id,
        @Parameter(required = false, description = "Page number to return") @QueryParam("page") @DefaultValue("1") int page,
        @Parameter(required = false, description = "Number of records per page") @QueryParam("per_page") @DefaultValue("20") int perPage
    ); @PUT @Produces(MediaType.APPLICATION_JSON) IntegrationDeployment update(@Context final SecurityContext sec,
        @NotNull @PathParam("id") @Parameter(required = true) final String id); @POST @Produces(MediaType.APPLICATION_JSON) @Path("/{version}/targetState") void updateTargetState(@NotNull @PathParam("id") @Parameter(required = true) final String id,
        @NotNull @PathParam("version") @Parameter(required = true) final int version,
        @Parameter(required = true) final TargetStateRequest request);  }