2026-03-17 13:31:18 -07:00

147 lines
4.4 KiB
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.sys.BIcon
* javax.baja.sys.Context
* javax.baja.sys.Property
* javax.baja.sys.Sys
* javax.baja.sys.Type
* javax.baja.xml.XElem
*/
package com.tridium.install.part;
import com.tridium.install.BDependency;
import com.tridium.install.BVersion;
import com.tridium.install.installable.BInstallable;
import com.tridium.install.part.BPart;
import javax.baja.sys.BIcon;
import javax.baja.sys.Context;
import javax.baja.sys.Property;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.xml.XElem;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BVmPart
extends BPart {
public static final Property unspecified = BVmPart.newProperty((int)1, (boolean)false, null);
public static final Type TYPE;
private static final BIcon icon;
static /* synthetic */ Class class$com$tridium$install$part$BVmPart;
public boolean getUnspecified() {
return this.getBoolean(unspecified);
}
public void setUnspecified(boolean bl) {
this.setBoolean(unspecified, bl, null);
}
public Type getType() {
return TYPE;
}
public boolean meets(BDependency bDependency) {
boolean bl = false;
if (bDependency.getPartType().is(TYPE) && this.getVersion().meets(bDependency) && this.matchesName(bDependency.getPartName())) {
bl = true;
}
return bl;
}
public static BPart make(XElem xElem) {
return BVmPart.make(xElem, null);
}
public static BPart make(XElem xElem, BInstallable bInstallable) {
if (xElem == null) {
return null;
}
if (xElem.name().equals("vm")) {
return new BVmPart(xElem.get("name", null), new BVersion(xElem.get("vendor", ""), BVmPart.getVendorVersion(xElem)), bInstallable);
}
return null;
}
public XElem getXml() {
XElem xElem = new XElem("vm");
xElem.setAttr("name", this.getPartName());
if (this.getVersion().getVendor().trim().length() > 0) {
xElem.setAttr("vendor", this.getVersion().getVendor());
}
if (this.getVersion().getBajaVersionString().trim().length() > 0) {
xElem.setAttr("bajaVersion", this.getVersion().getBajaVersionString());
}
if (this.getVersion().getVendorVersionString().trim().length() > 0) {
xElem.setAttr("version", this.getVersion().getVendorVersionString());
}
if (this.getDescription().trim().length() > 0) {
xElem.setAttr("description", this.getDescription());
}
return xElem;
}
public String toString(Context context) {
return "VM Part: " + this.getPartName() + ' ' + (Object)((Object)this.getVersion());
}
public BIcon getIcon() {
return icon;
}
public boolean isInstallable() {
return true;
}
public boolean isNull() {
return this.getPartName().equals("nullvm");
}
public static BVmPart makeNull() {
return new BVmPart("nullvm", BVersion.makeZero(), null);
}
static /* synthetic */ Class class(String string, boolean bl) {
try {
Class<?> clazz = Class.forName(string);
if (!bl) {
clazz = clazz.getComponentType();
}
return clazz;
}
catch (ClassNotFoundException classNotFoundException) {
throw new NoClassDefFoundError(classNotFoundException.getMessage());
}
}
public BVmPart() {
this.setPartName(this.getLexicon().getText("unspecifiedVm.vmName"));
this.setUnspecified(true);
}
public BVmPart(String string, BVersion bVersion, BInstallable bInstallable) {
this.setVersion(bVersion);
if (string == null || string.indexOf("Undetermined") != -1) {
this.setPartName(this.getLexicon().getText("unspecifiedVm.vmName"));
this.setUnspecified(true);
} else {
this.setPartName(string);
this.setUnspecified(false);
}
this.setInstallable(bInstallable);
}
static {
Class clazz = class$com$tridium$install$part$BVmPart;
if (clazz == null) {
clazz = class$com$tridium$install$part$BVmPart = BVmPart.class("[Lcom.tridium.install.part.BVmPart;", false);
}
TYPE = Sys.loadType((Class)clazz);
icon = BPart.getPartTypeIcon(TYPE);
}
}