Skip to content

Commit

Permalink
removed xjustiz viewer. close #1384
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Nov 7, 2023
1 parent 244ce4c commit ec27bc7
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 91 deletions.
11 changes: 0 additions & 11 deletions j-lawyer-client/src/com/jdimension/jlawyer/client/JKanzleiGUI.form
Original file line number Diff line number Diff line change
Expand Up @@ -939,17 +939,6 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mnuForumActionPerformed"/>
</Events>
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="mnuXjustizViewer">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/fileimport.png"/>
</Property>
<Property name="text" type="java.lang.String" value="XJustizViewer herunterladen"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mnuXjustizViewerActionPerformed"/>
</Events>
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="mnuAbout">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
Expand Down
67 changes: 0 additions & 67 deletions j-lawyer-client/src/com/jdimension/jlawyer/client/JKanzleiGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,6 @@ private void initComponents() {
mnuDocumentMonitor = new javax.swing.JMenuItem();
mnuOnlineHelp = new javax.swing.JMenuItem();
mnuForum = new javax.swing.JMenuItem();
mnuXjustizViewer = new javax.swing.JMenuItem();
mnuAbout = new javax.swing.JMenuItem();

setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
Expand Down Expand Up @@ -1999,15 +1998,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
});
mnuHelp.add(mnuForum);

mnuXjustizViewer.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/fileimport.png"))); // NOI18N
mnuXjustizViewer.setText("XJustizViewer herunterladen");
mnuXjustizViewer.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
mnuXjustizViewerActionPerformed(evt);
}
});
mnuHelp.add(mnuXjustizViewer);

mnuAbout.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/info.png"))); // NOI18N
mnuAbout.setText(bundle.getString("menu.?.about")); // NOI18N
mnuAbout.addActionListener(new java.awt.event.ActionListener() {
Expand Down Expand Up @@ -2497,62 +2487,6 @@ private void mnuFormsManagerActionPerformed(java.awt.event.ActionEvent evt) {//G
}
}//GEN-LAST:event_mnuFormsManagerActionPerformed

private void mnuXjustizViewerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuXjustizViewerActionPerformed

if (!(SystemUtils.isWindows())) {
JOptionPane.showMessageDialog(this, "Der XJustiz-Viewer ist aktuell nur für Windowssysteme verfügbar.", "XJustiz-Viewer herunterladen", JOptionPane.INFORMATION_MESSAGE);
return;
}

String downloadUrl = ClientSettings.getInstance().getUrlXjustiz();
if (downloadUrl == null) {
log.warn("download url for XJustiz Viewer is null");
return;
}

JOptionPane.showMessageDialog(this, "Der XJustiz-Viewer ist ein Softwareprodukt von Uwe Möller / Henning Müller ervjustiz.de." + System.lineSeparator() + "Er ist ausschließlich für die Nutzung durch Rechtsanwältinnen und Rechtsanwälte sowie deren Mitarbeiterinnen und Mitarbeiter freigegeben." + System.lineSeparator() + "Jede darüberhinausgehende Nutzung ist nicht erlaubt.", "XJustiz-Viewer Nutzungsbedingungen", JOptionPane.INFORMATION_MESSAGE);

try {
String home = System.getProperty("user.home");
File dir = new File(home + "/Downloads/");
dir.mkdirs();

File file = new File(home + "/Downloads/xjustiz.exe");
if (file.exists()) {
file.delete();
}

new Thread(() -> {
try (FileOutputStream fout = new FileOutputStream(file)) {
ThreadUtils.showInformationDialog(EditorsRegistry.getInstance().getMainWindow(), "XJustiz-Viewer wird im Hintergrund heruntergeladen...", "Download gestartet");
URL updateURL = new URL(downloadUrl);
URLConnection urlCon = updateURL.openConnection();
urlCon.setRequestProperty("User-Agent", "j-lawyer Client v" + VersionUtils.getFullClientVersion());


InputStream is = urlCon.getInputStream();
byte[] buffer = new byte[1024];
int len = 0;
while ((len = is.read(buffer)) > -1) {
fout.write(buffer, 0, len);
}
is.close();
ThreadUtils.showInformationDialog(EditorsRegistry.getInstance().getMainWindow(), "XJustiz-Viewer zur Installation verfügbar: " + file.getAbsolutePath(), "Download abgeschlossen");

} catch (Exception ex) {
log.error(ex);
ThreadUtils.showErrorDialog(EditorsRegistry.getInstance().getMainWindow(), "Fehler beim Herunterladen des XJustiz-Viewers", "Download-Fehler");

}
}).start();

} catch (Exception ex) {
log.error(ex);
JOptionPane.showMessageDialog(this, "Fehler beim Herunterladen des XJustiz-Viewers", "Download-Fehler", JOptionPane.INFORMATION_MESSAGE);

}
}//GEN-LAST:event_mnuXjustizViewerActionPerformed

private void mnuGroupsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuGroupsActionPerformed

if (checkAdmin()) {
Expand Down Expand Up @@ -2970,7 +2904,6 @@ public static void main(String args[]) {
private javax.swing.JMenuItem mnuVoipSoftphoneSettings;
private javax.swing.JMenuItem mnuWebHooks;
private javax.swing.JMenuItem mnuWordProcessor;
private javax.swing.JMenuItem mnuXjustizViewer;
private javax.swing.JMenuItem mnuZipCodeImport;
private com.jdimension.jlawyer.client.modulebar.ModuleBar moduleBar;
private javax.swing.JLabel statusLabel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -825,10 +825,6 @@ public void run() {
String urlHelp = nl.item(0).getTextContent();
settings.setUrlHelp(urlHelp);

nl = doc.getElementsByTagName("urlxjustiz");
String urlXjustiz = nl.item(0).getTextContent();
settings.setUrlXjustiz(urlXjustiz);

nl = doc.getElementsByTagName("bea-enabled-versions");
String beaEnabledVersions = nl.item(0).getTextContent();
set.setSetting(ServerSettings.SERVERCONF_BEAENABLEDVERSIONS, beaEnabledVersions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
</Property>
<Property name="text" type="java.lang.String" value="XJustiz-Viewer"/>
<Property name="toolTipText" type="java.lang.String" value="XJustiz-Viewer &#xf6;ffnen"/>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cmdOpenXjustizViewerActionPerformed"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ private void initComponents() {
cmdOpenXjustizViewer.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons16/fileicons/file_type_xml.png"))); // NOI18N
cmdOpenXjustizViewer.setText("XJustiz-Viewer");
cmdOpenXjustizViewer.setToolTipText("XJustiz-Viewer öffnen");
cmdOpenXjustizViewer.setEnabled(false);
cmdOpenXjustizViewer.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdOpenXjustizViewerActionPerformed(evt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,6 @@ public class ClientSettings {

private String urlForum="https://www.j-lawyer.org/?page_id=673";
private String urlHelp="https://www.j-lawyer.org/?page_id=11";
private String urlXjustiz=null;

/**
* Creates a new instance of ClientSettings
Expand Down Expand Up @@ -1132,14 +1131,6 @@ public void setUrlHelp(String urlHelp) {
this.urlHelp = urlHelp;
}

public String getUrlXjustiz() {
return this.urlXjustiz;
}

public void setUrlXjustiz(String url) {
this.urlXjustiz=url;
}

/**
* @return the countries
*/
Expand Down

0 comments on commit ec27bc7

Please sign in to comment.