124 lines
3.6 KiB
Java
124 lines
3.6 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package javax.baja.sys;
|
|
|
|
import com.tridium.sys.station.Station;
|
|
import javax.baja.agent.AgentList;
|
|
import javax.baja.sys.Action;
|
|
import javax.baja.sys.BComponent;
|
|
import javax.baja.sys.BFacets;
|
|
import javax.baja.sys.BIcon;
|
|
import javax.baja.sys.BString;
|
|
import javax.baja.sys.BValue;
|
|
import javax.baja.sys.Context;
|
|
import javax.baja.sys.Property;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
import javax.baja.util.BFormat;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public final class BStation
|
|
extends BComponent {
|
|
public static final Property stationName = BStation.newProperty(3, "", null);
|
|
public static final Property sysInfo = BStation.newProperty(0, BFacets.DEFAULT, null);
|
|
public static final Action save = BStation.newAction(0, null);
|
|
public static final Type TYPE;
|
|
private static final BIcon icon;
|
|
static /* synthetic */ Class class$javax$baja$sys$BStation;
|
|
|
|
public final String getStationName() {
|
|
return this.getString(stationName);
|
|
}
|
|
|
|
public final void setStationName(String string) {
|
|
this.setString(stationName, string, null);
|
|
}
|
|
|
|
public final BFacets getSysInfo() {
|
|
return (BFacets)this.get(sysInfo);
|
|
}
|
|
|
|
public final void setSysInfo(BFacets bFacets) {
|
|
this.set(sysInfo, (BValue)bFacets, null);
|
|
}
|
|
|
|
public final void save() {
|
|
this.invoke(save, null, null);
|
|
}
|
|
|
|
public final Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public final void doSave(Context context) throws Exception {
|
|
Station.saveAsync(context);
|
|
}
|
|
|
|
public final String getStationDisplayName(Context context) {
|
|
BValue bValue = this.get("displayName");
|
|
if (bValue == null) {
|
|
return this.getStationName();
|
|
}
|
|
if (bValue instanceof BString) {
|
|
String string = ((BString)bValue).getString();
|
|
if (string.length() == 0) {
|
|
return null;
|
|
}
|
|
return string;
|
|
}
|
|
if (bValue instanceof BFormat) {
|
|
BFormat bFormat = (BFormat)bValue;
|
|
if (bFormat.getFormat().length() == 0) {
|
|
return null;
|
|
}
|
|
try {
|
|
String string = bFormat.format(this, context);
|
|
if (string.length() == 0) {
|
|
return null;
|
|
}
|
|
return string;
|
|
}
|
|
catch (Exception exception) {
|
|
return "Error: " + exception.getClass().getName() + ": " + exception.getMessage();
|
|
}
|
|
}
|
|
return "Error: displayName must be one of { BString, BFormat }";
|
|
}
|
|
|
|
public final BIcon getIcon() {
|
|
return icon;
|
|
}
|
|
|
|
public final AgentList getAgents(Context context) {
|
|
AgentList agentList = super.getAgents(context);
|
|
agentList.toBottom("wbutil:MetadataBrowser");
|
|
return agentList;
|
|
}
|
|
|
|
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());
|
|
}
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$javax$baja$sys$BStation;
|
|
if (clazz == null) {
|
|
clazz = class$javax$baja$sys$BStation = BStation.class("[Ljavax.baja.sys.BStation;", false);
|
|
}
|
|
TYPE = Sys.loadType(clazz);
|
|
icon = BIcon.std("database.png");
|
|
}
|
|
}
|
|
|