21 lines
849 B
Java
21 lines
849 B
Java
package _VisualDVM.Passes.All;
|
|
import Common.Utils.Utils_;
|
|
import _VisualDVM.ComponentsServer.BugReport.BugReport;
|
|
import _VisualDVM.ComponentsServer.BugReport.BugReportState;
|
|
import _VisualDVM.Global;
|
|
import _VisualDVM.Passes.Server.ComponentsServerPass;
|
|
import _VisualDVM.Repository.Server.ServerCode;
|
|
public class SendBugReport extends ComponentsServerPass<BugReport> {
|
|
@Override
|
|
protected boolean canStart(Object... args) throws Exception {
|
|
target = Global.componentsServer.db.bugReports.getUI().getCurrent();
|
|
if (!target.project_version.isEmpty())
|
|
target.packed_archive = Utils_.fileToBytes(target.getArchiveFile());
|
|
return SendRequest(ServerCode.PublishObject, "", target);
|
|
}
|
|
@Override
|
|
protected void performFail() throws Exception {
|
|
target.state = BugReportState.draft;
|
|
}
|
|
}
|