упорядочил папки с кодом.

This commit is contained in:
2023-11-19 01:53:56 +03:00
parent 4883b4af51
commit 44c6daffa3
596 changed files with 2140 additions and 1569 deletions

View File

@@ -0,0 +1,48 @@
package Common.Passes.All;
import Common.Current;
import Common.Global;
import Repository.ComponentsServer.Component.Component;
import Common.Passes.PassCode_2021;
import Common.Passes.PassException;
import Common.Passes.Pass_2021;
public class UpdateComponent extends Pass_2021<Component> {
@Override
protected PassCode_2021 necessary() {
return PassCode_2021.CreateComponentBackUp;
}
@Override
protected boolean resetsNecessary() {
return true;
}
@Override
protected void body() throws Exception {
PassCode_2021 subPass = PassCode_2021.Undefined;
//<editor-fold desc="получение нового файла компонента">
switch (Current.getComponent().getComponentType()) {
case Sapfor_F:
case Visualizer_2:
subPass = Global.isWindows ? PassCode_2021.DownloadComponent : PassCode_2021.BuildComponent;
break;
case Visualiser:
case Instruction:
case PerformanceAnalyzer:
subPass = PassCode_2021.DownloadComponent;
break;
}
if ((subPass != PassCode_2021.Undefined) && passes.get(subPass).Do()) {
//</editor-fold>
if (!Current.getComponent().getNewFile().exists())
throw new PassException("Не удалось получить новый файл для компонента " + Current.getComponent().getComponentType().getDescription());
//непосредственное обновление.
Current.getComponent().Update();
}
}
@Override
protected void performFinish() throws Exception {
Current.getComponent().CheckIfNeedsUpdateOrPublish();
}
@Override
protected void showDone() throws Exception {
Global.RefreshUpdatesStatus();
}
}