95 lines
3.4 KiB
Java
95 lines
3.4 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* com.tridium.crypto.core.io.ICoreProviderInfo
|
|
* com.tridium.crypto.core.provider.IProvider
|
|
* com.tridium.crypto.core.provider.NProvider
|
|
* com.tridium.platform.daemon.BDaemonSession
|
|
* com.tridium.platform.daemon.message.DaemonMessage
|
|
* javax.baja.sys.Sys
|
|
* javax.baja.sys.Type
|
|
* javax.baja.xml.XElem
|
|
* javax.baja.xml.XParser
|
|
*/
|
|
package com.tridium.platcrypto.daemon;
|
|
|
|
import com.tridium.crypto.core.io.ICoreProviderInfo;
|
|
import com.tridium.crypto.core.provider.IProvider;
|
|
import com.tridium.crypto.core.provider.NProvider;
|
|
import com.tridium.platcrypto.daemon.BPlatCryptoBase;
|
|
import com.tridium.platcrypto.daemon.messages.GetProviderMessage;
|
|
import com.tridium.platform.daemon.BDaemonSession;
|
|
import com.tridium.platform.daemon.message.DaemonMessage;
|
|
import java.io.InputStream;
|
|
import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.Enumeration;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
import javax.baja.xml.XElem;
|
|
import javax.baja.xml.XParser;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public class BPlatProviderInfo
|
|
extends BPlatCryptoBase
|
|
implements ICoreProviderInfo {
|
|
public static final Type TYPE;
|
|
static /* synthetic */ Class class$com$tridium$platcrypto$daemon$BPlatProviderInfo;
|
|
|
|
public Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public IProvider getProvider(String string) throws Exception {
|
|
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)new GetProviderMessage(string));
|
|
XElem[] xElemArray = XParser.make((InputStream)inputStream).parse().elems("provider");
|
|
if (xElemArray != null && xElemArray.length > 0) {
|
|
return NProvider.decodeFromString((String)xElemArray[0].text().string());
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public Enumeration providers() throws Exception {
|
|
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)new GetProviderMessage());
|
|
XElem[] xElemArray = XParser.make((InputStream)inputStream).parse().elems("provider");
|
|
ArrayList<NProvider> arrayList = new ArrayList<NProvider>();
|
|
if (xElemArray != null && xElemArray.length > 0) {
|
|
arrayList.add(NProvider.decodeFromString((String)xElemArray[0].text().string()));
|
|
}
|
|
return Collections.enumeration(arrayList);
|
|
}
|
|
|
|
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 BPlatProviderInfo() throws UnsupportedOperationException {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
public BPlatProviderInfo(BDaemonSession bDaemonSession) {
|
|
super(bDaemonSession);
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$com$tridium$platcrypto$daemon$BPlatProviderInfo;
|
|
if (clazz == null) {
|
|
clazz = class$com$tridium$platcrypto$daemon$BPlatProviderInfo = BPlatProviderInfo.class("[Lcom.tridium.platcrypto.daemon.BPlatProviderInfo;", false);
|
|
}
|
|
TYPE = Sys.loadType((Class)clazz);
|
|
}
|
|
}
|
|
|