UpgradeBackupMergerImpl.java
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* javax.jcr.Session
* org.apache.felix.scr.annotations.Component
* org.apache.felix.scr.annotations.Reference
* org.apache.felix.scr.annotations.Service
*/
package com.adobe.cq.upgrades.backup.impl;
import com.adobe.cq.upgrades.backup.BackupConfig;
import com.adobe.cq.upgrades.backup.UpgradeBackupMerger;
import com.adobe.cq.upgrades.backup.impl.BackupMerger;
import javax.jcr.Session;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
@Component
@Service
public class UpgradeBackupMergerImpl
implements UpgradeBackupMerger {
@Reference
private BackupConfig backupConfig;
@Override
public void merge(Session s, UpgradeBackupMerger.ProgressInfo p) throws Exception {
this.backupConfig.readConfig(s);
BackupMerger bm = new BackupMerger("/var/upgrade/PreUpgradeBackup", this.backupConfig, p);
bm.execute(s);
}
protected void bindBackupConfig(BackupConfig backupConfig) {
this.backupConfig = backupConfig;
}
protected void unbindBackupConfig(BackupConfig backupConfig) {
if (this.backupConfig == backupConfig) {
this.backupConfig = null;
}
}
}