use of org.eclipse.winery.repository.backend.consistencycheck.ConsistencyCheckerConfiguration in project winery by eclipse.
the class ConsistencyCheckWebSocket method onMessage.
@OnMessage
public void onMessage(String message, Session session) throws IOException {
ObjectMapper mapper = new ObjectMapper();
ConsistencyCheckerConfiguration config = mapper.readValue(message, ConsistencyCheckerConfiguration.class);
ConsistencyErrorLogger errorList = ConsistencyChecker.checkCorruption(config, this);
// Transform object to JSON and send it.
this.session.getBasicRemote().sendText(mapper.writeValueAsString(errorList));
// Close the connection after the check has passed.
onClose(session);
}
use of org.eclipse.winery.repository.backend.consistencycheck.ConsistencyCheckerConfiguration in project winery by eclipse.
the class AdminTopResource method checkConsistency.
@GET
@Path("consistencycheck")
@Produces(MediaType.APPLICATION_JSON)
public ConsistencyErrorLogger checkConsistency(@QueryParam("serviceTemplatesOnly") boolean serviceTemplatesOnly, @QueryParam("checkDocumentation") boolean checkDocumentation) {
IRepository repo = RepositoryFactory.getRepository();
EnumSet<ConsistencyCheckerVerbosity> verbosity = EnumSet.of(ConsistencyCheckerVerbosity.NONE);
ConsistencyCheckerConfiguration config = new ConsistencyCheckerConfiguration(serviceTemplatesOnly, checkDocumentation, verbosity, repo);
return ConsistencyChecker.checkCorruption(config);
}
Aggregations