use of fr.inria.spirals.repairnator.serializer.engines.SerializerEngine in project repairnator by Spirals-Team.
the class TreatedBuildTracking method serialize.
public void serialize() {
SerializedData data = new SerializedData(this.serializeAsList(), this.serializeAsJson());
List<SerializedData> allData = new ArrayList<>();
allData.add(data);
for (SerializerEngine engine : this.getEngines()) {
engine.serialize(allData, this.getType());
}
}
use of fr.inria.spirals.repairnator.serializer.engines.SerializerEngine 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);
}
}
use of fr.inria.spirals.repairnator.serializer.engines.SerializerEngine in project repairnator by Spirals-Team.
the class InspectorTimeSerializer method serializeData.
@Override
public void serializeData(ProjectInspector inspector) {
SerializedData data = new SerializedData(this.serializeAsList(inspector), this.serializeAsJson(inspector));
List<SerializedData> allData = new ArrayList<>();
allData.add(data);
for (SerializerEngine engine : this.getEngines()) {
engine.serialize(allData, this.getType());
}
}
use of fr.inria.spirals.repairnator.serializer.engines.SerializerEngine in project repairnator by Spirals-Team.
the class EndProcessSerializer method serialize.
public void serialize() {
SerializedData data = new SerializedData(this.serializeAsList(), this.serializeAsJson());
List<SerializedData> allData = new ArrayList<>();
allData.add(data);
for (SerializerEngine engine : this.getEngines()) {
engine.serialize(allData, this.getType());
}
}
use of fr.inria.spirals.repairnator.serializer.engines.SerializerEngine in project repairnator by Spirals-Team.
the class Launcher method initSerializerEngines.
private void initSerializerEngines() {
this.engines = new ArrayList<>();
SerializerEngine spreadsheetSerializerEngine = LauncherUtils.initSpreadsheetSerializerEngineWithAccessToken(LOGGER);
if (spreadsheetSerializerEngine != null) {
this.engines.add(spreadsheetSerializerEngine);
}
List<SerializerEngine> fileSerializerEngines = LauncherUtils.initFileSerializerEngines(LOGGER);
this.engines.addAll(fileSerializerEngines);
SerializerEngine mongoDBSerializerEngine = LauncherUtils.initMongoDBSerializerEngine(LOGGER);
if (mongoDBSerializerEngine != null) {
this.engines.add(mongoDBSerializerEngine);
}
}
Aggregations