link start!
This commit is contained in:
@@ -0,0 +1,147 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package javax.baja.agent;
|
||||
|
||||
import javax.baja.agent.AgentInfo;
|
||||
import javax.baja.registry.TypeInfo;
|
||||
import javax.baja.security.BPermissions;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
|
||||
public abstract class AgentFilter {
|
||||
public abstract boolean include(AgentInfo var1);
|
||||
|
||||
public static AgentFilter is(String string) {
|
||||
return AgentFilter.is(Sys.getRegistry().getType(string));
|
||||
}
|
||||
|
||||
public static AgentFilter is(Type type) {
|
||||
return AgentFilter.is(type.getTypeInfo());
|
||||
}
|
||||
|
||||
public static AgentFilter is(TypeInfo typeInfo) {
|
||||
return new IsFilter(typeInfo);
|
||||
}
|
||||
|
||||
public static AgentFilter not(AgentFilter agentFilter) {
|
||||
return new NotFilter(agentFilter);
|
||||
}
|
||||
|
||||
public static AgentFilter has(BPermissions bPermissions) {
|
||||
return new HasFilter(bPermissions);
|
||||
}
|
||||
|
||||
public static AgentFilter and(AgentFilter agentFilter, AgentFilter agentFilter2) {
|
||||
return new AndFilter(agentFilter, agentFilter2);
|
||||
}
|
||||
|
||||
public static AgentFilter and(AgentFilter agentFilter, BPermissions bPermissions) {
|
||||
return AgentFilter.and(agentFilter, AgentFilter.has(bPermissions));
|
||||
}
|
||||
|
||||
public static AgentFilter or(AgentFilter agentFilter, AgentFilter agentFilter2) {
|
||||
return new OrFilter(agentFilter, agentFilter2, null, null);
|
||||
}
|
||||
|
||||
public static AgentFilter or(AgentFilter agentFilter, AgentFilter agentFilter2, AgentFilter agentFilter3) {
|
||||
return new OrFilter(agentFilter, agentFilter2, agentFilter3, null);
|
||||
}
|
||||
|
||||
public static AgentFilter or(AgentFilter agentFilter, AgentFilter agentFilter2, AgentFilter agentFilter3, AgentFilter agentFilter4) {
|
||||
return new OrFilter(agentFilter, agentFilter2, agentFilter3, agentFilter4);
|
||||
}
|
||||
|
||||
static class IsFilter
|
||||
extends AgentFilter {
|
||||
TypeInfo t;
|
||||
|
||||
public final boolean include(AgentInfo agentInfo) {
|
||||
return agentInfo.getAgentType().is(this.t);
|
||||
}
|
||||
|
||||
IsFilter(TypeInfo typeInfo) {
|
||||
this.t = typeInfo;
|
||||
}
|
||||
}
|
||||
|
||||
static class NotFilter
|
||||
extends AgentFilter {
|
||||
AgentFilter f;
|
||||
|
||||
public final boolean include(AgentInfo agentInfo) {
|
||||
return this.f.include(agentInfo) ^ true;
|
||||
}
|
||||
|
||||
NotFilter(AgentFilter agentFilter) {
|
||||
this.f = agentFilter;
|
||||
}
|
||||
}
|
||||
|
||||
static class HasFilter
|
||||
extends AgentFilter {
|
||||
BPermissions p;
|
||||
|
||||
public final boolean include(AgentInfo agentInfo) {
|
||||
try {
|
||||
return this.p.has(agentInfo.getRequiredPermissions());
|
||||
}
|
||||
catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
HasFilter(BPermissions bPermissions) {
|
||||
this.p = bPermissions;
|
||||
}
|
||||
}
|
||||
|
||||
static class AndFilter
|
||||
extends AgentFilter {
|
||||
AgentFilter f1;
|
||||
AgentFilter f2;
|
||||
|
||||
public final boolean include(AgentInfo agentInfo) {
|
||||
boolean bl = false;
|
||||
if (this.f1.include(agentInfo) && this.f2.include(agentInfo)) {
|
||||
bl = true;
|
||||
}
|
||||
return bl;
|
||||
}
|
||||
|
||||
AndFilter(AgentFilter agentFilter, AgentFilter agentFilter2) {
|
||||
this.f1 = agentFilter;
|
||||
this.f2 = agentFilter2;
|
||||
}
|
||||
}
|
||||
|
||||
static class OrFilter
|
||||
extends AgentFilter {
|
||||
AgentFilter f1;
|
||||
AgentFilter f2;
|
||||
AgentFilter f3;
|
||||
AgentFilter f4;
|
||||
|
||||
public final boolean include(AgentInfo agentInfo) {
|
||||
if (this.f1 != null && this.f1.include(agentInfo)) {
|
||||
return true;
|
||||
}
|
||||
if (this.f2 != null && this.f2.include(agentInfo)) {
|
||||
return true;
|
||||
}
|
||||
if (this.f3 != null && this.f3.include(agentInfo)) {
|
||||
return true;
|
||||
}
|
||||
return this.f4 != null && this.f4.include(agentInfo);
|
||||
}
|
||||
|
||||
OrFilter(AgentFilter agentFilter, AgentFilter agentFilter2, AgentFilter agentFilter3, AgentFilter agentFilter4) {
|
||||
this.f1 = agentFilter;
|
||||
this.f2 = agentFilter2;
|
||||
this.f3 = agentFilter3;
|
||||
this.f4 = agentFilter4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package javax.baja.agent;
|
||||
|
||||
import javax.baja.registry.TypeInfo;
|
||||
import javax.baja.security.BPermissions;
|
||||
import javax.baja.sys.BIcon;
|
||||
import javax.baja.sys.BObject;
|
||||
import javax.baja.sys.Context;
|
||||
|
||||
public interface AgentInfo {
|
||||
public BObject getInstance();
|
||||
|
||||
public String getAgentId();
|
||||
|
||||
public TypeInfo getAgentType();
|
||||
|
||||
public String getAppName();
|
||||
|
||||
public TypeInfo[] getAgentOn();
|
||||
|
||||
public String getDisplayName(Context var1);
|
||||
|
||||
public BIcon getIcon(Context var1);
|
||||
|
||||
public BPermissions getRequiredPermissions();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package javax.baja.agent;
|
||||
|
||||
import javax.baja.agent.AgentFilter;
|
||||
import javax.baja.agent.AgentInfo;
|
||||
|
||||
public interface AgentList {
|
||||
public int size();
|
||||
|
||||
public AgentInfo getDefault();
|
||||
|
||||
public AgentInfo get(int var1);
|
||||
|
||||
public AgentInfo get(String var1);
|
||||
|
||||
public AgentInfo[] list();
|
||||
|
||||
public int indexOf(String var1);
|
||||
|
||||
public int indexOf(AgentInfo var1);
|
||||
|
||||
public Object clone();
|
||||
|
||||
public AgentList filter(AgentFilter var1);
|
||||
|
||||
public void add(String var1);
|
||||
|
||||
public void add(AgentInfo var1);
|
||||
|
||||
public void add(int var1, String var2);
|
||||
|
||||
public void add(int var1, AgentInfo var2);
|
||||
|
||||
public void remove(String var1);
|
||||
|
||||
public void remove(AgentInfo var1);
|
||||
|
||||
public void remove(int var1);
|
||||
|
||||
public void remove(AgentList var1);
|
||||
|
||||
public void toTop(String var1);
|
||||
|
||||
public void toTop(AgentInfo var1);
|
||||
|
||||
public void toTop(int var1);
|
||||
|
||||
public void toBottom(String var1);
|
||||
|
||||
public void toBottom(AgentInfo var1);
|
||||
|
||||
public void toBottom(int var1);
|
||||
|
||||
public void swap(int var1, int var2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package javax.baja.agent;
|
||||
|
||||
import javax.baja.agent.AgentInfo;
|
||||
import javax.baja.agent.BIAgent;
|
||||
import javax.baja.registry.TypeInfo;
|
||||
import javax.baja.security.BPermissions;
|
||||
import javax.baja.sys.BFacets;
|
||||
import javax.baja.sys.BIcon;
|
||||
import javax.baja.sys.BObject;
|
||||
import javax.baja.sys.BStruct;
|
||||
import javax.baja.sys.BValue;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.Property;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.util.BTypeSpec;
|
||||
|
||||
/*
|
||||
* Illegal identifiers - consider using --renameillegalidents true
|
||||
*/
|
||||
public abstract class BAbstractPxView
|
||||
extends BStruct
|
||||
implements AgentInfo,
|
||||
BIAgent {
|
||||
public static final Property icon = BAbstractPxView.newProperty(0, BIcon.std("views/view.png"), null);
|
||||
public static final Property requiredPermissions = BAbstractPxView.newProperty(0, BPermissions.operatorRead, null);
|
||||
public static final Property media = BAbstractPxView.newProperty(0, BTypeSpec.make("workbench:WbPxMedia"), BFacets.make("targetType", "bajaui:PxMedia"));
|
||||
public static final Type TYPE;
|
||||
static TypeInfo[] emptyTypeInfo;
|
||||
static /* synthetic */ Class class$javax$baja$agent$BAbstractPxView;
|
||||
|
||||
public BIcon getIcon() {
|
||||
return (BIcon)this.get(icon);
|
||||
}
|
||||
|
||||
public void setIcon(BIcon bIcon) {
|
||||
this.set(icon, (BValue)bIcon, null);
|
||||
}
|
||||
|
||||
public BPermissions getRequiredPermissions() {
|
||||
return (BPermissions)this.get(requiredPermissions);
|
||||
}
|
||||
|
||||
public void setRequiredPermissions(BPermissions bPermissions) {
|
||||
this.set(requiredPermissions, (BValue)bPermissions, null);
|
||||
}
|
||||
|
||||
public BTypeSpec getMedia() {
|
||||
return (BTypeSpec)this.get(media);
|
||||
}
|
||||
|
||||
public void setMedia(BTypeSpec bTypeSpec) {
|
||||
this.set(media, (BValue)bTypeSpec, null);
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public BObject getInstance() {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAgentId() {
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
public TypeInfo getAgentType() {
|
||||
return this.getType().getTypeInfo();
|
||||
}
|
||||
|
||||
public String getAppName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public TypeInfo[] getAgentOn() {
|
||||
return emptyTypeInfo;
|
||||
}
|
||||
|
||||
public BIcon getIcon(Context context) {
|
||||
return this.getIcon();
|
||||
}
|
||||
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
public BAbstractPxView(BIcon bIcon, BPermissions bPermissions, BTypeSpec bTypeSpec) {
|
||||
this.setIcon(bIcon);
|
||||
this.setRequiredPermissions(bPermissions);
|
||||
this.setMedia(bTypeSpec);
|
||||
}
|
||||
|
||||
public BAbstractPxView() {
|
||||
}
|
||||
|
||||
static {
|
||||
Class clazz = class$javax$baja$agent$BAbstractPxView;
|
||||
if (clazz == null) {
|
||||
clazz = class$javax$baja$agent$BAbstractPxView = BAbstractPxView.class("[Ljavax.baja.agent.BAbstractPxView;", false);
|
||||
}
|
||||
TYPE = Sys.loadType(clazz);
|
||||
emptyTypeInfo = new TypeInfo[0];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package javax.baja.agent;
|
||||
|
||||
import javax.baja.agent.BAbstractPxView;
|
||||
import javax.baja.naming.OrdTarget;
|
||||
import javax.baja.security.BPermissions;
|
||||
import javax.baja.sys.BIcon;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.util.BTypeSpec;
|
||||
|
||||
/*
|
||||
* Illegal identifiers - consider using --renameillegalidents true
|
||||
*/
|
||||
public abstract class BDynamicPxView
|
||||
extends BAbstractPxView {
|
||||
public static final Type TYPE;
|
||||
static /* synthetic */ Class class$javax$baja$agent$BDynamicPxView;
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public abstract String generateXml(Object var1, Context var2);
|
||||
|
||||
public String getUniqueId(OrdTarget ordTarget) {
|
||||
return ordTarget.getOrd().toString();
|
||||
}
|
||||
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
public BDynamicPxView(BIcon bIcon, BPermissions bPermissions, BTypeSpec bTypeSpec) {
|
||||
super(bIcon, bPermissions, bTypeSpec);
|
||||
}
|
||||
|
||||
public BDynamicPxView() {
|
||||
}
|
||||
|
||||
static {
|
||||
Class clazz = class$javax$baja$agent$BDynamicPxView;
|
||||
if (clazz == null) {
|
||||
clazz = class$javax$baja$agent$BDynamicPxView = BDynamicPxView.class("[Ljavax.baja.agent.BDynamicPxView;", false);
|
||||
}
|
||||
TYPE = Sys.loadType(clazz);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package javax.baja.agent;
|
||||
|
||||
import javax.baja.sys.BInterface;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
|
||||
public interface BIAgent
|
||||
extends BInterface {
|
||||
public static final Type TYPE;
|
||||
|
||||
static {
|
||||
Class clazz = 1.class$javax$baja$agent$BIAgent;
|
||||
if (clazz == null) {
|
||||
clazz = 1.class$javax$baja$agent$BIAgent = 1.class("[Ljavax.baja.agent.BIAgent;", false);
|
||||
}
|
||||
TYPE = Sys.loadType(clazz);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package javax.baja.agent;
|
||||
|
||||
import javax.baja.agent.BAbstractPxView;
|
||||
import javax.baja.naming.BOrd;
|
||||
import javax.baja.security.BPermissions;
|
||||
import javax.baja.sys.BFacets;
|
||||
import javax.baja.sys.BIcon;
|
||||
import javax.baja.sys.BValue;
|
||||
import javax.baja.sys.Property;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.util.BTypeSpec;
|
||||
|
||||
/*
|
||||
* Illegal identifiers - consider using --renameillegalidents true
|
||||
*/
|
||||
public class BPxView
|
||||
extends BAbstractPxView {
|
||||
public static final Property pxFile = BPxView.newProperty(0, BOrd.NULL, BFacets.make("targetType", "file:PxFile"));
|
||||
public static final Type TYPE;
|
||||
static /* synthetic */ Class class$javax$baja$agent$BPxView;
|
||||
|
||||
public BOrd getPxFile() {
|
||||
return (BOrd)this.get(pxFile);
|
||||
}
|
||||
|
||||
public void setPxFile(BOrd bOrd) {
|
||||
this.set(pxFile, (BValue)bOrd, null);
|
||||
}
|
||||
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
public BPxView(BIcon bIcon, BOrd bOrd, BPermissions bPermissions, BTypeSpec bTypeSpec) {
|
||||
super(bIcon, bPermissions, bTypeSpec);
|
||||
this.setPxFile(bOrd);
|
||||
}
|
||||
|
||||
public BPxView(BOrd bOrd) {
|
||||
this.setPxFile(bOrd);
|
||||
}
|
||||
|
||||
public BPxView() {
|
||||
}
|
||||
|
||||
static {
|
||||
Class clazz = class$javax$baja$agent$BPxView;
|
||||
if (clazz == null) {
|
||||
clazz = class$javax$baja$agent$BPxView = BPxView.class("[Ljavax.baja.agent.BPxView;", false);
|
||||
}
|
||||
TYPE = Sys.loadType(clazz);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package javax.baja.agent;
|
||||
|
||||
import javax.baja.sys.BajaRuntimeException;
|
||||
|
||||
public class NoSuchAgentException
|
||||
extends BajaRuntimeException {
|
||||
public NoSuchAgentException(String string, Throwable throwable) {
|
||||
super(string, throwable);
|
||||
}
|
||||
|
||||
public NoSuchAgentException(String string) {
|
||||
super(string);
|
||||
}
|
||||
|
||||
public NoSuchAgentException(Throwable throwable) {
|
||||
super(throwable);
|
||||
}
|
||||
|
||||
public NoSuchAgentException() {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user