niagara-ax/modules/cfr_output/javax/baja/alarm/BAlarmSourceInfo.java
2026-03-17 13:31:18 -07:00

212 lines
7.6 KiB
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.data.BIDataValue
* javax.baja.log.Log
* javax.baja.naming.BOrd
* javax.baja.sys.BBoolean
* javax.baja.sys.BComponent
* javax.baja.sys.BFacets
* javax.baja.sys.BIcon
* javax.baja.sys.BString
* javax.baja.sys.BValue
* javax.baja.sys.Property
* javax.baja.sys.Sys
* javax.baja.sys.Type
* javax.baja.util.BFormat
*/
package javax.baja.alarm;
import java.util.HashMap;
import javax.baja.alarm.BAlarmInstructions;
import javax.baja.alarm.BSourceState;
import javax.baja.data.BIDataValue;
import javax.baja.log.Log;
import javax.baja.naming.BOrd;
import javax.baja.sys.BBoolean;
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.Property;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.util.BFormat;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BAlarmSourceInfo
extends BComponent {
public static final Property alarmClass = BAlarmSourceInfo.newProperty((int)0, (String)"defaultAlarmClass", (BFacets)BFacets.make((String)"fieldEditor", (BIDataValue)BString.make((String)"alarm:AlarmClassFE")));
public static final Property sourceName = BAlarmSourceInfo.newProperty((int)0, (BValue)BFormat.make((String)"%parent.displayName%"), null);
public static final Property toFaultText = BAlarmSourceInfo.newProperty((int)0, (BValue)BFormat.make((String)""), null);
public static final Property toOffnormalText = BAlarmSourceInfo.newProperty((int)0, (BValue)BFormat.make((String)""), null);
public static final Property toNormalText = BAlarmSourceInfo.newProperty((int)0, (BValue)BFormat.make((String)""), null);
public static final Property hyperlinkOrd = BAlarmSourceInfo.newProperty((int)0, (BValue)BOrd.NULL, (BFacets)BFacets.make((String)"ordRelativize", (BIDataValue)BBoolean.FALSE, (String)"chooseView", (BIDataValue)BBoolean.TRUE));
public static final Property soundFile = BAlarmSourceInfo.newProperty((int)0, (BValue)BOrd.NULL, (BFacets)BFacets.make((String)"targetType", (BIDataValue)BString.make((String)"file:AudioFile")));
public static final Property alarmIcon = BAlarmSourceInfo.newProperty((int)0, (BValue)BOrd.NULL, (BFacets)BFacets.make((String)"targetType", (BIDataValue)BString.make((String)"file:ImageFile")));
public static final Property alarmInstructions = BAlarmSourceInfo.newProperty((int)0, (BValue)BAlarmInstructions.make(""), null);
public static final Property metaData = BAlarmSourceInfo.newProperty((int)0, (BValue)BFacets.DEFAULT, null);
public static final Type TYPE;
private static final BIcon icon;
static /* synthetic */ Class class$javax$baja$alarm$BAlarmSourceInfo;
public String getAlarmClass() {
return this.getString(alarmClass);
}
public void setAlarmClass(String string) {
this.setString(alarmClass, string, null);
}
public BFormat getSourceName() {
return (BFormat)this.get(sourceName);
}
public void setSourceName(BFormat bFormat) {
this.set(sourceName, (BValue)bFormat, null);
}
public BFormat getToFaultText() {
return (BFormat)this.get(toFaultText);
}
public void setToFaultText(BFormat bFormat) {
this.set(toFaultText, (BValue)bFormat, null);
}
public BFormat getToOffnormalText() {
return (BFormat)this.get(toOffnormalText);
}
public void setToOffnormalText(BFormat bFormat) {
this.set(toOffnormalText, (BValue)bFormat, null);
}
public BFormat getToNormalText() {
return (BFormat)this.get(toNormalText);
}
public void setToNormalText(BFormat bFormat) {
this.set(toNormalText, (BValue)bFormat, null);
}
public BOrd getHyperlinkOrd() {
return (BOrd)this.get(hyperlinkOrd);
}
public void setHyperlinkOrd(BOrd bOrd) {
this.set(hyperlinkOrd, (BValue)bOrd, null);
}
public BOrd getSoundFile() {
return (BOrd)this.get(soundFile);
}
public void setSoundFile(BOrd bOrd) {
this.set(soundFile, (BValue)bOrd, null);
}
public BOrd getAlarmIcon() {
return (BOrd)this.get(alarmIcon);
}
public void setAlarmIcon(BOrd bOrd) {
this.set(alarmIcon, (BValue)bOrd, null);
}
public BAlarmInstructions getAlarmInstructions() {
return (BAlarmInstructions)this.get(alarmInstructions);
}
public void setAlarmInstructions(BAlarmInstructions bAlarmInstructions) {
this.set(alarmInstructions, (BValue)bAlarmInstructions, null);
}
public BFacets getMetaData() {
return (BFacets)this.get(metaData);
}
public void setMetaData(BFacets bFacets) {
this.set(metaData, (BValue)bFacets, null);
}
public Type getType() {
return TYPE;
}
public BFacets makeAlarmData(BSourceState bSourceState) {
HashMap<String, Object> hashMap = new HashMap<String, Object>();
if (!this.getSourceName().toString().equals("")) {
hashMap.put("sourceName", BString.make((String)this.getSourceName().format((Object)this)));
}
String string = "";
if (bSourceState == BSourceState.offnormal) {
string = this.getToOffnormalText().toString();
} else if (bSourceState == BSourceState.fault) {
string = this.getToFaultText().toString();
} else if (bSourceState == BSourceState.normal) {
string = this.getToNormalText().toString();
} else if (bSourceState == BSourceState.alert) {
string = this.getToOffnormalText().toString();
}
if (!string.equals("")) {
hashMap.put("msgText", BString.make((String)string));
}
if (this.getHyperlinkOrd() != BOrd.NULL) {
hashMap.put("hyperlinkOrd", BString.make((String)this.getHyperlinkOrd().toString()));
}
if (this.getSoundFile() != BOrd.NULL) {
hashMap.put("soundFile", BString.make((String)this.getSoundFile().toString()));
}
if (this.getAlarmIcon() != BOrd.NULL) {
hashMap.put("icon", BString.make((String)this.getAlarmIcon().toString()));
}
try {
if (!this.getAlarmInstructions().equals((Object)BAlarmInstructions.NULL)) {
hashMap.put("instructions", BString.make((String)this.getAlarmInstructions().encodeToString()));
}
}
catch (Exception exception) {
Log.getLog((String)"alarm").error("Could not encode Alarm Instructions", (Throwable)exception);
}
String[] stringArray = this.getMetaData().list();
int n = 0;
while (n < stringArray.length) {
hashMap.put(stringArray[n], this.getMetaData().get(stringArray[n]));
++n;
}
return BFacets.make(hashMap);
}
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());
}
}
static {
Class clazz = class$javax$baja$alarm$BAlarmSourceInfo;
if (clazz == null) {
clazz = class$javax$baja$alarm$BAlarmSourceInfo = BAlarmSourceInfo.class("[Ljavax.baja.alarm.BAlarmSourceInfo;", false);
}
TYPE = Sys.loadType((Class)clazz);
icon = BIcon.std((String)"alarm.png");
}
}