package _VisualDVM.Passes.All;
import Common.Utils.Pair;
import _VisualDVM.ComponentsServer.SubscriberWorkspace.SubscriberWorkspace;
import _VisualDVM.Global;
import _VisualDVM.Passes.Server.ComponentsServerPass;
import _VisualDVM.Repository.Server.ServerCode;
public class DeleteRemoteWorkspace extends ComponentsServerPass<SubscriberWorkspace> {
    @Override
    public String getIconPath() {
        return "/Common/icons/Delete.png";
    }
    @Override
    protected boolean canStart(Object... args) throws Exception {
        if (Global.componentsServer.credentials_db.workspaces.getUI().CheckCurrent(Log)) {
            target = Global.componentsServer.credentials_db.workspaces.getUI().getCurrent();
            return SendRequest(ServerCode.DeleteObjectByPK, "credentials",
                    new Pair<>(target.getClass(), target.getPK()));
        }
        return false;
    }
}
