package Visual_DVM_2021.Passes.All;
import _VisualDVM.Repository.BugReport.BugReport;
import _VisualDVM.Repository.BugReport.BugReportState;
import _VisualDVM.Repository.Server.ServerCode;
import _VisualDVM.Repository.Server.ServerExchangeUnit_2021;
import Visual_DVM_2021.Passes.Server.ComponentsRepositoryPass;
public class DeleteBugReportFromServer extends ComponentsRepositoryPass<BugReport> {
    @Override
    protected boolean canStart(Object... args) {
        target = (BugReport) args[0];
        return !target.state.equals(BugReportState.draft);
    }
    @Override
    protected void ServerAction() throws Exception {
        Command(new ServerExchangeUnit_2021(ServerCode.DeleteObject,"", target));
    }
}
