no message
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
package Repository.Component;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import _VisualDVM.Global;
|
||||
@@ -14,9 +16,9 @@ import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
public abstract class Component extends DBObject implements Loggable {
|
||||
public String date_text = Constants.dateNaN;
|
||||
public long version = Constants.Nan;
|
||||
public long actual_version = Constants.Nan;
|
||||
public long minimal_version = Constants.Nan;
|
||||
public long version = CommonConstants.Nan;
|
||||
public long actual_version = CommonConstants.Nan;
|
||||
public long minimal_version = CommonConstants.Nan;
|
||||
//--
|
||||
public String code = "";
|
||||
public String actual_code = "";
|
||||
@@ -26,7 +28,7 @@ public abstract class Component extends DBObject implements Loggable {
|
||||
VFileChooser fileChooser = null; ///для ручной установки.
|
||||
public VFileChooser getFileChooser() {
|
||||
return (fileChooser == null) ? (fileChooser = new VFileChooser("выбор файла для компонента " +
|
||||
Utils.Brackets(getComponentType().getDescription()), Utils.getExtension(getFile())))
|
||||
CommonUtils.Brackets(getComponentType().getDescription()), CommonUtils.getExtension(getFile())))
|
||||
: fileChooser;
|
||||
}
|
||||
//--
|
||||
@@ -34,7 +36,7 @@ public abstract class Component extends DBObject implements Loggable {
|
||||
return String.valueOf(version);
|
||||
}
|
||||
public void CheckIfNeedsUpdateOrPublish() {
|
||||
if (actual_version != Constants.Nan) {
|
||||
if (actual_version != CommonConstants.Nan) {
|
||||
if (version < minimal_version) setState(ComponentState.Old_version);
|
||||
else {
|
||||
ComponentState new_state =
|
||||
@@ -48,7 +50,7 @@ public abstract class Component extends DBObject implements Loggable {
|
||||
setState(ComponentState.Undefined);
|
||||
if (getFile().exists()) {
|
||||
GetVersionInfo();
|
||||
if (version == Constants.Nan)
|
||||
if (version == CommonConstants.Nan)
|
||||
setState(ComponentState.Unknown_version);
|
||||
} else setState(ComponentState.Not_found);
|
||||
}
|
||||
@@ -84,8 +86,8 @@ public abstract class Component extends DBObject implements Loggable {
|
||||
return getComponentType();
|
||||
}
|
||||
public boolean isValidVersion(TextLog Log, String desc) {
|
||||
if (version == Constants.Nan) {
|
||||
Log.Writeln_("Не определена версия " + desc + " компонента " + Utils.Brackets(getComponentType().getDescription()));
|
||||
if (version == CommonConstants.Nan) {
|
||||
Log.Writeln_("Не определена версия " + desc + " компонента " + CommonUtils.Brackets(getComponentType().getDescription()));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user