niagara-ax/modules/cfr_output/com/tridium/platcrypto/ui/BExemptionChangedDialog.java
2026-03-17 13:31:18 -07:00

193 lines
7.4 KiB
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.crypto.core.cert.CertValidationResult
* com.tridium.crypto.core.cert.NHostExemption
* com.tridium.crypto.core.cert.NX509Certificate
* javax.baja.gx.BImage
* javax.baja.sys.Action
* javax.baja.sys.BComponent
* javax.baja.sys.BValue
* javax.baja.sys.Slot
* javax.baja.sys.Sys
* javax.baja.sys.Type
* javax.baja.ui.BButton
* javax.baja.ui.BWidget
* javax.baja.ui.enums.BHalign
* javax.baja.ui.event.BWidgetEvent
* javax.baja.ui.event.BWindowEvent
* javax.baja.ui.pane.BBorderPane
* javax.baja.ui.pane.BEdgePane
* javax.baja.ui.pane.BGridPane
* javax.baja.ui.wizard.BWizardHeader
*/
package com.tridium.platcrypto.ui;
import com.tridium.crypto.core.cert.CertValidationResult;
import com.tridium.crypto.core.cert.NHostExemption;
import com.tridium.crypto.core.cert.NX509Certificate;
import com.tridium.platcrypto.ui.BCertViewDialog;
import com.tridium.platcrypto.ui.BX509CertificateChangedPane;
import com.tridium.platcrypto.ui.BX509ExtensionChangedPane;
import javax.baja.gx.BImage;
import javax.baja.sys.Action;
import javax.baja.sys.BComponent;
import javax.baja.sys.BValue;
import javax.baja.sys.Slot;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
import javax.baja.ui.BButton;
import javax.baja.ui.BWidget;
import javax.baja.ui.enums.BHalign;
import javax.baja.ui.event.BWidgetEvent;
import javax.baja.ui.event.BWindowEvent;
import javax.baja.ui.pane.BBorderPane;
import javax.baja.ui.pane.BEdgePane;
import javax.baja.ui.pane.BGridPane;
import javax.baja.ui.wizard.BWizardHeader;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BExemptionChangedDialog
extends BCertViewDialog {
public static final Action cancelButtonPressed = BExemptionChangedDialog.newAction((int)0, (BValue)new BWidgetEvent(), null);
public static final Type TYPE;
protected static BImage logo;
protected boolean hostNameMismatch;
protected boolean unknownIdentity;
protected NX509Certificate oldCert;
protected BButton cancelButton;
protected boolean closeResult;
static /* synthetic */ Class class$com$tridium$platcrypto$ui$BExemptionChangedDialog;
public void cancelButtonPressed(BWidgetEvent bWidgetEvent) {
this.invoke(cancelButtonPressed, (BValue)bWidgetEvent, null);
}
public Type getType() {
return TYPE;
}
public static boolean show(BWidget bWidget, CertValidationResult certValidationResult) throws Exception {
BExemptionChangedDialog bExemptionChangedDialog = new BExemptionChangedDialog(bWidget, certValidationResult);
bExemptionChangedDialog.setBoundsCenteredOnOwner();
bExemptionChangedDialog.setResizable(false);
bExemptionChangedDialog.open();
return bExemptionChangedDialog.getResult();
}
public static boolean show(BWidget bWidget, NHostExemption nHostExemption) throws Exception {
BExemptionChangedDialog bExemptionChangedDialog = new BExemptionChangedDialog(bWidget, nHostExemption);
bExemptionChangedDialog.setBoundsCenteredOnOwner();
bExemptionChangedDialog.setResizable(false);
bExemptionChangedDialog.open();
return bExemptionChangedDialog.getResult();
}
protected BWidget buildHeader() {
return new BWizardHeader(logo, this.oldCert.getSubject() + " / " + this.cert.getSubject(), lex.getText("exempt.changed.dialog.info", new Object[]{this.cert.getSubject()}));
}
protected BWidget buildContent() throws Exception {
BEdgePane bEdgePane = new BEdgePane();
bEdgePane.setCenter(super.buildContent());
return bEdgePane;
}
protected BWidget buildProperties() {
BX509CertificateChangedPane bX509CertificateChangedPane = new BX509CertificateChangedPane(this.oldCert, this.cert);
return bX509CertificateChangedPane;
}
protected BWidget buildExtensions() throws Exception {
BX509ExtensionChangedPane bX509ExtensionChangedPane = new BX509ExtensionChangedPane(this.oldCert.getExtensions(), this.cert.getExtensions());
return bX509ExtensionChangedPane;
}
protected BWidget buildButtons() {
BGridPane bGridPane = new BGridPane(2);
bGridPane.setColumnAlign(BHalign.fill);
bGridPane.setUniformColumnWidth(true);
this.okButton = new BButton(lex.getText("exempt.prompt.dialog.accept"));
bGridPane.add(null, (BValue)this.okButton);
this.linkTo("linkA", (BComponent)this.okButton, (Slot)BButton.actionPerformed, (Slot)okButtonPressed);
this.okButton.setEnabled(true);
this.cancelButton = new BButton(lex.getText("exempt.prompt.dialog.reject"));
bGridPane.add(null, (BValue)this.cancelButton);
this.linkTo("linkB", (BComponent)this.cancelButton, (Slot)BButton.actionPerformed, (Slot)cancelButtonPressed);
this.cancelButton.setEnabled(true);
return new BBorderPane((BWidget)bGridPane, 7.0, 0.0, 0.0, 0.0);
}
public void windowClosing(BWindowEvent bWindowEvent) {
this.close();
}
public void doOkButtonPressed(BWidgetEvent bWidgetEvent) {
this.closeResult = true;
this.close();
}
public void doCancelButtonPressed(BWidgetEvent bWidgetEvent) {
this.closeResult = false;
this.close();
}
public boolean getResult() {
return this.closeResult;
}
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 final /* synthetic */ void this() {
this.hostNameMismatch = false;
this.unknownIdentity = false;
this.closeResult = false;
}
private BExemptionChangedDialog(BWidget bWidget, CertValidationResult certValidationResult) throws Exception {
super(bWidget, lex.getText("exempt.changed.dialog.title"));
this.this();
this.oldCert = certValidationResult.getOrigCert();
this.cert = certValidationResult.getNewCert();
this.hostNameMismatch = certValidationResult.isHostnameVerified() ^ true;
this.unknownIdentity = certValidationResult.isValidCertChain() ^ true;
this.setContent(this.buildDialog());
this.setDefaultButton(this.okButton);
}
private BExemptionChangedDialog(BWidget bWidget, NHostExemption nHostExemption) throws Exception {
super(bWidget, lex.getText("exempt.changed.dialog.title"));
this.this();
this.oldCert = nHostExemption.getCertificate();
this.cert = nHostExemption.getChanged();
this.hostNameMismatch = false;
this.unknownIdentity = false;
this.setContent(this.buildDialog());
this.setDefaultButton(this.okButton);
}
static {
Class clazz = class$com$tridium$platcrypto$ui$BExemptionChangedDialog;
if (clazz == null) {
clazz = class$com$tridium$platcrypto$ui$BExemptionChangedDialog = BExemptionChangedDialog.class("[Lcom.tridium.platcrypto.ui.BExemptionChangedDialog;", false);
}
TYPE = Sys.loadType((Class)clazz);
logo = BImage.make((String)lex.get("cert.warning.x32.icon", "module://icons/x32/warning.png"));
}
}