use of io.syndesis.common.model.ModelData in project syndesis by syndesisio.
the class GenerateMapperInspectionsMojo method execute.
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
try {
final Resource resource = new Resource();
resource.setDirectory(outputDir.getCanonicalPath());
project.addResource(resource);
final Set<File> generated = new HashSet<>();
final ReadApiClientData reader = new ReadApiClientData();
final List<ModelData<?>> modelList = reader.readDataFromFile("io/syndesis/server/dao/deployment.json");
for (final ModelData<?> model : modelList) {
if (model.getKind() == Kind.Connector) {
final Connector connector = (Connector) model.getData();
for (final ConnectorAction action : connector.getActions()) {
process(generated, connector, action, action.getInputDataShape());
process(generated, connector, action, action.getOutputDataShape());
}
}
}
} catch (final IOException e) {
throw new MojoFailureException(e.getMessage(), e);
}
}
Aggregations