package _VisualDVM.Passes.All;
import Common.MainModule_;
import _VisualDVM.ComponentsServer.SubscriberWorkspace.SubscriberWorkspace;
import _VisualDVM.Global;
import _VisualDVM.GlobalData.Machine.Machine;
import _VisualDVM.GlobalData.User.User;
import _VisualDVM.Passes.Server.ComponentsServerPass;
import _VisualDVM.Repository.Server.ServerCode;
public class CheckRemoteWorkspace extends ComponentsServerPass<SubscriberWorkspace> {
    @Override
    protected boolean canStart(Object... args) throws Exception {
        target = null;
        if (Global.mainModule.getAccount().CheckRegistered(Log)) {
            String email = Global.mainModule.getAccount().email;
            String machineURL = MainModule_.instance.getDb().getTable(Machine.class).getUI().getCurrent().getURL();
            String login = MainModule_.instance.getDb().getTable(User.class).getUI().getCurrent().login;
            if (SendRequest(ServerCode.CheckURLRegistered, email + "\n" + machineURL + "\n" + login)) {
                target = (SubscriberWorkspace) request.server_response.object;
                return true;
            }
        }
        ;
        return false;
    }
}
