use of fr.inria.spirals.repairnator.serializer.gspreadsheet.ManageGoogleAccessToken in project repairnator by Spirals-Team.
the class Launcher method initSerializerEngines.
private void initSerializerEngines() {
this.engines = new ArrayList<>();
SerializerEngine spreadsheetSerializerEngine = LauncherUtils.initSpreadsheetSerializerEngineWithFileSecret(LOGGER);
if (spreadsheetSerializerEngine != null) {
this.engines.add(spreadsheetSerializerEngine);
try {
ManageGoogleAccessToken manageGoogleAccessToken = ManageGoogleAccessToken.getInstance();
Credential credential = manageGoogleAccessToken.getCredential();
if (credential != null) {
this.config.setGoogleAccessToken(credential.getAccessToken());
}
} catch (IOException | GeneralSecurityException e) {
LOGGER.error("Error while initializing Google Spreadsheet, no information will be serialized in spreadsheets from the pipeline.", e);
}
}
List<SerializerEngine> fileSerializerEngines = LauncherUtils.initFileSerializerEngines(LOGGER);
this.engines.addAll(fileSerializerEngines);
SerializerEngine mongoDBSerializerEngine = LauncherUtils.initMongoDBSerializerEngine(LOGGER);
if (mongoDBSerializerEngine != null) {
this.engines.add(mongoDBSerializerEngine);
}
}
Aggregations