link start!

This commit is contained in:
cherubin
2026-03-17 13:31:18 -07:00
commit 08abe87cfb
5910 changed files with 386288 additions and 0 deletions
+108
View File
@@ -0,0 +1,108 @@
/*
* Decompiled with CFR 0.152.
*/
package javax.baja.spy;
import javax.baja.agent.AgentList;
import javax.baja.category.BCategoryMask;
import javax.baja.category.BCategoryService;
import javax.baja.category.BICategorizable;
import javax.baja.file.FilePath;
import javax.baja.naming.BOrd;
import javax.baja.naming.OrdTarget;
import javax.baja.security.BIProtected;
import javax.baja.security.BPermissions;
import javax.baja.spy.Spy;
import javax.baja.sys.BObject;
import javax.baja.sys.Context;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public final class BSpy
extends BObject
implements BICategorizable,
BIProtected {
public static final Type TYPE;
private FilePath path;
private Spy spy;
static /* synthetic */ Class class$javax$baja$spy$BSpy;
public static final BSpy make(FilePath filePath, Spy spy) {
return new BSpy(filePath, spy);
}
public final FilePath getPath() {
return this.path;
}
public final Spy get() {
return this.spy;
}
public final BCategoryMask getCategoryMask() {
return BCategoryService.getService().getCategoryMask(BOrd.make("spy:" + this.path.getBody()));
}
public final BCategoryMask getAppliedCategoryMask() {
return BCategoryService.getService().getAppliedCategoryMask(BOrd.make("spy:" + this.path.getBody()));
}
public final BPermissions getPermissions(Context context) {
if (context != null && context.getUser() != null) {
return context.getUser().getPermissionsFor(this);
}
return BPermissions.all;
}
public final boolean canRead(OrdTarget ordTarget) {
return ordTarget.getPermissionsForTarget().hasAdminRead();
}
public final boolean canWrite(OrdTarget ordTarget) {
return false;
}
public final boolean canInvoke(OrdTarget ordTarget) {
return false;
}
public final AgentList getAgents(Context context) {
AgentList agentList = super.getAgents(context);
agentList.toTop("web:SpyServlet");
return agentList;
}
public final 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());
}
}
private BSpy(FilePath filePath, Spy spy) {
this.path = filePath;
this.spy = spy;
}
static {
Class clazz = class$javax$baja$spy$BSpy;
if (clazz == null) {
clazz = class$javax$baja$spy$BSpy = BSpy.class("[Ljavax.baja.spy.BSpy;", false);
}
TYPE = Sys.loadType(clazz);
}
}
@@ -0,0 +1,67 @@
/*
* Decompiled with CFR 0.152.
*/
package javax.baja.spy;
import javax.baja.file.FilePath;
import javax.baja.naming.OrdQuery;
import javax.baja.naming.OrdTarget;
import javax.baja.space.BSpace;
import javax.baja.space.BSpaceScheme;
import javax.baja.spy.BSpySpace;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BSpyScheme
extends BSpaceScheme {
public static final BSpyScheme INSTANCE = new BSpyScheme();
public static final Type TYPE;
static /* synthetic */ Class class$javax$baja$spy$BSpyScheme;
public OrdQuery parse(String string) {
return new FilePath("spy", string);
}
public Type getSpaceType() {
return BSpySpace.TYPE;
}
public OrdTarget resolve(OrdTarget ordTarget, OrdQuery ordQuery, BSpace bSpace) {
FilePath filePath = (FilePath)ordQuery;
BSpySpace bSpySpace = (BSpySpace)bSpace;
return new OrdTarget(ordTarget, bSpySpace.resolveSpy(filePath));
}
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());
}
}
private BSpyScheme() {
super("spy");
}
static {
Class clazz = class$javax$baja$spy$BSpyScheme;
if (clazz == null) {
clazz = class$javax$baja$spy$BSpyScheme = BSpyScheme.class("[Ljavax.baja.spy.BSpyScheme;", false);
}
TYPE = Sys.loadType(clazz);
}
}
@@ -0,0 +1,140 @@
/*
* Decompiled with CFR 0.152.
*/
package javax.baja.spy;
import javax.baja.category.BCategoryMask;
import javax.baja.category.BCategoryService;
import javax.baja.category.BICategorizable;
import javax.baja.file.FilePath;
import javax.baja.naming.BLocalHost;
import javax.baja.naming.BOrd;
import javax.baja.naming.OrdTarget;
import javax.baja.naming.SyntaxException;
import javax.baja.naming.UnresolvedException;
import javax.baja.security.BIProtected;
import javax.baja.security.BPermissions;
import javax.baja.space.BSpace;
import javax.baja.spy.BSpy;
import javax.baja.spy.ISpyDir;
import javax.baja.spy.Spy;
import javax.baja.spy.SpyWriter;
import javax.baja.sys.BIcon;
import javax.baja.sys.Context;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.util.LexiconText;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BSpySpace
extends BSpace
implements BICategorizable,
BIProtected {
private static final BIcon icon = BIcon.std("spy.png");
public static final BSpySpace INSTANCE = new BSpySpace();
public static final Type TYPE;
private static final BOrd ordInSession;
static /* synthetic */ Class class$javax$baja$spy$BSpySpace;
public BSpy resolveSpy(FilePath filePath) throws SyntaxException, UnresolvedException {
Spy spy = Spy.ROOT;
int n = 0;
while (n < filePath.depth()) {
String string = filePath.nameAt(n);
if ((spy = spy instanceof ISpyDir ? ((ISpyDir)((Object)spy)).find(string) : null) == null) break;
++n;
}
if (spy == null) {
spy = new NotFoundSpy();
}
return BSpy.make(filePath, spy);
}
public BCategoryMask getCategoryMask() {
return BCategoryService.getService().getCategoryMask(ordInSession);
}
public BCategoryMask getAppliedCategoryMask() {
return BCategoryService.getService().getAppliedCategoryMask(ordInSession);
}
public BPermissions getPermissions(Context context) {
if (context != null && context.getUser() != null) {
return context.getUser().getPermissionsFor(this);
}
return BPermissions.all;
}
public boolean canRead(OrdTarget ordTarget) {
return ordTarget.getPermissionsForTarget().hasAdminRead();
}
public boolean canWrite(OrdTarget ordTarget) {
return false;
}
public boolean canInvoke(OrdTarget ordTarget) {
return false;
}
public BOrd getOrdInSession() {
return ordInSession;
}
public BIcon getIcon() {
return icon;
}
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());
}
}
protected BSpySpace() {
super("spy", LexiconText.make("baja", "nav.spy"));
}
protected BSpySpace(String string, LexiconText lexiconText) {
super(string, lexiconText);
}
static {
BLocalHost.INSTANCE.addNavChild(INSTANCE);
Class clazz = class$javax$baja$spy$BSpySpace;
if (clazz == null) {
clazz = class$javax$baja$spy$BSpySpace = BSpySpace.class("[Ljavax.baja.spy.BSpySpace;", false);
}
TYPE = Sys.loadType(clazz);
ordInSession = BOrd.make("spy:/");
}
static class NotFoundSpy
extends Spy {
public String getTitle() {
return "Spy Not Found";
}
public void write(SpyWriter spyWriter) {
spyWriter.w("<h1>Spy Not Found</h1>");
spyWriter.w(spyWriter.path);
}
NotFoundSpy() {
}
}
}
@@ -0,0 +1,13 @@
/*
* Decompiled with CFR 0.152.
*/
package javax.baja.spy;
import javax.baja.spy.Spy;
public interface ISpyDir {
public String[] list();
public Spy find(String var1);
}
@@ -0,0 +1,45 @@
/*
* Decompiled with CFR 0.152.
*/
package javax.baja.spy;
import javax.baja.naming.SlotPath;
import javax.baja.nav.BINavNode;
import javax.baja.spy.ISpyDir;
import javax.baja.spy.Spy;
import javax.baja.spy.SpyWriter;
import javax.baja.sys.BObject;
public class ObjectSpy
extends Spy
implements ISpyDir {
private BObject object;
public String[] list() {
return new String[0];
}
public Spy find(String string) {
BObject bObject = null;
if (this.object instanceof BINavNode) {
bObject = (BObject)((Object)((BINavNode)((Object)this.object)).getNavChild(SlotPath.unescape(string)));
}
if (bObject == null) {
return null;
}
return new ObjectSpy(bObject);
}
public BObject getObject() {
return this.object;
}
public void write(SpyWriter spyWriter) throws Exception {
this.object.spy(spyWriter);
}
public ObjectSpy(BObject bObject) {
this.object = bObject;
}
}
@@ -0,0 +1,26 @@
/*
* Decompiled with CFR 0.152.
*/
package javax.baja.spy;
import javax.baja.spy.SpyDir;
import javax.baja.spy.SpyWriter;
public abstract class Spy {
public static final SpyDir ROOT = new SpyDir();
public String getTitle() {
return null;
}
public abstract void write(SpyWriter var1) throws Exception;
public boolean equals(Object object) {
boolean bl = false;
if (this == object) {
bl = true;
}
return bl;
}
}
@@ -0,0 +1,65 @@
/*
* Decompiled with CFR 0.152.
*/
package javax.baja.spy;
import java.util.ArrayList;
import java.util.HashMap;
import javax.baja.spy.ISpyDir;
import javax.baja.spy.Spy;
import javax.baja.spy.SpyWriter;
public class SpyDir
extends Spy
implements ISpyDir {
private HashMap map;
private ArrayList list;
public void write(SpyWriter spyWriter) throws Exception {
spyWriter.w("<ul>");
String[] stringArray = this.list();
int n = 0;
while (n < stringArray.length) {
String string = stringArray[n];
String string2 = this.find(string).getTitle();
if (string2 == null) {
string2 = string;
}
spyWriter.w("<li>").a(stringArray[n], string2).w("</li>\n");
++n;
}
spyWriter.w("</ul>");
}
public String[] list() {
if (this.list == null) {
return new String[0];
}
return this.list.toArray(new String[this.list.size()]);
}
public Spy find(String string) {
if (this.map == null) {
return null;
}
return (Spy)this.map.get(string);
}
public void add(String string, Spy spy) {
if (this.map == null) {
this.map = new HashMap();
this.list = new ArrayList();
}
this.map.put(string, spy);
this.list.add(string);
}
public void remove(String string) {
if (this.map == null) {
return;
}
this.map.remove(string);
this.list.remove(string);
}
}
@@ -0,0 +1,99 @@
/*
* Decompiled with CFR 0.152.
*/
package javax.baja.spy;
import java.io.OutputStream;
import java.io.Writer;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.baja.file.FilePath;
import javax.baja.io.HtmlWriter;
import javax.baja.sys.BAbsTime;
import javax.baja.sys.Context;
public class SpyWriter
extends HtmlWriter {
static final SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss dd-MMM-yy zzz");
FilePath path;
Context cx;
public FilePath getPath() {
return this.path;
}
public Context getContext() {
return this.cx;
}
public HtmlWriter w(Object object) {
if (object instanceof BAbsTime) {
BAbsTime bAbsTime = (BAbsTime)object;
if (bAbsTime == null || bAbsTime.isNull()) {
this.print("null");
} else {
this.print(timeFormat.format(new Date(bAbsTime.getMillis())));
}
} else {
this.print(object);
}
return this;
}
public SpyWriter startProps() {
this.startTable(false);
return this;
}
public SpyWriter startProps(String string) {
this.startTable(false);
this.trTitle(string, 2);
return this;
}
public SpyWriter prop(Object object, Object object2) {
this.w("<tr>").th(object).td(object2).w("</tr>\n");
return this;
}
public SpyWriter prop(Object object, boolean bl) {
this.w("<tr>").th(object).td(String.valueOf(bl)).w("</tr>\n");
return this;
}
public SpyWriter prop(Object object, int n) {
this.w("<tr>").th(object).td(String.valueOf(n)).w("</tr>\n");
return this;
}
public SpyWriter prop(Object object, double d) {
this.w("<tr>").th(object).td(String.valueOf(d)).w("</tr>\n");
return this;
}
public SpyWriter endProps() {
this.endTable();
return this;
}
public SpyWriter(Writer writer, FilePath filePath) {
this(writer, filePath, null);
}
public SpyWriter(Writer writer, FilePath filePath, Context context) {
super(writer);
this.path = filePath;
this.cx = context;
}
public SpyWriter(OutputStream outputStream, FilePath filePath) {
this(outputStream, filePath, null);
}
public SpyWriter(OutputStream outputStream, FilePath filePath, Context context) {
super(outputStream);
this.path = filePath;
this.cx = context;
}
}