Search in sources :

Example 1 with AppliedUpgradeTask

use of org.talend.dataprep.upgrade.repository.model.AppliedUpgradeTask in project data-prep by Talend.

the class FileUpgradeTaskRepository method applied.

/**
 * @see UpgradeTaskRepository#applied(String, UpgradeTaskId)
 */
@Override
public void applied(String targetId, UpgradeTaskId id) {
    AppliedUpgradeTask task = new AppliedUpgradeTask(id);
    File file = new File(getRootFolder(targetId), id.getUniqueKey() + ".json");
    try {
        mapper.writerFor(AppliedUpgradeTask.class).writeValue(file, task);
    } catch (IOException e) {
        throw new TDPException(UNEXPECTED_EXCEPTION, e);
    }
    LOG.debug("{} for {} saved here {}", task, targetId, file.getPath());
}
Also used : TDPException(org.talend.dataprep.exception.TDPException) AppliedUpgradeTask(org.talend.dataprep.upgrade.repository.model.AppliedUpgradeTask) IOException(java.io.IOException) File(java.io.File)

Aggregations

File (java.io.File)1 IOException (java.io.IOException)1 TDPException (org.talend.dataprep.exception.TDPException)1 AppliedUpgradeTask (org.talend.dataprep.upgrade.repository.model.AppliedUpgradeTask)1