Search in sources :

Example 1 with LocalEntriesDelegate

use of org.wso2.ei.dashboard.micro.integrator.delegates.LocalEntriesDelegate in project product-mi-tooling by wso2.

the class GroupsApi method getLocalEntryValue.

@GET
@Path("/{group-id}/nodes/{node-id}/local-entries/{local-entry}/value")
@Produces({ "application/json" })
@Operation(summary = "Get value of local entry", description = "", tags = { "localEntries" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Value of the local entry", content = @Content(schema = @Schema(implementation = LocalEntryValue.class))), @ApiResponse(responseCode = "200", description = "Unexpected error", content = @Content(schema = @Schema(implementation = Error.class))) })
public Response getLocalEntryValue(@PathParam("group-id") @Parameter(description = "Group id of the node") String groupId, @PathParam("node-id") @Parameter(description = "Node id") String nodeId, @PathParam("local-entry") @Parameter(description = "Local entry name") String localEntry) throws ManagementApiException {
    LocalEntriesDelegate localEntriesDelegate = new LocalEntriesDelegate();
    LocalEntryValue localEntryValue = localEntriesDelegate.getValue(groupId, nodeId, localEntry);
    Response.ResponseBuilder responseBuilder = Response.ok().entity(localEntryValue);
    HttpUtils.setHeaders(responseBuilder);
    return responseBuilder.build();
}
Also used : LocalEntryValue(org.wso2.ei.dashboard.core.rest.model.LocalEntryValue) Response(javax.ws.rs.core.Response) ApiResponse(io.swagger.v3.oas.annotations.responses.ApiResponse) LocalEntriesDelegate(org.wso2.ei.dashboard.micro.integrator.delegates.LocalEntriesDelegate) Operation(io.swagger.v3.oas.annotations.Operation) ApiResponses(io.swagger.v3.oas.annotations.responses.ApiResponses)

Example 2 with LocalEntriesDelegate

use of org.wso2.ei.dashboard.micro.integrator.delegates.LocalEntriesDelegate in project product-mi-tooling by wso2.

the class GroupsApi method getLocalEntriesByNodeIds.

@GET
@Path("/{group-id}/local-entries")
@Produces({ "application/json" })
@Operation(summary = "Get local entries by node ids", description = "", tags = { "localEntries" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "List of local entries deployed in provided nodes", content = @Content(schema = @Schema(implementation = Artifacts.class))), @ApiResponse(responseCode = "200", description = "Unexpected error", content = @Content(schema = @Schema(implementation = Error.class))) })
public Response getLocalEntriesByNodeIds(@PathParam("group-id") @Parameter(description = "Group ID of the node") String groupId, @NotNull @QueryParam("nodes") @Parameter(description = "ID/IDs of the nodes") List<String> nodes) {
    LocalEntriesDelegate localEntriesDelegate = new LocalEntriesDelegate();
    Artifacts localEntriesList = localEntriesDelegate.getArtifactsList(groupId, nodes);
    Response.ResponseBuilder responseBuilder = Response.ok().entity(localEntriesList);
    HttpUtils.setHeaders(responseBuilder);
    return responseBuilder.build();
}
Also used : Response(javax.ws.rs.core.Response) ApiResponse(io.swagger.v3.oas.annotations.responses.ApiResponse) CAppArtifacts(org.wso2.ei.dashboard.core.rest.model.CAppArtifacts) Artifacts(org.wso2.ei.dashboard.core.rest.model.Artifacts) LocalEntriesDelegate(org.wso2.ei.dashboard.micro.integrator.delegates.LocalEntriesDelegate) Operation(io.swagger.v3.oas.annotations.Operation) ApiResponses(io.swagger.v3.oas.annotations.responses.ApiResponses)

Aggregations

Operation (io.swagger.v3.oas.annotations.Operation)2 ApiResponse (io.swagger.v3.oas.annotations.responses.ApiResponse)2 ApiResponses (io.swagger.v3.oas.annotations.responses.ApiResponses)2 Response (javax.ws.rs.core.Response)2 LocalEntriesDelegate (org.wso2.ei.dashboard.micro.integrator.delegates.LocalEntriesDelegate)2 Artifacts (org.wso2.ei.dashboard.core.rest.model.Artifacts)1 CAppArtifacts (org.wso2.ei.dashboard.core.rest.model.CAppArtifacts)1 LocalEntryValue (org.wso2.ei.dashboard.core.rest.model.LocalEntryValue)1