87 lines
2.9 KiB
Java
87 lines
2.9 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* com.tridium.fox.sys.BFoxSession
|
|
* javax.baja.agent.BIAgent
|
|
* javax.baja.naming.BISession
|
|
* javax.baja.naming.OrdTarget
|
|
* javax.baja.naming.UnresolvedException
|
|
* javax.baja.sys.BObject
|
|
* javax.baja.sys.BSingleton
|
|
* javax.baja.sys.Sys
|
|
* javax.baja.sys.Type
|
|
* javax.baja.util.BUuid
|
|
*/
|
|
package com.tridium.alarm.fox;
|
|
|
|
import com.tridium.alarm.db.AlarmQuery;
|
|
import com.tridium.alarm.db.BIAlarmResolver;
|
|
import com.tridium.alarm.fox.BFoxAlarmDatabase;
|
|
import com.tridium.fox.sys.BFoxSession;
|
|
import javax.baja.agent.BIAgent;
|
|
import javax.baja.alarm.BAlarmRecord;
|
|
import javax.baja.naming.BISession;
|
|
import javax.baja.naming.OrdTarget;
|
|
import javax.baja.naming.UnresolvedException;
|
|
import javax.baja.sys.BObject;
|
|
import javax.baja.sys.BSingleton;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
import javax.baja.util.BUuid;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public class BFoxAlarmResolver
|
|
extends BSingleton
|
|
implements BIAlarmResolver,
|
|
BIAgent {
|
|
public static final BFoxAlarmResolver INSTANCE = new BFoxAlarmResolver();
|
|
public static final Type TYPE;
|
|
static /* synthetic */ Class class$com$tridium$alarm$fox$BFoxAlarmResolver;
|
|
|
|
public OrdTarget resolve(BISession bISession, OrdTarget ordTarget, AlarmQuery alarmQuery) {
|
|
BFoxSession bFoxSession = (BFoxSession)bISession;
|
|
if (alarmQuery.isDbQuery()) {
|
|
return new OrdTarget(ordTarget, (BObject)new BFoxAlarmDatabase(bFoxSession));
|
|
}
|
|
String string = alarmQuery.getQueryParameter("uuid", null);
|
|
if (string != null) {
|
|
BFoxAlarmDatabase bFoxAlarmDatabase = new BFoxAlarmDatabase(bFoxSession);
|
|
BAlarmRecord bAlarmRecord = bFoxAlarmDatabase.getRecord(BUuid.make((String)string));
|
|
if (bAlarmRecord == null) {
|
|
throw new UnresolvedException(string);
|
|
}
|
|
return new OrdTarget(ordTarget, (BObject)bAlarmRecord);
|
|
}
|
|
throw new UnresolvedException("Invalid alarm query: " + alarmQuery);
|
|
}
|
|
|
|
public Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
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$com$tridium$alarm$fox$BFoxAlarmResolver;
|
|
if (clazz == null) {
|
|
clazz = class$com$tridium$alarm$fox$BFoxAlarmResolver = BFoxAlarmResolver.class("[Lcom.tridium.alarm.fox.BFoxAlarmResolver;", false);
|
|
}
|
|
TYPE = Sys.loadType((Class)clazz);
|
|
}
|
|
}
|
|
|