26 lines
1.1 KiB
Java
26 lines
1.1 KiB
Java
package _VisualDVM.Passes.All;
|
|
import Common.Utils.Utils_;
|
|
import _VisualDVM.Global;
|
|
import _VisualDVM.Passes.Server.ComponentsRepositoryPass;
|
|
import _VisualDVM.Repository.BugReport.BugReportState;
|
|
import _VisualDVM.Repository.Server.ServerCode;
|
|
import _VisualDVM.Repository.Server.ServerExchangeUnit_2021;
|
|
public class SendBugReport extends ComponentsRepositoryPass {
|
|
@Override
|
|
protected void ServerAction() throws Exception {
|
|
if (!Global.mainModule.getBugReport().project_version.isEmpty()) {
|
|
//отправить архив.
|
|
Command(new ServerExchangeUnit_2021(ServerCode.SendBugReport,
|
|
Global.mainModule.getBugReport().id,
|
|
Utils_.fileToBytes(Global.mainModule.getBugReport().getArchiveFile())
|
|
));
|
|
}
|
|
// синхрон бд
|
|
Command(new ServerExchangeUnit_2021(ServerCode.PublishObject, "", Global.mainModule.getBugReport()));
|
|
}
|
|
@Override
|
|
protected void performFail() throws Exception {
|
|
Global.mainModule.getBugReport().state = BugReportState.draft;
|
|
}
|
|
}
|