Files
VisualSapfor/src/Visual_DVM_2021/Passes/All/GetComponentsBackupsFromServer.java

29 lines
1.1 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package Visual_DVM_2021.Passes.All;
import Common_old.Current;
import Repository.Server.ServerCode;
import Repository.Server.ServerExchangeUnit_2021;
import Visual_DVM_2021.Passes.Server.ComponentsRepositoryPass;
import java.io.File;
import java.util.Vector;
public class GetComponentsBackupsFromServer extends ComponentsRepositoryPass<Vector<File>> {
@Override
protected boolean canStart(Object... args) throws Exception {
target = new Vector<>();
return (Current.Check(Log, Current.Component));
}
@Override
protected void ServerAction() throws Exception {
Command(new ServerExchangeUnit_2021(ServerCode.GetComponentsBackups, Current.getComponent().getComponentType().toString()));
target = (Vector<File>) response.object;
}
@Override
protected boolean validate() {
if (target.isEmpty()) {
Log.Writeln_("Не найдено резервных копий на сервере для компонента " + Current.getComponent().getComponentType().getDescription());
return false;
}
return true;
}
}