рефакторинг. переносил текущие объекты в другое место
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Repository.BugReport.BugReportInterface;
|
||||
import _VisualDVM.Repository.BugReport.BugReportState;
|
||||
import _VisualDVM.Repository.Server.ServerCode;
|
||||
@@ -9,18 +10,18 @@ import Visual_DVM_2021.Passes.Server.ComponentsRepositoryPass;
|
||||
public class SendBugReport extends ComponentsRepositoryPass {
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
if (!Current.getBugReport().project_version.isEmpty()) {
|
||||
if (!Global.mainModule.getBugReport().project_version.isEmpty()) {
|
||||
//отправить архив.
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.SendBugReport,
|
||||
Current.getBugReport().id,
|
||||
Utils_.fileToBytes(BugReportInterface.getArchiveFile(Current.getBugReport()))
|
||||
Global.mainModule.getBugReport().id,
|
||||
Utils_.fileToBytes(BugReportInterface.getArchiveFile(Global.mainModule.getBugReport()))
|
||||
));
|
||||
}
|
||||
// синхрон бд
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.PublishObject, "", Current.getBugReport()));
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.PublishObject, "", Global.mainModule.getBugReport()));
|
||||
}
|
||||
@Override
|
||||
protected void performFail() throws Exception {
|
||||
Current.getBugReport().state = BugReportState.draft;
|
||||
Global.mainModule.getBugReport().state = BugReportState.draft;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user