link start!

This commit is contained in:
cherubin
2026-03-17 13:31:18 -07:00
commit 08abe87cfb
5910 changed files with 386288 additions and 0 deletions
@@ -0,0 +1,114 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.sys.Context
* 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.Context;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.xml.XElem;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BApplicationPart
extends BPart {
public static final Type TYPE;
static /* synthetic */ Class class$com$tridium$install$part$BApplicationPart;
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 BApplicationPart.make(xElem, null);
}
public static BPart make(XElem xElem, BInstallable bInstallable) {
if (xElem == null) {
return null;
}
if (xElem.name().equals("app")) {
System.out.println("make BApplicationPart: " + xElem.get("name") + ' ' + BApplicationPart.getVendorVersion(xElem));
return new BApplicationPart(xElem.get("name"), new BVersion("", BApplicationPart.getVendorVersion(xElem)), bInstallable);
}
return null;
}
public XElem getXml() {
XElem xElem = new XElem("app");
xElem.setAttr("name", this.getPartName());
if (this.getVersion().getVendor().trim().length() > 0) {
xElem.setAttr("vendor", this.getVersion().getVendor());
}
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 "App Part: " + this.getPartName() + ' ' + (Object)((Object)this.getVersion());
}
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 BApplicationPart() {
}
public BApplicationPart(String string, String string2) {
this.setPartName(string);
this.setVersion(new BVersion(string2));
}
public BApplicationPart(String string, BVersion bVersion) {
this.setPartName(string);
this.setVersion(bVersion);
}
public BApplicationPart(String string, BVersion bVersion, BInstallable bInstallable) {
this(string, bVersion);
this.setInstallable(bInstallable);
}
static {
Class clazz = class$com$tridium$install$part$BApplicationPart;
if (clazz == null) {
clazz = class$com$tridium$install$part$BApplicationPart = BApplicationPart.class("[Lcom.tridium.install.part.BApplicationPart;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
}
@@ -0,0 +1,106 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.sys.BIcon
* javax.baja.sys.Context
* 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.installable.BInstallable;
import com.tridium.install.part.BPart;
import javax.baja.sys.BIcon;
import javax.baja.sys.Context;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.xml.XElem;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BArchPart
extends BPart {
public static final Type TYPE;
private static final BIcon icon;
static /* synthetic */ Class class$com$tridium$install$part$BArchPart;
public Type getType() {
return TYPE;
}
public boolean meets(BDependency bDependency) {
boolean bl = false;
if (bDependency.getPartType().is(TYPE) && this.matchesName(bDependency.getPartName())) {
bl = true;
}
return bl;
}
public static BPart make(XElem xElem) {
return BArchPart.make(xElem, null);
}
public static BPart make(XElem xElem, BInstallable bInstallable) {
if (xElem == null) {
return null;
}
return new BArchPart(xElem.get("name"), bInstallable);
}
public XElem getXml() {
XElem xElem = new XElem("arch");
xElem.setAttr("name", this.getPartName());
return xElem;
}
public boolean isNull() {
return this.getPartName().equals("nullarch");
}
public static BArchPart makeNull() {
return new BArchPart("nullarch", null);
}
public String toString(Context context) {
return "Arch Part: " + this.getPartName();
}
public BIcon getIcon() {
return icon;
}
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 BArchPart() {
}
public BArchPart(String string, BInstallable bInstallable) {
this.setPartName(string);
this.setInstallable(bInstallable);
}
static {
Class clazz = class$com$tridium$install$part$BArchPart;
if (clazz == null) {
clazz = class$com$tridium$install$part$BArchPart = BArchPart.class("[Lcom.tridium.install.part.BArchPart;", false);
}
TYPE = Sys.loadType((Class)clazz);
icon = BPart.getPartTypeIcon(TYPE);
}
}
@@ -0,0 +1,118 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.sys.BIcon
* javax.baja.sys.Context
* 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.installable.BInstallable;
import com.tridium.install.part.BPart;
import javax.baja.sys.BIcon;
import javax.baja.sys.Context;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.xml.XElem;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BBrandPart
extends BPart {
public static final Type TYPE;
private static final BIcon icon;
public static final String NO_BRAND = "noBrand";
static /* synthetic */ Class class$com$tridium$install$part$BBrandPart;
public Type getType() {
return TYPE;
}
public boolean meets(BDependency bDependency) {
boolean bl = false;
if (bDependency.getPartType().is(TYPE) && (this.isNull() || this.matchesName(bDependency.getPartName()))) {
bl = true;
}
return bl;
}
public static BPart make(XElem xElem) {
return BBrandPart.make(xElem, null);
}
public static BPart make(XElem xElem, BInstallable bInstallable) {
if (xElem == null) {
return null;
}
if (xElem.name().equals("brand")) {
String string = xElem.get("name", NO_BRAND);
if (string.trim().length() == 0) {
string = NO_BRAND;
}
return new BBrandPart(string, bInstallable);
}
return null;
}
public XElem getXml() {
XElem xElem = new XElem("brand");
xElem.setAttr("name", this.getPartName());
return xElem;
}
public String toString(Context context) {
return "Brand Part: " + this.getPartName();
}
public boolean isNull() {
boolean bl = false;
if (this.getPartName().equals(NO_BRAND) || this.getPartName().equals("disabled") || this.getPartName().equals("nullos")) {
bl = true;
}
return bl;
}
public static BBrandPart makeNull() {
return new BBrandPart(NO_BRAND, null);
}
public BIcon getIcon() {
return icon;
}
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 BBrandPart() {
}
public BBrandPart(String string, BInstallable bInstallable) {
this.setPartName(string);
this.setInstallable(bInstallable);
}
static {
Class clazz = class$com$tridium$install$part$BBrandPart;
if (clazz == null) {
clazz = class$com$tridium$install$part$BBrandPart = BBrandPart.class("[Lcom.tridium.install.part.BBrandPart;", false);
}
TYPE = Sys.loadType((Class)clazz);
icon = BPart.getPartTypeIcon(TYPE);
}
}
@@ -0,0 +1,106 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.sys.BIcon
* javax.baja.sys.Context
* 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.Sys;
import javax.baja.sys.Type;
import javax.baja.xml.XElem;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BGenericPart
extends BPart {
public static final Type TYPE;
private static final BIcon icon;
static /* synthetic */ Class class$com$tridium$install$part$BGenericPart;
public Type getType() {
return TYPE;
}
public static BPart make(XElem xElem) {
return BGenericPart.make(xElem, null);
}
public static BPart make(XElem xElem, BInstallable bInstallable) {
if (xElem == null) {
return null;
}
if (xElem.name().equals("part")) {
return new BGenericPart(xElem.get("name"), xElem.get("description", ""), bInstallable, new BVersion(BGenericPart.getVendorVersion(xElem)));
}
return null;
}
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 String toString(Context context) {
return "Part: " + this.getPartName();
}
public BIcon getIcon() {
return icon;
}
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 BGenericPart() {
}
public BGenericPart(String string, String string2) {
this(string, string2, null, BVersion.makeZero());
}
public BGenericPart(String string, String string2, BInstallable bInstallable) {
this(string, string2, bInstallable, BVersion.makeZero());
}
public BGenericPart(String string, String string2, BInstallable bInstallable, BVersion bVersion) {
this.setPartName(string);
this.setDescription(string2);
this.setInstallable(bInstallable);
this.setVersion(bVersion);
}
static {
Class clazz = class$com$tridium$install$part$BGenericPart;
if (clazz == null) {
clazz = class$com$tridium$install$part$BGenericPart = BGenericPart.class("[Lcom.tridium.install.part.BGenericPart;", false);
}
TYPE = Sys.loadType((Class)clazz);
icon = BPart.getPartTypeIcon(TYPE);
}
}
@@ -0,0 +1,104 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.sys.BIcon
* javax.baja.sys.Context
* 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.installable.BInstallable;
import com.tridium.install.part.BGenericPart;
import com.tridium.install.part.BPart;
import javax.baja.sys.BIcon;
import javax.baja.sys.Context;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.xml.XElem;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BModelPart
extends BPart {
public static final Type TYPE;
private static final BIcon icon;
static /* synthetic */ Class class$com$tridium$install$part$BModelPart;
public Type getType() {
return TYPE;
}
public boolean meets(BDependency bDependency) {
boolean bl = false;
if (!this.isNull() && (bDependency.getPartType().is(TYPE) || bDependency.getPartType().is(BGenericPart.TYPE)) && this.matchesName(bDependency.getPartName())) {
bl = true;
}
return bl;
}
public static BPart make(XElem xElem) {
return BModelPart.make(xElem, null);
}
public static BPart make(XElem xElem, BInstallable bInstallable) {
if (xElem == null) {
return null;
}
if (xElem.name().equals("model")) {
return new BModelPart(xElem.get("name"), bInstallable);
}
return null;
}
public String toString(Context context) {
return "Model Part: " + this.getPartName();
}
public boolean isNull() {
return this.getPartName().equals("");
}
public static BModelPart makeNull() {
return new BModelPart("", null);
}
public BIcon getIcon() {
return icon;
}
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 BModelPart() {
}
public BModelPart(String string, BInstallable bInstallable) {
this.setPartName(string);
this.setInstallable(bInstallable);
}
static {
Class clazz = class$com$tridium$install$part$BModelPart;
if (clazz == null) {
clazz = class$com$tridium$install$part$BModelPart = BModelPart.class("[Lcom.tridium.install.part.BModelPart;", false);
}
TYPE = Sys.loadType((Class)clazz);
icon = BPart.getPartTypeIcon(TYPE);
}
}
@@ -0,0 +1,747 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.sys.registry.NModuleInfo
* javax.baja.file.BFileSystem
* javax.baja.file.BIFile
* javax.baja.file.FilePath
* javax.baja.file.FileUtil
* javax.baja.naming.SlotPath
* javax.baja.sys.BAbsTime
* javax.baja.sys.BIcon
* javax.baja.sys.BValue
* javax.baja.sys.BVector
* javax.baja.sys.BajaRuntimeException
* javax.baja.sys.Context
* javax.baja.sys.LocalizableRuntimeException
* 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.BDaemonPlatform;
import com.tridium.install.BDependency;
import com.tridium.install.BRemoteDaemonPlatform;
import com.tridium.install.BVersion;
import com.tridium.install.ClassCondenser;
import com.tridium.install.installable.BInstallable;
import com.tridium.install.installable.BModuleInstallable;
import com.tridium.install.installable.ModuleManifest;
import com.tridium.install.part.BModuleStatus;
import com.tridium.install.part.BPart;
import com.tridium.platform.daemon.BDaemonSession;
import com.tridium.platform.daemon.BModuleContent;
import com.tridium.platform.daemon.DaemonFileUtil;
import com.tridium.platform.daemon.message.FileTransferMessageElement;
import com.tridium.sys.registry.NModuleInfo;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashSet;
import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
import javax.baja.file.BFileSystem;
import javax.baja.file.BIFile;
import javax.baja.file.FilePath;
import javax.baja.file.FileUtil;
import javax.baja.naming.SlotPath;
import javax.baja.platform.install.BVersionRelation;
import javax.baja.sys.BAbsTime;
import javax.baja.sys.BIcon;
import javax.baja.sys.BValue;
import javax.baja.sys.BVector;
import javax.baja.sys.BajaRuntimeException;
import javax.baja.sys.Context;
import javax.baja.sys.LocalizableRuntimeException;
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 BModulePart
extends BPart {
public static final Property status = BModulePart.newProperty((int)1, (BValue)BModuleStatus.ok, null);
public static final Property buildDate = BModulePart.newProperty((int)1, (String)"", null);
public static final Property buildAbsTime = BModulePart.newProperty((int)1, (BValue)BAbsTime.NULL, null);
public static final Property buildHost = BModulePart.newProperty((int)1, (String)"", null);
public static final Property archiveDate = BModulePart.newProperty((int)1, (String)"", null);
public static final Property archiveHost = BModulePart.newProperty((int)1, (String)"", null);
public static final Property archiveContent = BModulePart.newProperty((int)1, (BValue)BModuleContent.doc, null);
public static final Property preferredSymbol = BModulePart.newProperty((int)1, (String)"", null);
public static final Property fileSize = BModulePart.newProperty((int)1, (int)-1, null);
public static final Property synthetic = BModulePart.newProperty((int)1, (boolean)false, null);
public static final Property exclusions = BModulePart.newProperty((int)1, (BValue)new BVector(), null);
public static final Property isNre = BModulePart.newProperty((int)1, (boolean)true, null);
public static final Property isInstallable = BModulePart.newProperty((int)1, (boolean)true, null);
public static final Type TYPE;
public static final FilePath MODULES_PATH;
public static final FilePath LIB_PATH;
private static final BIcon icon;
private BIFile file;
private boolean localInstance;
private boolean summaryInitialized;
private boolean dependsInitialized;
private ModuleManifest manifest;
static /* synthetic */ Class class$com$tridium$install$part$BModulePart;
public BModuleStatus getStatus() {
return (BModuleStatus)this.get(status);
}
public void setStatus(BModuleStatus bModuleStatus) {
this.set(status, (BValue)bModuleStatus, null);
}
public String getBuildDate() {
return this.getString(buildDate);
}
public void setBuildDate(String string) {
this.setString(buildDate, string, null);
}
public BAbsTime getBuildAbsTime() {
return (BAbsTime)this.get(buildAbsTime);
}
public void setBuildAbsTime(BAbsTime bAbsTime) {
this.set(buildAbsTime, (BValue)bAbsTime, null);
}
public String getBuildHost() {
return this.getString(buildHost);
}
public void setBuildHost(String string) {
this.setString(buildHost, string, null);
}
public String getArchiveDate() {
return this.getString(archiveDate);
}
public void setArchiveDate(String string) {
this.setString(archiveDate, string, null);
}
public String getArchiveHost() {
return this.getString(archiveHost);
}
public void setArchiveHost(String string) {
this.setString(archiveHost, string, null);
}
public BModuleContent getArchiveContent() {
return (BModuleContent)this.get(archiveContent);
}
public void setArchiveContent(BModuleContent bModuleContent) {
this.set(archiveContent, (BValue)bModuleContent, null);
}
public String getPreferredSymbol() {
return this.getString(preferredSymbol);
}
public void setPreferredSymbol(String string) {
this.setString(preferredSymbol, string, null);
}
public long getFileSize() {
return this.getLong(fileSize);
}
public void setFileSize(long l) {
this.setLong(fileSize, l, null);
}
public boolean getSynthetic() {
return this.getBoolean(synthetic);
}
public void setSynthetic(boolean bl) {
this.setBoolean(synthetic, bl, null);
}
public BVector getExclusions() {
return (BVector)this.get(exclusions);
}
public void setExclusions(BVector bVector) {
this.set(exclusions, (BValue)bVector, null);
}
public boolean getIsNre() {
return this.getBoolean(isNre);
}
public void setIsNre(boolean bl) {
this.setBoolean(isNre, bl, null);
}
public boolean getIsInstallable() {
return this.getBoolean(isInstallable);
}
public void setIsInstallable(boolean bl) {
this.setBoolean(isInstallable, bl, null);
}
public Type getType() {
return TYPE;
}
public static BModulePart make(BIFile bIFile) {
BModuleInstallable bModuleInstallable = BModuleInstallable.make(bIFile, true);
return bModuleInstallable == null ? null : bModuleInstallable.getModulePart();
}
public static BModulePart make(BIFile bIFile, boolean bl) {
BModuleInstallable bModuleInstallable = BModuleInstallable.make(bIFile, bl);
return bModuleInstallable == null ? null : bModuleInstallable.getModulePart();
}
public static BModulePart make(String string, XElem xElem) {
if (string == null) {
return null;
}
BModulePart bModulePart = new BModulePart();
bModulePart.setPartName(string);
if (xElem == null) {
bModulePart.setStatus(BModuleStatus.nomanifest);
} else {
bModulePart.loadManifest(xElem);
}
return bModulePart;
}
public static BModulePart make(BIFile bIFile, BInstallable bInstallable) {
try {
InputStream inputStream = DaemonFileUtil.getZipStream(bIFile, new FilePath("META-INF/module.xml"));
if (inputStream == null) {
inputStream = DaemonFileUtil.getZipStream(bIFile, new FilePath("meta-inf/module.xml"));
}
if (inputStream == null) {
inputStream = DaemonFileUtil.getZipStream(bIFile, new FilePath("META-INF/module.xml"));
}
if (inputStream == null) {
return null;
}
return new BModulePart(bIFile, inputStream, bInstallable);
}
catch (IOException iOException) {
throw new LocalizableRuntimeException("platform", "ModulePart.exception.manifestRead", new Object[]{bIFile.getFilePath()}, (Throwable)iOException);
}
}
public boolean meets(BDependency bDependency) {
this.initSummary();
boolean bl = false;
if (bDependency.getPartType().is(TYPE) && this.getVersion().meets(bDependency) && this.matchesName(bDependency.getPartName())) {
bl = true;
}
return bl;
}
public boolean isInstallable() {
return true;
}
public BVector getDependencies() {
if (!this.dependsInitialized) {
this.init();
}
return super.getDependencies();
}
public void initSummary() {
if (!this.summaryInitialized) {
this.init();
}
}
public void init() {
if (this.manifest != null || !this.localInstance || !this.getInstallable().getIsValid()) {
return;
}
if (this.file != null) {
try {
InputStream inputStream = DaemonFileUtil.getZipStream(this.file, new FilePath("META-INF/module.xml"));
if (inputStream == null) {
inputStream = DaemonFileUtil.getZipStream(this.file, new FilePath("meta-inf/module.xml"));
}
if (inputStream == null) {
inputStream = DaemonFileUtil.getZipStream(this.file, new FilePath("META-INF/module.xml"));
}
this.loadManifest(inputStream);
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new BajaRuntimeException((Throwable)exception);
}
}
}
public BDependency getDependency(String string) {
return (BDependency)this.getDependencies().get(SlotPath.escape((String)string));
}
public FilePath getDestinationPath() {
if (!this.getSynthetic()) {
return MODULES_PATH.merge(this.getPartName() + ".jar");
}
return MODULES_PATH.merge(this.getPartName() + ".sjar");
}
public BIcon getIcon() {
return icon;
}
public InputStream getInputStream() {
if (!this.localInstance) {
throw new IllegalStateException("illegal call on proxy instance of BModulePart");
}
try {
return this.file.getInputStream();
}
catch (IOException iOException) {
throw new LocalizableRuntimeException("platform", "LocalModulePart.exception.notFound", new Object[]{this.file.getFilePath()}, (Throwable)iOException);
}
}
public ModuleManifest getManifest() {
if (!this.localInstance) {
throw new IllegalStateException("illegal call on proxy instance of BModulePart");
}
this.init();
return this.manifest;
}
public BVersion getVersionRequired(String string) {
BDependency bDependency = this.getDependency(string);
return bDependency == null ? BVersion.ZERO : bDependency.getVersion();
}
public Set getRequiredModuleNames() {
Property[] propertyArray = this.getDependencies().getPropertiesArray();
HashSet<String> hashSet = new HashSet<String>();
int n = 0;
while (n < propertyArray.length) {
hashSet.add(propertyArray[n].getName());
++n;
}
return hashSet;
}
public boolean isUpgradeFor(BModulePart bModulePart) {
this.initSummary();
if (bModulePart.getVersion().meetsVersionRequirement(this.getVersion(), BVersionRelation.minimum)) {
return bModulePart.getBuildAbsTime() != null && this.getBuildAbsTime() != null && this.getBuildAbsTime().compareTo((Object)bModulePart.getBuildAbsTime()) > 0;
}
return true;
}
public boolean isUpdateFor(BModulePart bModulePart) {
return this.isUpdateFor(bModulePart, null);
}
public boolean isUpdateFor(BModulePart bModulePart, BDaemonPlatform bDaemonPlatform) {
this.initSummary();
if (bDaemonPlatform != null && bDaemonPlatform.getModuleContent() != bModulePart.getArchiveContent()) {
return true;
}
if (bModulePart.getVersion().equivalent((Object)this.getVersion())) {
return bModulePart.getBuildAbsTime() == null || this.getBuildAbsTime() == null || !this.getBuildAbsTime().equals((Object)bModulePart.getBuildAbsTime());
}
return true;
}
public String toString(Context context) {
return "Module: " + this.getPartName() + ' ' + (Object)((Object)this.getVersion());
}
public void writePackageArchive(BDaemonPlatform bDaemonPlatform, ZipOutputStream zipOutputStream) throws Exception {
this.writePackageArchive(bDaemonPlatform.getModuleContent(), bDaemonPlatform.getStripLineNumbers(), zipOutputStream);
}
public void writePackageArchive(BModuleContent bModuleContent, boolean bl, ZipOutputStream zipOutputStream) throws Exception {
if (!this.localInstance) {
throw new IllegalStateException("illegal call on proxy instance of BModulePart");
}
this.init();
try {
ZipEntry zipEntry;
ZipInputStream zipInputStream = new ZipInputStream(this.getInputStream());
ClassCondenser classCondenser = new ClassCondenser();
while ((zipEntry = zipInputStream.getNextEntry()) != null) {
Object object;
if (zipEntry.getName().equalsIgnoreCase("meta-inf/module.xml")) {
object = new ByteArrayOutputStream();
this.getManifest().write(bModuleContent, (OutputStream)object);
ZipEntry zipEntry2 = new ZipEntry(zipEntry.getName());
zipEntry2.setSize(((ByteArrayOutputStream)object).size());
zipEntry2.setTime(System.currentTimeMillis());
zipOutputStream.putNextEntry(zipEntry2);
zipOutputStream.write(((ByteArrayOutputStream)object).toByteArray(), 0, ((ByteArrayOutputStream)object).size());
zipOutputStream.closeEntry();
continue;
}
if (!this.getManifest().includePath(this.getDirectoryName(zipEntry), bModuleContent)) continue;
if (bl && zipEntry.getName().endsWith(".class")) {
zipOutputStream.putNextEntry(new ZipEntry(zipEntry.getName()));
classCondenser.condense(zipInputStream, zipOutputStream, false);
} else {
zipOutputStream.putNextEntry(new ZipEntry(zipEntry));
object = new byte[65000];
int n = zipInputStream.read((byte[])object);
while (n >= 0) {
zipOutputStream.write((byte[])object, 0, n);
n = zipInputStream.read((byte[])object);
}
}
zipOutputStream.closeEntry();
}
zipInputStream.close();
}
catch (IOException iOException) {
throw new LocalizableRuntimeException("platform", "ModulePart.exception.writePackageArchive", new Object[]{this.getPartName()}, (Throwable)iOException);
}
}
private final void loadManifest(XElem xElem) {
this.loadManifest(ModuleManifest.make(xElem));
}
private final void loadManifest(InputStream inputStream) {
this.loadManifest(inputStream, true);
}
private final void loadManifest(InputStream inputStream, boolean bl) {
this.loadManifest(ModuleManifest.make(inputStream, bl));
}
private final void loadManifest(ModuleManifest moduleManifest) {
this.manifest = moduleManifest;
this.setStatus(moduleManifest.getStatus());
if (!this.summaryInitialized) {
this.setPartName(moduleManifest.getName());
this.setBuildAbsTime(moduleManifest.getBuildAbsTime());
this.setVersion((BVersion)moduleManifest.getVersion().newCopy());
this.setDescription(moduleManifest.getDescription());
this.setArchiveContent(moduleManifest.getModuleContent());
this.summaryInitialized = true;
}
if (!this.dependsInitialized) {
BVector bVector = (BVector)this.get(dependencies);
bVector.removeAll();
BDependency[] bDependencyArray = moduleManifest.getDependencies();
int n = 0;
while (n < bDependencyArray.length) {
bVector.add(SlotPath.escape((String)bDependencyArray[n].getPartName()), bDependencyArray[n].newCopy());
++n;
}
BDependency[] bDependencyArray2 = moduleManifest.getExclusions();
bVector = (BVector)this.get(exclusions);
bVector.removeAll();
int n2 = 0;
while (n2 < bDependencyArray2.length) {
bVector.add("excl?", (BValue)bDependencyArray2[n2]);
++n2;
}
this.dependsInitialized = true;
}
this.setBuildDate(moduleManifest.getBuildDate());
this.setBuildHost(moduleManifest.getBuildHost());
this.setArchiveDate(moduleManifest.getArchiveDate());
this.setArchiveHost(moduleManifest.getArchiveHost());
this.setPreferredSymbol(moduleManifest.getPreferredSymbol());
this.setIsNre(moduleManifest.isNreModule());
this.setIsInstallable(moduleManifest.isInstallable());
}
private final String getDirectoryName(ZipEntry zipEntry) {
if (!this.localInstance) {
throw new IllegalStateException("illegal call on proxy instance of BModulePart");
}
if (zipEntry.isDirectory()) {
return zipEntry.getName();
}
int n = zipEntry.getName().lastIndexOf(47);
if (n < 0) {
return "";
}
return zipEntry.getName().substring(0, n);
}
public long getFilteredFileSize(BDaemonPlatform bDaemonPlatform) {
return this.getFilteredFileSize(bDaemonPlatform.getModuleContent(), bDaemonPlatform.getStripLineNumbers());
}
public long getFilteredFileSize(BModuleContent bModuleContent, boolean bl) {
if (this.localInstance && bModuleContent != BModuleContent.doc) {
try {
ByteCounter byteCounter = new ByteCounter();
ZipOutputStream zipOutputStream = new ZipOutputStream(byteCounter);
this.writePackageArchive(bModuleContent, bl, zipOutputStream);
zipOutputStream.closeEntry();
zipOutputStream.flush();
zipOutputStream.close();
byteCounter.flush();
byteCounter.close();
return byteCounter.size();
}
catch (Exception exception) {
exception.printStackTrace();
}
}
return this.getInstallable().getInstallableFileSize();
}
public boolean canMakeTransferElements() {
return this.localInstance;
}
public FileTransferMessageElement makeTransferElement(BDaemonPlatform bDaemonPlatform) {
if (!this.localInstance) {
throw new IllegalStateException("illegal call on proxy instance of BModuleInstallable");
}
return new ModuleFileTransferElement(this, bDaemonPlatform.getDaemonSession());
}
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());
}
}
private final /* synthetic */ void this() {
this.file = null;
this.localInstance = false;
this.summaryInitialized = false;
this.dependsInitialized = false;
this.manifest = null;
}
public BModulePart() {
this.this();
}
public BModulePart(BIFile bIFile, NModuleInfo nModuleInfo, BInstallable bInstallable) {
this.this();
this.file = bIFile;
this.localInstance = true;
this.setInstallable(bInstallable);
this.setStatus(BModuleStatus.ok);
this.setFileSize(bIFile.getSize());
this.setPartName(nModuleInfo.getModuleName());
this.setBuildAbsTime(BAbsTime.make((long)nModuleInfo.getBuildTime()));
this.getVersion().setVendor(nModuleInfo.getVendor());
this.getVersion().setVendorVersion(nModuleInfo.getVendorVersion());
this.setDescription(nModuleInfo.getDescription());
this.setArchiveContent(BModuleContent.make(nModuleInfo.getModuleContent()));
this.setSynthetic(bIFile.getExtension().equals("sjar"));
this.summaryInitialized = true;
}
public BModulePart(BIFile bIFile, InputStream inputStream, BInstallable bInstallable) {
this(bIFile, inputStream, bInstallable, true);
}
public BModulePart(BIFile bIFile, InputStream inputStream, BInstallable bInstallable, boolean bl) {
this.this();
this.file = bIFile;
this.localInstance = true;
this.setInstallable(bInstallable);
if (inputStream == null) {
this.setStatus(BModuleStatus.nomanifest);
if (bInstallable != null) {
bInstallable.setIsValid(false);
}
} else {
this.setStatus(BModuleStatus.ok);
}
this.setFileSize(bIFile.getSize());
if (bIFile.getExtension().equals("jar")) {
this.setPartName(bIFile.getFileName().substring(0, bIFile.getFileName().length() - 4));
} else if (bIFile.getExtension().equals("sjar")) {
this.setPartName(bIFile.getFileName().substring(0, bIFile.getFileName().length() - 5));
this.setSynthetic(true);
}
if (inputStream != null) {
this.loadManifest(inputStream, bl);
}
}
static {
Class clazz = class$com$tridium$install$part$BModulePart;
if (clazz == null) {
clazz = class$com$tridium$install$part$BModulePart = BModulePart.class("[Lcom.tridium.install.part.BModulePart;", false);
}
TYPE = Sys.loadType((Class)clazz);
MODULES_PATH = new FilePath("!modules");
LIB_PATH = new FilePath("!lib");
icon = BPart.getPartTypeIcon(TYPE);
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
private class ByteCounter
extends OutputStream {
private long size;
public void write(byte[] byArray) throws IOException {
this.size += (long)byArray.length;
}
public void write(byte[] byArray, int n, int n2) {
this.size += (long)n2;
}
public void write(int n) {
++this.size;
}
public long size() {
return this.size;
}
private final /* synthetic */ void this() {
this.size = 0L;
}
private ByteCounter() {
this.this();
}
}
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
private static class ModuleFileTransferElement
extends FileTransferMessageElement {
private static final BIcon icon = BIcon.std((String)"module.png");
private BModulePart sourceModule;
private BDaemonSession session;
private byte[] buf;
public InputStream getStream() throws IOException {
try {
if (this.modifyContents()) {
byte[] byArray = this.getModifiedBuf();
if ("true".equals(System.getProperty("niagara.install.copyProcessedModule", "false"))) {
BIFile bIFile = BFileSystem.INSTANCE.makeFile(new FilePath("!moduleCopies/" + this.sourceModule.getDestinationPath().getName()));
FileUtil.pipe((InputStream)new ByteArrayInputStream(byArray), (OutputStream)bIFile.getOutputStream());
}
return new ByteArrayInputStream(byArray);
}
return this.sourceModule.getInputStream();
}
catch (Exception exception) {
throw new LocalizableRuntimeException("platform", "ModuleFileTransferElement.exception.read", (Throwable)exception);
}
}
public long getSize() {
if (this.modifyContents()) {
return this.getModifiedBuf().length;
}
return this.sourceModule.getFileSize();
}
private final BDaemonPlatform getDaemonPlatform() {
try {
return BRemoteDaemonPlatform.make(this.session, null);
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new BajaRuntimeException((Throwable)exception);
}
}
private final boolean modifyContents() {
boolean bl = false;
if (this.getDaemonPlatform().getModuleContent() != BModuleContent.doc) {
bl = true;
}
return bl;
}
/*
* WARNING - Removed back jump from a try to a catch block - possible behaviour change.
* Enabled aggressive block sorting
* Enabled unnecessary exception pruning
* Enabled aggressive exception aggregation
*/
private final byte[] getModifiedBuf() {
if (this.buf != null) return this.buf;
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
ZipOutputStream zipOutputStream = new ZipOutputStream(byteArrayOutputStream);
try {
try {
this.sourceModule.writePackageArchive(this.getDaemonPlatform(), zipOutputStream);
}
catch (Exception exception) {}
}
catch (Throwable throwable) {
Object var4_4 = null;
try {
zipOutputStream.closeEntry();
zipOutputStream.flush();
zipOutputStream.close();
throw throwable;
}
catch (Exception exception) {}
throw throwable;
}
{
Object var4_5 = null;
}
try {}
catch (Exception exception) {}
zipOutputStream.closeEntry();
zipOutputStream.flush();
zipOutputStream.close();
this.buf = byteArrayOutputStream.toByteArray();
return this.buf;
}
public BIcon getIcon() {
return icon;
}
private final /* synthetic */ void this() {
this.buf = null;
}
public ModuleFileTransferElement(BModulePart bModulePart, BDaemonSession bDaemonSession) {
super(bModulePart.getDestinationPath(), bDaemonSession.getFileSpace());
this.this();
this.sourceModule = bModulePart;
this.session = bDaemonSession;
}
}
}
@@ -0,0 +1,70 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.sys.BFrozenEnum
* javax.baja.sys.Sys
* javax.baja.sys.Type
*/
package com.tridium.install.part;
import javax.baja.sys.BFrozenEnum;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public final class BModuleStatus
extends BFrozenEnum {
public static final int OK = 0;
public static final int CORRUPT = 1;
public static final int NOMANIFEST = 2;
public static final int MISNAMED = 3;
public static final BModuleStatus ok = new BModuleStatus(0);
public static final BModuleStatus corrupt = new BModuleStatus(1);
public static final BModuleStatus nomanifest = new BModuleStatus(2);
public static final BModuleStatus misnamed = new BModuleStatus(3);
public static final Type TYPE;
public static final BModuleStatus DEFAULT;
static /* synthetic */ Class class$com$tridium$install$part$BModuleStatus;
public final Type getType() {
return TYPE;
}
public static final BModuleStatus make(int n) {
return (BModuleStatus)ok.getRange().get(n, false);
}
public static final BModuleStatus make(String string) {
return (BModuleStatus)ok.getRange().get(string);
}
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());
}
}
private BModuleStatus(int n) {
super(n);
}
static {
Class clazz = class$com$tridium$install$part$BModuleStatus;
if (clazz == null) {
clazz = class$com$tridium$install$part$BModuleStatus = BModuleStatus.class("[Lcom.tridium.install.part.BModuleStatus;", false);
}
TYPE = Sys.loadType((Class)clazz);
DEFAULT = ok;
}
}
@@ -0,0 +1,128 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.sys.BIcon
* javax.baja.sys.Context
* 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.Sys;
import javax.baja.sys.Type;
import javax.baja.xml.XElem;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BNrePart
extends BPart {
public static final Type TYPE;
private static final BIcon icon;
static /* synthetic */ Class class$com$tridium$install$part$BNrePart;
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 BNrePart.make(xElem, null);
}
public static BPart make(XElem xElem, BInstallable bInstallable) {
if (xElem == null) {
return null;
}
if (xElem.name().equals("nre")) {
return new BNrePart(xElem.get("name", ""), xElem.get("description", ""), new BVersion(xElem.get("bajaVersion", ""), BNrePart.getVendorVersion(xElem)), bInstallable);
}
return null;
}
public XElem getXml() {
XElem xElem = new XElem("nre");
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 "Nre Part: " + this.getPartName() + ' ' + (Object)((Object)this.getVersion());
}
public boolean isInstallable() {
return true;
}
public boolean isNull() {
return this.getPartName().equals("nullnre");
}
public static BNrePart makeNull() {
return new BNrePart("nullnre", "", BVersion.makeZero(), null);
}
public BIcon getIcon() {
return icon;
}
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 BNrePart() {
}
public BNrePart(String string, String string2, BVersion bVersion, BInstallable bInstallable) {
this.setPartName(string);
this.setDescription(string2);
this.setVersion(bVersion);
this.setInstallable(bInstallable);
}
static {
Class clazz = class$com$tridium$install$part$BNrePart;
if (clazz == null) {
clazz = class$com$tridium$install$part$BNrePart = BNrePart.class("[Lcom.tridium.install.part.BNrePart;", false);
}
TYPE = Sys.loadType((Class)clazz);
icon = BPart.getPartTypeIcon(TYPE);
}
}
@@ -0,0 +1,142 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.sys.BIcon
* javax.baja.sys.Context
* 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.Sys;
import javax.baja.sys.Type;
import javax.baja.xml.XElem;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BOsPart
extends BPart {
public static final Type TYPE;
private static final BIcon icon;
boolean isInstallable;
static /* synthetic */ Class class$com$tridium$install$part$BOsPart;
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 BOsPart.make(xElem, null);
}
public static BPart make(XElem xElem, BInstallable bInstallable) {
if (xElem == null) {
return null;
}
if (xElem.name().equals("os")) {
String string = xElem.get("name");
boolean bl = string.startsWith("qnx");
return new BOsPart(string, xElem.get("description", ""), new BVersion("", BOsPart.getVendorVersion(xElem)), bInstallable, xElem.getb("installable", bl));
}
return null;
}
public XElem getXml() {
XElem xElem = new XElem("os");
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 "OS Part: " + this.getPartName() + ' ' + (Object)((Object)this.getVersion());
}
public boolean isNull() {
return this.getPartName().equals("nullos");
}
public boolean isInstallable() {
return this.isInstallable;
}
public boolean allowGlobalFileAccess() {
return this.getPartName().startsWith("qnx");
}
public static BOsPart makeNull() {
return new BOsPart("nullos", "", BVersion.makeZero(), null, false);
}
public BIcon getIcon() {
return icon;
}
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());
}
}
private final /* synthetic */ void this() {
this.isInstallable = false;
}
public BOsPart() {
this.this();
}
public BOsPart(String string, String string2, BVersion bVersion, BInstallable bInstallable, boolean bl) {
this.this();
this.setPartName(string);
this.setDescription(string2);
this.setVersion(bVersion);
this.setInstallable(bInstallable);
this.isInstallable = bl;
}
static {
Class clazz = class$com$tridium$install$part$BOsPart;
if (clazz == null) {
clazz = class$com$tridium$install$part$BOsPart = BOsPart.class("[Lcom.tridium.install.part.BOsPart;", false);
}
TYPE = Sys.loadType((Class)clazz);
icon = BPart.getPartTypeIcon(TYPE);
}
}
@@ -0,0 +1,341 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.sys.BComplex
* javax.baja.sys.BComponent
* javax.baja.sys.BIcon
* javax.baja.sys.BValue
* javax.baja.sys.BVector
* javax.baja.sys.Property
* javax.baja.sys.Sys
* javax.baja.sys.Type
* javax.baja.util.BTypeSpec
* javax.baja.util.Lexicon
* javax.baja.util.PatternFilter
* javax.baja.util.Version
* javax.baja.xml.XElem
*/
package com.tridium.install.part;
import com.tridium.install.BDependency;
import com.tridium.install.BVersion;
import com.tridium.install.PartSpec;
import com.tridium.install.installable.BInstallable;
import com.tridium.install.part.BApplicationPart;
import com.tridium.install.part.BArchPart;
import com.tridium.install.part.BBrandPart;
import com.tridium.install.part.BGenericPart;
import com.tridium.install.part.BModelPart;
import com.tridium.install.part.BModulePart;
import com.tridium.install.part.BNrePart;
import com.tridium.install.part.BOsPart;
import com.tridium.install.part.BVmPart;
import javax.baja.platform.install.BPlatformPartType;
import javax.baja.platform.install.PlatformPart;
import javax.baja.sys.BComplex;
import javax.baja.sys.BComponent;
import javax.baja.sys.BIcon;
import javax.baja.sys.BValue;
import javax.baja.sys.BVector;
import javax.baja.sys.Property;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.util.BTypeSpec;
import javax.baja.util.Lexicon;
import javax.baja.util.PatternFilter;
import javax.baja.util.Version;
import javax.baja.xml.XElem;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public abstract class BPart
extends BComponent {
public static final Property dependencies = BPart.newProperty((int)1, (BValue)new BVector(), null);
public static final Property partName = BPart.newProperty((int)1, (String)"unknown", null);
public static final Property version = BPart.newProperty((int)1, (BValue)BVersion.makeZero(), null);
public static final Property description = BPart.newProperty((int)1, (String)"", null);
public static final Type TYPE;
private BInstallable installable;
private PartSpec spec;
static /* synthetic */ Class class$com$tridium$install$part$BPart;
public BVector getDependencies() {
return (BVector)this.get(dependencies);
}
public void setDependencies(BVector bVector) {
this.set(dependencies, (BValue)bVector, null);
}
public String getPartName() {
return this.getString(partName);
}
public void setPartName(String string) {
this.setString(partName, string, null);
}
public BVersion getVersion() {
return (BVersion)this.get(version);
}
public void setVersion(BVersion bVersion) {
this.set(version, (BValue)bVersion, null);
}
public String getDescription() {
return this.getString(description);
}
public void setDescription(String string) {
this.setString(description, string, null);
}
public Type getType() {
return TYPE;
}
public boolean equivalent(Object object) {
if (object instanceof BPart) {
BPart bPart = (BPart)((Object)object);
boolean bl = false;
if (this.getPartName().equals(bPart.getPartName()) && this.getType().equals(bPart.getType()) && this.getVersion().equivalent((Object)bPart.getVersion())) {
bl = true;
}
return bl;
}
return false;
}
public abstract boolean meets(BDependency var1);
public BInstallable getInstallable() {
if (this.installable == null) {
BComplex bComplex = this.getParent();
while (bComplex != null) {
if (bComplex instanceof BInstallable) {
this.installable = (BInstallable)bComplex;
break;
}
bComplex = bComplex.getParent();
}
}
return this.installable;
}
public void setInstallable(BInstallable bInstallable) {
this.installable = bInstallable;
}
public boolean isInstallable() {
return false;
}
public XElem getXml() {
throw new UnsupportedOperationException();
}
public static String getVendorVersion(XElem xElem) {
return xElem.get("vendorVersion", xElem.get("version", "0"));
}
public static final BPart makePart(XElem xElem, BInstallable bInstallable) {
BPart bPart = null;
if (xElem.name().equals("os")) {
bPart = BOsPart.make(xElem, bInstallable);
} else if (xElem.name().equals("vm")) {
bPart = BVmPart.make(xElem, bInstallable);
} else if (xElem.name().equals("arch")) {
bPart = BArchPart.make(xElem, bInstallable);
} else if (xElem.name().equals("brand")) {
bPart = BBrandPart.make(xElem, bInstallable);
} else if (xElem.name().equals("nre")) {
bPart = BNrePart.make(xElem, bInstallable);
} else if (xElem.name().equals("part")) {
bPart = BGenericPart.make(xElem, bInstallable);
} else if (xElem.name().equals("model")) {
bPart = BModelPart.make(xElem, bInstallable);
} else if (xElem.name().equals("app")) {
bPart = BApplicationPart.make(xElem, bInstallable);
}
return bPart;
}
public PartSpec getPartSpec() {
if (this.spec == null) {
this.spec = new PartSpec(this.getPartName(), this.getType());
}
return this.spec;
}
public PlatformPart asPlatformPart() {
if (this.isNull()) {
return null;
}
return new PlatformPart(){
public final String getPartName() {
return BPart.this.getPartName();
}
public final BPlatformPartType getPartType() {
return BPart.getPlatformPartType(BPart.this.getType().getTypeSpec());
}
public final Version getPartVersion() {
return BPart.this.getVersion().getVendorVersion();
}
};
}
public static BPlatformPartType getPlatformPartType(BTypeSpec bTypeSpec) {
if (bTypeSpec.equals((Object)BArchPart.TYPE.getTypeSpec())) {
return BPlatformPartType.arch;
}
if (bTypeSpec.equals((Object)BBrandPart.TYPE.getTypeSpec())) {
return BPlatformPartType.brand;
}
if (bTypeSpec.equals((Object)BModelPart.TYPE.getTypeSpec())) {
return BPlatformPartType.model;
}
if (bTypeSpec.equals((Object)BModulePart.TYPE.getTypeSpec())) {
return BPlatformPartType.module;
}
if (bTypeSpec.equals((Object)BNrePart.TYPE.getTypeSpec())) {
return BPlatformPartType.nre;
}
if (bTypeSpec.equals((Object)BOsPart.TYPE.getTypeSpec())) {
return BPlatformPartType.os;
}
if (bTypeSpec.equals((Object)BVmPart.TYPE.getTypeSpec())) {
return BPlatformPartType.vm;
}
return BPlatformPartType.other;
}
public static String getPartTypeName(Type type) {
Lexicon lexicon = type.getModule().getLexicon();
String string = BPart.getLexiconText(lexicon, type.getTypeName() + ".typeName");
if (string == null) {
if (type.getSuperType() == null) {
return TYPE.getModule().getLexicon().getText("Unknown.typeName");
}
return BPart.getPartTypeName(type.getSuperType());
}
return string;
}
public static BIcon getPartTypeIcon(Type type) {
Lexicon lexicon = type.getModule().getLexicon();
String string = BPart.getLexiconText(lexicon, type.getTypeName() + ".typeIcon");
if (string == null) {
if (type.getSuperType() == null) {
string = TYPE.getModule().getLexicon().getText("Unknown.typeIcon");
} else {
return BPart.getPartTypeIcon(type.getSuperType());
}
}
return BIcon.make((String)string);
}
public static String getPartTypeShortName(Type type) {
Lexicon lexicon = type.getModule().getLexicon();
String string = BPart.getLexiconText(lexicon, type.getTypeName() + ".typeNameShort");
if (string == null && (string = BPart.getLexiconText(lexicon, type.getTypeName() + ".typeName")) == null) {
if (type.getSuperType() == null) {
return TYPE.getModule().getLexicon().getText("Unknown.typeName");
}
return BPart.getPartTypeShortName(type.getSuperType());
}
return string;
}
public BDependency[] getDependencyArray() {
Property[] propertyArray = this.getDependencies().getPropertiesArray();
BDependency[] bDependencyArray = new BDependency[propertyArray.length];
int n = 0;
while (n < propertyArray.length) {
bDependencyArray[n] = (BDependency)this.getDependencies().get(propertyArray[n]);
++n;
}
return bDependencyArray;
}
public boolean matchesName(String string) {
return BPart.matchesName(this.getPartName(), string);
}
public static boolean isWildcardName(String string) {
int n = 0;
while (n < string.length()) {
switch (string.charAt(n)) {
case '\t':
case ' ':
case '*':
case ',':
case ';':
case '?': {
return true;
}
}
++n;
}
return false;
}
public static boolean matchesName(String string, String string2) {
if (string2 == null) {
return false;
}
PatternFilter[] patternFilterArray = PatternFilter.parseList((String)string2);
int n = 0;
while (n < patternFilterArray.length) {
if (patternFilterArray[n].accept(string)) {
return true;
}
++n;
}
return false;
}
private static final String getLexiconText(Lexicon lexicon, String string) {
String string2 = lexicon.getText(string);
if (string2.equals(string)) {
return null;
}
return string2;
}
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());
}
}
private final /* synthetic */ void this() {
this.installable = null;
this.spec = null;
}
public BPart() {
this.this();
}
static {
Class clazz = class$com$tridium$install$part$BPart;
if (clazz == null) {
clazz = class$com$tridium$install$part$BPart = BPart.class("[Lcom.tridium.install.part.BPart;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
}
@@ -0,0 +1,146 @@
/*
* 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);
}
}