no message

This commit is contained in:
2024-10-14 12:14:01 +03:00
parent 3a29898d5f
commit 452c4c7268
466 changed files with 1255 additions and 1100 deletions

View File

@@ -0,0 +1,42 @@
package _VisualDVM.Passes.All;
import _VisualDVM.Global;
import _VisualDVM.Repository.Component.Component;
import _VisualDVM.Repository.Component.ComponentType;
import _VisualDVM.Repository.Server.ServerCode;
import _VisualDVM.Repository.Server.ServerExchangeUnit_2021;
import _VisualDVM.Passes.Server.ComponentsRepositoryPass;
import java.util.LinkedHashMap;
import java.util.Vector;
public class GetComponentsActualVersions extends ComponentsRepositoryPass {
@Override
public String getIconPath() {
return "/icons/Components.png";
}
@Override
public String getButtonText() {
return "";
}
@Override
protected void ServerAction() throws Exception {
Vector<String> versions = new Vector<>();
for (Component component : Global.Components.Data.values())
if (component.isVisible())
versions.add(component.getComponentType().toString());
Command(new ServerExchangeUnit_2021(ServerCode.GetComponentsVersions, String.join("\n", versions)));
LinkedHashMap<ComponentType, String> response_actual_versions = (LinkedHashMap<ComponentType, String>) response.object;
for (ComponentType componentType : response_actual_versions.keySet()) {
Global.Components.get(componentType).unpackActualVersion(response_actual_versions.get(componentType));
}
//-- получить актуальные версии с сервера.
Command(new ServerExchangeUnit_2021(ServerCode.GetComponentsMinimalVersions, String.join("\n", versions)));
LinkedHashMap<ComponentType, String> response_minimal_versions = (LinkedHashMap<ComponentType, String>) response.object;
for (ComponentType componentType : response_minimal_versions.keySet()) {
Global.Components.get(componentType).unpackMinimalVersion(response_minimal_versions.get(componentType));
}
for (Component component : Global.Components.Data.values()) {
if (component.CanBeUpdated())
component.CheckIfNeedsUpdateOrPublish();
}
}
}