Search in sources :

Example 1 with SuppressFBWarnings

use of io.syndesis.common.util.SuppressFBWarnings in project syndesis by syndesisio.

the class Application method run.

@Override
@SuppressFBWarnings("DM_EXIT")
public void run(ApplicationArguments args) {
    try {
        // NOPMD
        System.out.println("To: " + to);
        generateIntegrationProject(new File(to));
    } catch (IOException e) {
        // NOPMD
        e.printStackTrace();
        // NOPMD
        System.exit(1);
    }
}
Also used : IOException(java.io.IOException) File(java.io.File) SuppressFBWarnings(io.syndesis.common.util.SuppressFBWarnings)

Example 2 with SuppressFBWarnings

use of io.syndesis.common.util.SuppressFBWarnings in project syndesis by syndesisio.

the class IntegrationHandler method setTargetStatus.

@POST
@Produces(MediaType.APPLICATION_JSON)
@Path("/{id}/deployments/{version}/targetState")
@SuppressFBWarnings("UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD")
public void setTargetStatus(@NotNull @PathParam("id") @ApiParam(required = true) String id, @NotNull @PathParam("version") @ApiParam(required = true) Integer version, TargetStateRequest request) {
    String compositeId = IntegrationDeployment.compositeId(id, version);
    IntegrationDeployment deployment = getDataManager().fetch(IntegrationDeployment.class, compositeId);
    deployment = new IntegrationDeployment.Builder().createFrom(deployment).targetState(request.targetState).build();
    getDataManager().update(deployment);
}
Also used : IntegrationDeployment(io.syndesis.common.model.integration.IntegrationDeployment) Path(javax.ws.rs.Path) POST(javax.ws.rs.POST) Produces(javax.ws.rs.Produces) SuppressFBWarnings(io.syndesis.common.util.SuppressFBWarnings)

Aggregations

SuppressFBWarnings (io.syndesis.common.util.SuppressFBWarnings)2 IntegrationDeployment (io.syndesis.common.model.integration.IntegrationDeployment)1 File (java.io.File)1 IOException (java.io.IOException)1 POST (javax.ws.rs.POST)1 Path (javax.ws.rs.Path)1 Produces (javax.ws.rs.Produces)1