mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
4585 5580 fix storing of 'use central repository setting
This commit is contained in:
parent
e70e1e8cfc
commit
3e7dd488ae
@ -170,8 +170,6 @@ public class EamDbUtil {
|
|||||||
* Upgrade the current Central Reposity schema to the newest version. If the
|
* Upgrade the current Central Reposity schema to the newest version. If the
|
||||||
* upgrade fails, the Central Repository will be disabled and the current
|
* upgrade fails, the Central Repository will be disabled and the current
|
||||||
* settings will be cleared.
|
* settings will be cleared.
|
||||||
*
|
|
||||||
* @return true if the upgrade succeeds, false otherwise.
|
|
||||||
*/
|
*/
|
||||||
@Messages({"EamDbUtil.centralRepoUpgradeFailed.message=Failed to upgrade central repository. It has been disabled."})
|
@Messages({"EamDbUtil.centralRepoUpgradeFailed.message=Failed to upgrade central repository. It has been disabled."})
|
||||||
public static void upgradeDatabase() throws EamDbException {
|
public static void upgradeDatabase() throws EamDbException {
|
||||||
@ -201,8 +199,6 @@ public class EamDbUtil {
|
|||||||
} catch (EamDbException ex2) {
|
} catch (EamDbException ex2) {
|
||||||
LOGGER.log(Level.SEVERE, "Error shutting down central repo connection pool", ex2);
|
LOGGER.log(Level.SEVERE, "Error shutting down central repo connection pool", ex2);
|
||||||
}
|
}
|
||||||
setUseCentralRepo(false);
|
|
||||||
|
|
||||||
EamDbPlatformEnum.setSelectedPlatform(EamDbPlatformEnum.DISABLED.name());
|
EamDbPlatformEnum.setSelectedPlatform(EamDbPlatformEnum.DISABLED.name());
|
||||||
EamDbPlatformEnum.saveSelectedPlatform();
|
EamDbPlatformEnum.saveSelectedPlatform();
|
||||||
String messageForDialog = Bundle.EamDbUtil_centralRepoUpgradeFailed_message();
|
String messageForDialog = Bundle.EamDbUtil_centralRepoUpgradeFailed_message();
|
||||||
|
@ -117,7 +117,7 @@
|
|||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Events>
|
<Events>
|
||||||
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="useCentralRepoStateChanged"/>
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbUseCentralRepoActionPerformed"/>
|
||||||
</Events>
|
</Events>
|
||||||
</Component>
|
</Component>
|
||||||
<Container class="javax.swing.JPanel" name="pnDatabaseConfiguration">
|
<Container class="javax.swing.JPanel" name="pnDatabaseConfiguration">
|
||||||
|
@ -147,9 +147,9 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
|||||||
org.openide.awt.Mnemonics.setLocalizedText(lbCentralRepository, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.lbCentralRepository.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(lbCentralRepository, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.lbCentralRepository.text")); // NOI18N
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(cbUseCentralRepo, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.cbUseCentralRepo.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(cbUseCentralRepo, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.cbUseCentralRepo.text")); // NOI18N
|
||||||
cbUseCentralRepo.addChangeListener(new javax.swing.event.ChangeListener() {
|
cbUseCentralRepo.addActionListener(new java.awt.event.ActionListener() {
|
||||||
public void stateChanged(javax.swing.event.ChangeEvent evt) {
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
useCentralRepoStateChanged(evt);
|
cbUseCentralRepoActionPerformed(evt);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -424,9 +424,9 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
|||||||
private void bnDbConfigureActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnDbConfigureActionPerformed
|
private void bnDbConfigureActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnDbConfigureActionPerformed
|
||||||
store();
|
store();
|
||||||
EamDbSettingsDialog dialog = new EamDbSettingsDialog();
|
EamDbSettingsDialog dialog = new EamDbSettingsDialog();
|
||||||
updateDatabase();
|
|
||||||
load(); // reload db settings content and update buttons
|
|
||||||
if (dialog.wasConfigurationChanged()) {
|
if (dialog.wasConfigurationChanged()) {
|
||||||
|
updateDatabase();
|
||||||
|
load(); // reload db settings content and update buttons
|
||||||
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
||||||
}
|
}
|
||||||
}//GEN-LAST:event_bnDbConfigureActionPerformed
|
}//GEN-LAST:event_bnDbConfigureActionPerformed
|
||||||
@ -441,14 +441,14 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
|||||||
ManageCasesDialog.displayManageCasesDialog();
|
ManageCasesDialog.displayManageCasesDialog();
|
||||||
}//GEN-LAST:event_showCasesButtonActionPerformed
|
}//GEN-LAST:event_showCasesButtonActionPerformed
|
||||||
|
|
||||||
private void useCentralRepoStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_useCentralRepoStateChanged
|
private void cbUseCentralRepoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbUseCentralRepoActionPerformed
|
||||||
//if saved setting is disabled checkbox should be disabled already
|
//if saved setting is disabled checkbox should be disabled already
|
||||||
store();
|
store();
|
||||||
updateDatabase();
|
updateDatabase();
|
||||||
load();
|
load();
|
||||||
this.ingestStateUpdated(Case.isCaseOpen());
|
this.ingestStateUpdated(Case.isCaseOpen());
|
||||||
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
||||||
}//GEN-LAST:event_useCentralRepoStateChanged
|
}//GEN-LAST:event_cbUseCentralRepoActionPerformed
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Messages({"GlobalSettingsPanel.validationerrMsg.mustConfigure=Configure the database to enable this module."})
|
@Messages({"GlobalSettingsPanel.validationerrMsg.mustConfigure=Configure the database to enable this module."})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user