109 lines
2.9 KiB
Java
109 lines
2.9 KiB
Java
/*
|
|
* 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);
|
|
}
|
|
}
|
|
|