Search in sources :

Example 1 with Parameter

use of org.wso2.carbon.identity.workflow.mgt.stub.bean.Parameter in project product-mi-tooling by wso2.

the class GroupsApi method getTasksByNodeIds.

@GET
@Path("/{group-id}/tasks")
@Produces({ "application/json" })
@Operation(summary = "Get tasks by node ids", description = "", tags = { "tasks" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "List of tasks 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 getTasksByNodeIds(@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) {
    TasksDelegate tasksDelegate = new TasksDelegate();
    Artifacts tasksList = tasksDelegate.getArtifactsList(groupId, nodes);
    Response.ResponseBuilder responseBuilder = Response.ok().entity(tasksList);
    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) TasksDelegate(org.wso2.ei.dashboard.micro.integrator.delegates.TasksDelegate) Operation(io.swagger.v3.oas.annotations.Operation) ApiResponses(io.swagger.v3.oas.annotations.responses.ApiResponses)

Example 2 with Parameter

use of org.wso2.carbon.identity.workflow.mgt.stub.bean.Parameter in project product-mi-tooling by wso2.

the class GroupsApi method getApisByNodeIds.

@GET
@Path("/{group-id}/apis")
@Produces({ "application/json" })
@Operation(summary = "Get APIs by node ids", description = "", tags = { "apis" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "List of APIs 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 getApisByNodeIds(@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) {
    ApisDelegate apisDelegate = new ApisDelegate();
    Artifacts apiList = apisDelegate.getArtifactsList(groupId, nodes);
    Response.ResponseBuilder responseBuilder = Response.ok().entity(apiList);
    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) ApisDelegate(org.wso2.ei.dashboard.micro.integrator.delegates.ApisDelegate) Operation(io.swagger.v3.oas.annotations.Operation) ApiResponses(io.swagger.v3.oas.annotations.responses.ApiResponses)

Example 3 with Parameter

use of org.wso2.carbon.identity.workflow.mgt.stub.bean.Parameter in project product-mi-tooling by wso2.

the class GroupsApi method getLogFilesByNodeIds.

@GET
@Path("/{group-id}/logs")
@Produces({ "application/json" })
@Operation(summary = "Get log files by node ids", description = "", tags = { "logFiles" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "List of log files of provided nodes", content = @Content(schema = @Schema(implementation = LogList.class))), @ApiResponse(responseCode = "200", description = "Unexpected error", content = @Content(schema = @Schema(implementation = Error.class))) })
public Response getLogFilesByNodeIds(@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) throws ManagementApiException {
    LogsDelegate logsDelegate = new LogsDelegate();
    LogList logList = logsDelegate.getLogsList(groupId, nodes);
    Response.ResponseBuilder responseBuilder = Response.ok().entity(logList);
    HttpUtils.setHeaders(responseBuilder);
    return responseBuilder.build();
}
Also used : Response(javax.ws.rs.core.Response) ApiResponse(io.swagger.v3.oas.annotations.responses.ApiResponse) LogList(org.wso2.ei.dashboard.core.rest.model.LogList) LogsDelegate(org.wso2.ei.dashboard.micro.integrator.delegates.LogsDelegate) Operation(io.swagger.v3.oas.annotations.Operation) ApiResponses(io.swagger.v3.oas.annotations.responses.ApiResponses)

Example 4 with Parameter

use of org.wso2.carbon.identity.workflow.mgt.stub.bean.Parameter in project product-mi-tooling by wso2.

the class GroupsApi method updateLogLevelByNodeId.

@PATCH
@Path("/{group-id}/log-configs/nodes/{node-id}")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@Operation(summary = "Update log level by nodeId", description = "", tags = { "logConfigs" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Logger update status", content = @Content(schema = @Schema(implementation = SuccessStatus.class))), @ApiResponse(responseCode = "200", description = "Unexpected error", content = @Content(schema = @Schema(implementation = Error.class))) })
public Response updateLogLevelByNodeId(@PathParam("group-id") @Parameter(description = "Group ID of the node") String groupId, @PathParam("node-id") @Parameter(description = "NodeId") String nodeId, @Valid LogConfigUpdateRequest request) throws ManagementApiException {
    LogConfigDelegate logConfigDelegate = new LogConfigDelegate();
    Ack ack = logConfigDelegate.updateLogLevelByNodeId(groupId, nodeId, request);
    return Response.ok().entity(ack).build();
}
Also used : LogConfigDelegate(org.wso2.ei.dashboard.micro.integrator.delegates.LogConfigDelegate) Ack(org.wso2.ei.dashboard.core.rest.model.Ack) Operation(io.swagger.v3.oas.annotations.Operation) ApiResponses(io.swagger.v3.oas.annotations.responses.ApiResponses)

Example 5 with Parameter

use of org.wso2.carbon.identity.workflow.mgt.stub.bean.Parameter 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)

Aggregations

HashMap (java.util.HashMap)74 ArrayList (java.util.ArrayList)65 Map (java.util.Map)29 Response (javax.ws.rs.core.Response)29 Operation (io.swagger.v3.oas.annotations.Operation)27 ApiResponses (io.swagger.v3.oas.annotations.responses.ApiResponses)27 Parameter (org.apache.axis2.description.Parameter)27 ApiResponse (io.swagger.v3.oas.annotations.responses.ApiResponse)26 OMElement (org.apache.axiom.om.OMElement)21 Test (org.testng.annotations.Test)19 IOException (java.io.IOException)17 List (java.util.List)17 QName (javax.xml.namespace.QName)15 CAppArtifacts (org.wso2.ei.dashboard.core.rest.model.CAppArtifacts)15 Method (java.lang.reflect.Method)14 BLangEndpoint (org.wso2.ballerinalang.compiler.tree.BLangEndpoint)14 Artifacts (org.wso2.ei.dashboard.core.rest.model.Artifacts)14 APIManagementException (org.wso2.carbon.apimgt.api.APIManagementException)13 ResultSet (java.sql.ResultSet)12 PreparedStatement (java.sql.PreparedStatement)11