115 lines
3.5 KiB
Java
115 lines
3.5 KiB
Java
/*
|
|
* 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);
|
|
}
|
|
}
|
|
|