package _VisualDVM.Passes.All;
import Common.Utils.Pair;
import _VisualDVM.ComponentsServer.BugReport.BugReport;
import _VisualDVM.ComponentsServer.BugReport.BugReportState;
import _VisualDVM.Passes.Server.ComponentsServerPass;
import _VisualDVM.Repository.Server.ServerCode;
public class DeleteBugReportFromServer extends ComponentsServerPass<BugReport> {
    @Override
    protected boolean canStart(Object... args) {
        target = (BugReport) args[0];
        return !target.state.equals(BugReportState.draft) &&
                SendRequest(ServerCode.DeleteObjectByPK, "", new Pair<>(BugReport.class, target.getPK()));
    }
}
