2026-03-17 13:31:18 -07:00

89 lines
3.3 KiB
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.nre.util.Array
* javax.baja.nre.util.TextUtil
*/
package com.tridium.sys.metrics;
import com.tridium.sys.metrics.Group;
import java.util.StringTokenizer;
import javax.baja.license.Feature;
import javax.baja.license.FeatureNotLicensedException;
import javax.baja.nre.util.Array;
import javax.baja.nre.util.TextUtil;
import javax.baja.sys.Sys;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
class GlobalGroup
extends Group {
static final String FEATURE_NAME = "globalCapacity";
boolean isGlobalEnabled;
final Group.Count links;
final Group.Count histories;
final Group.Count schedules;
final Array excludedNetworks;
final Array excludedDevices;
final Array excludedPoints;
boolean isGlobal() {
return true;
}
protected static void parseModules(Feature feature, String string, Array array) {
String string2 = feature.get(string);
if (string2 != null && !TextUtil.toLowerCase((String)string2).equals("none")) {
StringTokenizer stringTokenizer = new StringTokenizer(string2, ",;");
while (stringTokenizer.hasMoreTokens()) {
array.add((Object)stringTokenizer.nextToken());
}
}
}
private final /* synthetic */ void this() {
this.isGlobalEnabled = false;
this.links = new Group.Count();
this.histories = new Group.Count();
this.schedules = new Group.Count();
this.excludedNetworks = new Array();
this.excludedDevices = new Array();
this.excludedPoints = new Array();
}
GlobalGroup() {
super(FEATURE_NAME);
this.this();
try {
Feature feature = Sys.getLicenseManager().getFeature("tridium", FEATURE_NAME);
try {
feature.check();
this.networks.limit = GlobalGroup.parseLimit(feature, "network.limit");
this.devices.limit = GlobalGroup.parseLimit(feature, "device.limit");
this.points.limit = GlobalGroup.parseLimit(feature, "point.limit");
this.links.limit = GlobalGroup.parseLimit(feature, "link.limit");
this.histories.limit = GlobalGroup.parseLimit(feature, "history.limit");
this.schedules.limit = GlobalGroup.parseLimit(feature, "schedule.limit");
GlobalGroup.parseModules(feature, "excludedNetworks", this.excludedNetworks);
GlobalGroup.parseModules(feature, "excludedDevices", this.excludedDevices);
GlobalGroup.parseModules(feature, "excludedPoints", this.excludedPoints);
this.isGlobalEnabled = true;
}
catch (FeatureNotLicensedException featureNotLicensedException) {
featureNotLicensedException.printStackTrace();
}
}
catch (FeatureNotLicensedException featureNotLicensedException) {
this.networks.limit = Integer.MAX_VALUE;
this.devices.limit = Integer.MAX_VALUE;
this.points.limit = Integer.MAX_VALUE;
this.links.limit = Integer.MAX_VALUE;
this.histories.limit = Integer.MAX_VALUE;
this.schedules.limit = Integer.MAX_VALUE;
}
}
}