рефакторинг публикации компонентов

This commit is contained in:
2025-02-03 23:04:40 +03:00
parent 458e250b5c
commit 26434b21ab
11 changed files with 192 additions and 85 deletions

View File

@@ -21,7 +21,6 @@ public abstract class Component extends DBObject implements Loggable {
//--
public String code = "";
public String actual_code = "";
public boolean needs_update_minimal_version = false;
VFileChooser fileChooser = null; ///для ручной установки.
private ComponentState state;
public abstract ComponentType getComponentType();

View File

@@ -0,0 +1,27 @@
package _VisualDVM.Repository.Component.Json;
import Common.Utils.Utils_;
import _VisualDVM.Repository.Component.Component;
import _VisualDVM.Repository.Component.ComponentType;
import com.google.gson.annotations.Expose;
import java.io.Serializable;
public class ComponentPublicationInfoJson implements Serializable {
@Expose
public ComponentType componentType = ComponentType.Undefined;
@Expose
public String fileName = "";
@Expose
public byte[] packedFile = null;
@Expose
public String versionText = "";
@Expose
public String changeRecord = "";
@Expose
public boolean needsUpdateMinimalVersion = false;
public ComponentPublicationInfoJson(Component component) throws Exception{
componentType = component.getComponentType();
fileName = component.getFileName();
packedFile = Utils_.fileToBytes(component.getFile());
versionText = component.getVersionText();
}
}