Files
VisualSapfor/src/_VisualDVM/Passes/All/GetComponentsBackupsFromServer.java
2025-02-14 03:16:43 +03:00

34 lines
1.2 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 _VisualDVM.Passes.All;
import _VisualDVM.Global;
import _VisualDVM.Passes.Server.ComponentsServerPass;
import _VisualDVM.Repository.Server.ServerCode;
import java.io.File;
import java.util.Vector;
public class GetComponentsBackupsFromServer extends ComponentsServerPass<Vector<File>> {
@Override
protected boolean isSafe() {
return false;
}
@Override
protected boolean canStart(Object... args) throws Exception {
target = new Vector<>();
return Global.components.getUI().CheckCurrent(Log)&&
SendRequest(ServerCode.GetComponentsBackups,
Global.components.getUI().getCurrent().getComponentType().toString());
}
@Override
protected void body() throws Exception {
target = (Vector<File>) request.server_response.object;
}
@Override
protected boolean validate() {
if (target.isEmpty()) {
Log.Writeln_("Не найдено резервных копий на сервере для компонента "
+ Global.components.getUI().getCurrent().getComponentType().getDescription());
return false;
}
return true;
}
}