Search in sources :

Example 1 with DifferenceEngine

use of com.emc.apidocs.differencing.DifferenceEngine in project coprhd-controller by CoprHD.

the class ApiDoclet method calculateDifferences.

private static synchronized ApiDifferences calculateDifferences(List<ApiService> apiServices) {
    Properties prop = new Properties();
    try {
        FileInputStream fileInput = new FileInputStream(rootDirectory + "gradle.properties");
        prop.load(fileInput);
    } catch (IOException e) {
        throw new RuntimeException("Unable to load Gradle properties file", e);
    }
    String docsMetaVersion = prop.getProperty("apidocsComparisionVersion");
    List<ApiService> oldServices = MetaData.load(KnownPaths.getMetaDataFile("MetaData-" + docsMetaVersion + ".json"));
    DifferenceEngine differenceEngine = new DifferenceEngine();
    return differenceEngine.calculateDifferences(oldServices, apiServices);
}
Also used : ApiService(com.emc.apidocs.model.ApiService) DifferenceEngine(com.emc.apidocs.differencing.DifferenceEngine) IOException(java.io.IOException) Properties(java.util.Properties) FileInputStream(java.io.FileInputStream)

Aggregations

DifferenceEngine (com.emc.apidocs.differencing.DifferenceEngine)1 ApiService (com.emc.apidocs.model.ApiService)1 FileInputStream (java.io.FileInputStream)1 IOException (java.io.IOException)1 Properties (java.util.Properties)1