mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
code review updates
This commit is contained in:
parent
2ea37fce91
commit
a365b39268
@ -221,5 +221,5 @@ Detail\: \n\
|
||||
Cannot open a non-Autopsy config file (at {1}).
|
||||
XMLCaseManagement.open.msgDlg.notAutCase.title=Error
|
||||
AddImageWizardIngestConfigPanel.CANCEL_BUTTON.text=Cancel
|
||||
NewCaseVisualPanel1.rbLocalCase.text=Single-user
|
||||
NewCaseVisualPanel1.rbSharedCase.text=Multi-user
|
||||
NewCaseVisualPanel1.rbSingleUserCase.text=Single-user
|
||||
NewCaseVisualPanel1.rbMultiUserCase.text=Multi-user
|
||||
|
@ -79,6 +79,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
* name by using String returned by toString() method on a specific event.
|
||||
*/
|
||||
public enum Events {
|
||||
|
||||
/**
|
||||
* Property name that indicates the name of the current case has
|
||||
* changed. When a case is opened, "old name" is empty string and "new
|
||||
@ -132,13 +133,13 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
};
|
||||
|
||||
/**
|
||||
* This enum describes the type of case, either Local (standalone) or Shared
|
||||
* (using PostgreSql)
|
||||
* This enum describes the type of case, either single-user (standalone) or
|
||||
* multi-user (using PostgreSql)
|
||||
*/
|
||||
public enum CaseType {
|
||||
|
||||
LOCAL("Single-user case"),
|
||||
SHARED("Multi-user case");
|
||||
SINGLE_USER_CASE("Single-user case"),
|
||||
MULTI_USER_CASE("Multi-user case");
|
||||
|
||||
private final String caseName;
|
||||
|
||||
@ -179,8 +180,6 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
private static final Logger logger = Logger.getLogger(Case.class.getName());
|
||||
static final String CASE_EXTENSION = "aut"; //NON-NLS
|
||||
static final String CASE_DOT_EXTENSION = "." + CASE_EXTENSION;
|
||||
private CaseType caseType;
|
||||
private boolean isRemote=false;
|
||||
|
||||
// we cache if the case has data in it yet since a few places ask for it and we dont' need to keep going to DB
|
||||
private boolean hasData = false;
|
||||
@ -188,7 +187,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
/**
|
||||
* Constructor for the Case class
|
||||
*/
|
||||
private Case(String name, String number, String examiner, String configFilePath, XMLCaseManagement xmlcm, SleuthkitCase db, boolean isRemote) {
|
||||
private Case(String name, String number, String examiner, String configFilePath, XMLCaseManagement xmlcm, SleuthkitCase db) {
|
||||
this.name = name;
|
||||
this.number = number;
|
||||
this.examiner = examiner;
|
||||
@ -196,7 +195,6 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
this.xmlcm = xmlcm;
|
||||
this.db = db;
|
||||
this.services = new Services(db);
|
||||
this.isRemote = isRemote;
|
||||
db.addErrorObserver(this);
|
||||
}
|
||||
|
||||
@ -232,7 +230,6 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
*
|
||||
*/
|
||||
private static void changeCase(Case newCase) {
|
||||
/// KDM ensure this handles both databases properly
|
||||
// close the existing case
|
||||
Case oldCase = Case.currentCase;
|
||||
Case.currentCase = null;
|
||||
@ -241,8 +238,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
|
||||
try {
|
||||
pcs.firePropertyChange(Events.CURRENT_CASE.toString(), oldCase, null);
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Case listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(Case.class, "Case.moduleErr"),
|
||||
NbBundle.getMessage(Case.class,
|
||||
@ -253,8 +249,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
|
||||
try {
|
||||
pcs.firePropertyChange(Events.NAME.toString(), oldCase.name, "");
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Case listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(Case.class, "Case.moduleErr"),
|
||||
NbBundle.getMessage(Case.class,
|
||||
@ -270,8 +265,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
|
||||
try {
|
||||
pcs.firePropertyChange(Events.CURRENT_CASE.toString(), null, currentCase);
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Case listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(Case.class, "Case.moduleErr"),
|
||||
NbBundle.getMessage(Case.class,
|
||||
@ -280,11 +274,9 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
}
|
||||
doCaseChange(currentCase);
|
||||
|
||||
|
||||
try {
|
||||
pcs.firePropertyChange(Events.NAME.toString(), "", currentCase.name);
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Case threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(Case.class, "Case.moduleErr"),
|
||||
NbBundle.getMessage(Case.class,
|
||||
@ -304,21 +296,35 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new case (create the XML config file and database)
|
||||
* Creates a new case (create the XML config file and database). Overload
|
||||
* for API consistency, defaults to a single-user case.
|
||||
*
|
||||
* @param caseDir The directory to store case data in. Will be created if
|
||||
* it doesn't already exist. If it exists, it should have
|
||||
* all of the needed sub dirs that createCaseDirectory()
|
||||
* will create.
|
||||
* @param caseDir The directory to store case data in. Will be created if it
|
||||
* doesn't already exist. If it exists, it should have all of the needed sub
|
||||
* dirs that createCaseDirectory() will create.
|
||||
* @param caseName the name of case
|
||||
* @param caseNumber the case number
|
||||
* @param examiner the examiner for this case
|
||||
* @param caseType the type of case, local or shared
|
||||
* @throws org.sleuthkit.autopsy.casemodule.CaseActionException
|
||||
*/
|
||||
public static void create(String caseDir, String caseName, String caseNumber, String examiner) throws CaseActionException {
|
||||
create(caseDir, caseName, caseNumber, examiner, CaseType.SINGLE_USER_CASE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new case (create the XML config file and database)
|
||||
*
|
||||
* @param caseDir The directory to store case data in. Will be created if it
|
||||
* doesn't already exist. If it exists, it should have all of the needed sub
|
||||
* dirs that createCaseDirectory() will create.
|
||||
* @param caseName the name of case
|
||||
* @param caseNumber the case number
|
||||
* @param examiner the examiner for this case
|
||||
* @param caseType the type of case, single-user or multi-user
|
||||
*/
|
||||
public static void create(String caseDir, String caseName, String caseNumber, String examiner, CaseType caseType) throws CaseActionException {
|
||||
logger.log(Level.INFO, "Creating new case.\ncaseDir: {0}\ncaseName: {1}", new Object[]{caseDir, caseName}); //NON-NLS
|
||||
|
||||
boolean isRemote=false;
|
||||
// create case directory if it doesn't already exist.
|
||||
if (new File(caseDir).exists() == false) {
|
||||
Case.createCaseDirectory(caseDir);
|
||||
@ -330,36 +336,31 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
|
||||
String dbName = null;
|
||||
// figure out the database name
|
||||
if (caseType == CaseType.LOCAL) {
|
||||
if (caseType == CaseType.SINGLE_USER_CASE) {
|
||||
dbName = caseDir + File.separator + "autopsy.db"; //NON-NLS
|
||||
isRemote=false;
|
||||
} else if (caseType == CaseType.SHARED) {
|
||||
} else if (caseType == CaseType.MULTI_USER_CASE) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss");
|
||||
dbName = caseName + "_" + dateFormat.format(new Date());
|
||||
isRemote=true;
|
||||
}
|
||||
|
||||
xmlcm.create(caseDir, caseName, examiner, caseNumber, caseType, dbName); // create a new XML config file
|
||||
xmlcm.writeFile();
|
||||
|
||||
|
||||
SleuthkitCase db = null;
|
||||
try {
|
||||
if(isRemote==true)
|
||||
{
|
||||
db = SleuthkitCase.newCase(dbName, UserPreferences.getDatabaseConnectionInfo());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (caseType == CaseType.SINGLE_USER_CASE) {
|
||||
db = SleuthkitCase.newCase(dbName);
|
||||
}
|
||||
else if (caseType == CaseType.MULTI_USER_CASE) {
|
||||
db = SleuthkitCase.newCase(dbName, UserPreferences.getDatabaseConnectionInfo());
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error creating a case: " + caseName + " in dir " + caseDir, ex); //NON-NLS
|
||||
throw new CaseActionException(
|
||||
NbBundle.getMessage(Case.class, "Case.create.exception.msg", caseName, caseDir), ex);
|
||||
}
|
||||
|
||||
Case newCase = new Case(caseName, caseNumber, examiner, configFilePath, xmlcm, db, isRemote); /// KDM TODO
|
||||
Case newCase = new Case(caseName, caseNumber, examiner, configFilePath, xmlcm, db);
|
||||
changeCase(newCase);
|
||||
}
|
||||
|
||||
@ -372,7 +373,6 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
*/
|
||||
public static void open(String configFilePath) throws CaseActionException {
|
||||
logger.log(Level.INFO, "Opening case.\nconfigFilePath: {0}", configFilePath); //NON-NLS
|
||||
boolean isRemote=false;
|
||||
try {
|
||||
XMLCaseManagement xmlcm = new XMLCaseManagement();
|
||||
|
||||
@ -386,9 +386,8 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
String caseDir = xmlcm.getCaseDirectory();
|
||||
SleuthkitCase db;
|
||||
|
||||
if (caseType == CaseType.LOCAL) {
|
||||
if (caseType == CaseType.SINGLE_USER_CASE) {
|
||||
// if the caseName is "", case / config file can't be opened
|
||||
isRemote=false;
|
||||
if (caseName.equals("")) {
|
||||
throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.open.exception.blankCase.msg"));
|
||||
}
|
||||
@ -402,9 +401,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
NbBundle.getMessage(Case.class, "Case.open.msgDlg.updated.title"),
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
isRemote=true;
|
||||
} else {
|
||||
db = SleuthkitCase.openCase(xmlcm.getDatabaseName(), UserPreferences.getDatabaseConnectionInfo());
|
||||
if (null != db.getBackupDatabasePath()) {
|
||||
JOptionPane.showMessageDialog(null,
|
||||
@ -417,7 +414,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
|
||||
checkImagesExist(db);
|
||||
|
||||
Case openedCase = new Case(caseName, caseNumber, examiner, configFilePath, xmlcm, db, isRemote);
|
||||
Case openedCase = new Case(caseName, caseNumber, examiner, configFilePath, xmlcm, db);
|
||||
|
||||
changeCase(openedCase);
|
||||
|
||||
@ -497,8 +494,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
|
||||
try {
|
||||
pcs.firePropertyChange(Events.DATA_SOURCE_ADDED.toString(), null, newImage); // the new value is the instance of the image
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Case listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
@ -534,8 +530,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
|
||||
try {
|
||||
pcs.firePropertyChange(Events.DATA_SOURCE_ADDED.toString(), null, newDataSource);
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Case threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
@ -620,8 +615,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
RecentCases.getInstance().updateRecentCase(oldCaseName, oldPath, newCaseName, newPath); // update the recent case
|
||||
try {
|
||||
pcs.firePropertyChange(Events.NAME.toString(), oldCaseName, newCaseName);
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Case listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
@ -647,8 +641,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
examiner = newExaminer;
|
||||
try {
|
||||
pcs.firePropertyChange(Events.EXAMINER.toString(), oldExaminer, newExaminer);
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Case listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
@ -673,8 +666,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
|
||||
try {
|
||||
pcs.firePropertyChange(Events.NUMBER.toString(), oldCaseNumber, newCaseNumber);
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Case listener threw exception", e); //NON-NLS
|
||||
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
@ -1191,7 +1183,6 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
//clear pending notifications
|
||||
MessageNotifyUtil.Notify.clear();
|
||||
|
||||
|
||||
Frame f = WindowManager.getDefault().getMainWindow();
|
||||
f.setTitle(Case.getAppName()); // set the window name to just application name
|
||||
|
||||
@ -1203,7 +1194,6 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
//log memory usage after case changed
|
||||
logger.log(Level.INFO, PlatformUtil.getAllMemUsageInfo());
|
||||
|
||||
|
||||
}
|
||||
|
||||
//case name change helper
|
||||
@ -1232,8 +1222,10 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
/**
|
||||
* Adds a report to the case.
|
||||
*
|
||||
* @param [in] localPath The path of the report file, must be in the case directory or one of its subdirectories.
|
||||
* @param [in] sourceModuleName The name of the module that created the report.
|
||||
* @param [in] localPath The path of the report file, must be in the case
|
||||
* directory or one of its subdirectories.
|
||||
* @param [in] sourceModuleName The name of the module that created the
|
||||
* report.
|
||||
* @param [in] reportName The report name, may be empty.
|
||||
* @return A Report data transfer object (DTO) for the new row.
|
||||
* @throws TskCoreException
|
||||
@ -1254,6 +1246,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
|
||||
/**
|
||||
* Returns if the case has data in it yet.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean hasData() {
|
||||
@ -1266,23 +1259,4 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
}
|
||||
return hasData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the case is a remote case, false otherwise
|
||||
* @return
|
||||
*/
|
||||
public boolean isRemote() {
|
||||
return isRemote;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the current database settings are sufficient to talk to
|
||||
* the PostgreSql database
|
||||
* @return
|
||||
*/
|
||||
public static boolean externalDatabaseSettingsValid() {
|
||||
CaseDbConnectionInfo info = UserPreferences.getDatabaseConnectionInfo();
|
||||
return SleuthkitCase.settingsValid(info);
|
||||
}
|
||||
}
|
@ -12,9 +12,9 @@
|
||||
|
||||
<xs:element name="Examiner" type="String" nillable="true"/>
|
||||
|
||||
<xs:element name="CaseType" type="String" nillable="false"/>
|
||||
<xs:element name="CaseType" type="String" minOccurs="0" maxOccurs="1" nillable="false"/>
|
||||
|
||||
<xs:element name="DatabaseName" type="String" nillable="false"/>
|
||||
<xs:element name="DatabaseName" type="String" minOccurs="0" maxOccurs="1" nillable="false"/>
|
||||
|
||||
<xs:attribute name="Relative" type="xs:boolean"/>
|
||||
|
||||
|
@ -43,9 +43,9 @@
|
||||
<Component id="caseDirBrowseButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="rbLocalCase" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="rbSingleUserCase" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="rbSharedCase" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="rbMultiUserCase" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
@ -74,8 +74,8 @@
|
||||
<Component id="caseDirTextField" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="rbLocalCase" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="rbSharedCase" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="rbSingleUserCase" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="rbMultiUserCase" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="16" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
@ -146,23 +146,23 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="rbLocalCase">
|
||||
<Component class="javax.swing.JRadioButton" name="rbSingleUserCase">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="caseTypeButtonGroup"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="NewCaseVisualPanel1.rbLocalCase.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="NewCaseVisualPanel1.rbSingleUserCase.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="rbSharedCase">
|
||||
<Component class="javax.swing.JRadioButton" name="rbMultiUserCase">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="caseTypeButtonGroup"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="NewCaseVisualPanel1.rbSharedCase.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="NewCaseVisualPanel1.rbMultiUserCase.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
@ -48,28 +48,28 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener {
|
||||
caseParentDirTextField.getDocument().addDocumentListener(this);
|
||||
CaseDbConnectionInfo info = UserPreferences.getDatabaseConnectionInfo();
|
||||
if (info.getDbType() == CaseDbConnectionInfo.DbType.UNKNOWN) {
|
||||
rbLocalCase.setSelected(true);
|
||||
rbLocalCase.setEnabled(false);
|
||||
rbLocalCase.setVisible(false);
|
||||
rbSharedCase.setEnabled(false);
|
||||
rbSharedCase.setVisible(false);
|
||||
rbSingleUserCase.setSelected(true);
|
||||
rbSingleUserCase.setEnabled(false);
|
||||
rbSingleUserCase.setVisible(false);
|
||||
rbMultiUserCase.setEnabled(false);
|
||||
rbMultiUserCase.setVisible(false);
|
||||
} else {
|
||||
// if we cannot connect to the shared database, don't present the option
|
||||
// but do not change the setting stored in the preferences file
|
||||
rbLocalCase.setEnabled(true);
|
||||
rbSharedCase.setEnabled(true);
|
||||
rbLocalCase.setVisible(true);
|
||||
rbSharedCase.setVisible(true);
|
||||
if (true == Case.externalDatabaseSettingsValid()) {
|
||||
if (UserPreferences.newCaseType() == CaseType.LOCAL.ordinal()) {
|
||||
rbLocalCase.setSelected(true);
|
||||
rbSingleUserCase.setEnabled(true);
|
||||
rbMultiUserCase.setEnabled(true);
|
||||
rbSingleUserCase.setVisible(true);
|
||||
rbMultiUserCase.setVisible(true);
|
||||
if (true == info.settingsValid()) {
|
||||
if (UserPreferences.newCaseType() == CaseType.SINGLE_USER_CASE.ordinal()) {
|
||||
rbSingleUserCase.setSelected(true);
|
||||
} else {
|
||||
rbSharedCase.setSelected(true);
|
||||
rbMultiUserCase.setSelected(true);
|
||||
}
|
||||
} else {
|
||||
rbLocalCase.setSelected(true);
|
||||
rbLocalCase.setEnabled(false);
|
||||
rbSharedCase.setEnabled(false);
|
||||
rbSingleUserCase.setSelected(true);
|
||||
rbSingleUserCase.setEnabled(false);
|
||||
rbMultiUserCase.setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -119,11 +119,11 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener {
|
||||
* @return CaseType as set via radio buttons
|
||||
*/
|
||||
public CaseType getCaseType() {
|
||||
CaseType value = CaseType.LOCAL;
|
||||
if (rbLocalCase.isSelected()) {
|
||||
value = CaseType.LOCAL;
|
||||
} else if (rbSharedCase.isSelected()) {
|
||||
value = CaseType.SHARED;
|
||||
CaseType value = CaseType.SINGLE_USER_CASE;
|
||||
if (rbSingleUserCase.isSelected()) {
|
||||
value = CaseType.SINGLE_USER_CASE;
|
||||
} else if (rbMultiUserCase.isSelected()) {
|
||||
value = CaseType.MULTI_USER_CASE;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
@ -145,8 +145,8 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener {
|
||||
caseDirBrowseButton = new javax.swing.JButton();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
caseDirTextField = new javax.swing.JTextField();
|
||||
rbLocalCase = new javax.swing.JRadioButton();
|
||||
rbSharedCase = new javax.swing.JRadioButton();
|
||||
rbSingleUserCase = new javax.swing.JRadioButton();
|
||||
rbMultiUserCase = new javax.swing.JRadioButton();
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(NewCaseVisualPanel1.class, "NewCaseVisualPanel1.jLabel1.text_1")); // NOI18N
|
||||
@ -171,11 +171,11 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener {
|
||||
caseDirTextField.setEditable(false);
|
||||
caseDirTextField.setText(org.openide.util.NbBundle.getMessage(NewCaseVisualPanel1.class, "NewCaseVisualPanel1.caseDirTextField.text_1")); // NOI18N
|
||||
|
||||
caseTypeButtonGroup.add(rbLocalCase);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(rbLocalCase, org.openide.util.NbBundle.getMessage(NewCaseVisualPanel1.class, "NewCaseVisualPanel1.rbLocalCase.text")); // NOI18N
|
||||
caseTypeButtonGroup.add(rbSingleUserCase);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(rbSingleUserCase, org.openide.util.NbBundle.getMessage(NewCaseVisualPanel1.class, "NewCaseVisualPanel1.rbSingleUserCase.text")); // NOI18N
|
||||
|
||||
caseTypeButtonGroup.add(rbSharedCase);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(rbSharedCase, org.openide.util.NbBundle.getMessage(NewCaseVisualPanel1.class, "NewCaseVisualPanel1.rbSharedCase.text")); // NOI18N
|
||||
caseTypeButtonGroup.add(rbMultiUserCase);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(rbMultiUserCase, org.openide.util.NbBundle.getMessage(NewCaseVisualPanel1.class, "NewCaseVisualPanel1.rbMultiUserCase.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
@ -200,9 +200,9 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener {
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(caseDirBrowseButton))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(rbLocalCase)
|
||||
.addComponent(rbSingleUserCase)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(rbSharedCase)))
|
||||
.addComponent(rbMultiUserCase)))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
@ -225,8 +225,8 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener {
|
||||
.addComponent(caseDirTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(rbLocalCase)
|
||||
.addComponent(rbSharedCase))
|
||||
.addComponent(rbSingleUserCase)
|
||||
.addComponent(rbMultiUserCase))
|
||||
.addContainerGap(16, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
@ -266,8 +266,8 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener {
|
||||
private javax.swing.ButtonGroup caseTypeButtonGroup;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JRadioButton rbLocalCase;
|
||||
private javax.swing.JRadioButton rbSharedCase;
|
||||
private javax.swing.JRadioButton rbMultiUserCase;
|
||||
private javax.swing.JRadioButton rbSingleUserCase;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
/**
|
||||
|
@ -207,15 +207,15 @@ import org.xml.sax.SAXException;
|
||||
* @return caseType from the document handler
|
||||
*/
|
||||
public CaseType getCaseType() {
|
||||
try {
|
||||
if (doc == null) {
|
||||
return CaseType.LOCAL;
|
||||
return CaseType.SINGLE_USER_CASE;
|
||||
} else {
|
||||
if (getCaseElement().getElementsByTagName(CASE_TYPE).getLength() > 0) {
|
||||
Element nameElement = (Element) getCaseElement().getElementsByTagName(CASE_TYPE).item(0);
|
||||
return CaseType.fromString(nameElement.getTextContent());
|
||||
} else {
|
||||
return CaseType.SINGLE_USER_CASE;
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
return CaseType.LOCAL;
|
||||
}
|
||||
}
|
||||
|
||||
@ -237,8 +237,12 @@ import org.xml.sax.SAXException;
|
||||
if (doc == null) {
|
||||
return "";
|
||||
} else {
|
||||
if (getCaseElement().getElementsByTagName(DATABASE_NAME).getLength() > 0) {
|
||||
Element nameElement = (Element) getCaseElement().getElementsByTagName(DATABASE_NAME).item(0);
|
||||
return nameElement.getTextContent();
|
||||
} else {
|
||||
return ""; /// couldn't find one, so return a blank name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -755,7 +759,7 @@ import org.xml.sax.SAXException;
|
||||
caseName = "";
|
||||
caseNumber = "";
|
||||
examiner = "";
|
||||
caseType = CaseType.LOCAL;
|
||||
caseType = CaseType.SINGLE_USER_CASE;
|
||||
dbName = "";
|
||||
}
|
||||
}
|
||||
|
@ -149,16 +149,16 @@ FXVideoPanel.progress.bufferingInterrupted=media buffering was interrupted
|
||||
FXVideoPanel.progress.errorWritingVideoToDisk=Error writing video to disk
|
||||
OptionsCategory_Name_Multi_User_Settings=Multi-user
|
||||
OptionsCategory_Keywords_Multi_User_Options=Multi-user Options
|
||||
AutopsyMultiUserSettingsPanel.lbExternalDatabase.text=Database Settings
|
||||
AutopsyMultiUserSettingsPanel.lbOops.text=
|
||||
AutopsyMultiUserSettingsPanel.cbExternalDbEnabled.text=Enable Multi-user
|
||||
AutopsyMultiUserSettingsPanel.tbPassword.toolTipText=Enter the password here
|
||||
AutopsyMultiUserSettingsPanel.tbPassword.text=
|
||||
AutopsyMultiUserSettingsPanel.tbUsername.toolTipText=User Name
|
||||
AutopsyMultiUserSettingsPanel.tbUsername.text=
|
||||
AutopsyMultiUserSettingsPanel.tbPortNumber.toolTipText=Port Number
|
||||
AutopsyMultiUserSettingsPanel.tbPortNumber.text=
|
||||
AutopsyMultiUserSettingsPanel.tbHostnameOrIp.toolTipText=Hostname or IP Address
|
||||
AutopsyMultiUserSettingsPanel.tbHostnameOrIp.text=
|
||||
AutopsyMultiUserSettingsPanel.lbMessagingSettings.text=Messaging Settings
|
||||
AutopsyMultiUserSettingsPanel.lbSolrSettings.text=Solr Settings
|
||||
MultiUserSettingsPanel.lbSolrSettings.text=Solr Settings
|
||||
MultiUserSettingsPanel.lbOops.text=
|
||||
MultiUserSettingsPanel.tbPassword.toolTipText=Enter the password here
|
||||
MultiUserSettingsPanel.tbPassword.text=
|
||||
MultiUserSettingsPanel.tbUsername.toolTipText=User Name
|
||||
MultiUserSettingsPanel.tbUsername.text=
|
||||
MultiUserSettingsPanel.tbPortNumber.toolTipText=Port Number
|
||||
MultiUserSettingsPanel.tbPortNumber.text=
|
||||
MultiUserSettingsPanel.tbHostnameOrIp.toolTipText=Hostname or IP Address
|
||||
MultiUserSettingsPanel.tbHostnameOrIp.text=
|
||||
MultiUserSettingsPanel.lbMessagingSettings.text=Messaging Settings
|
||||
MultiUserSettingsPanel.cbEnableMultiUser.text=Enable Multi-user cases
|
||||
MultiUserSettingsPanel.lbDatabaseSettings.text=Database Settings
|
||||
|
@ -16,11 +16,7 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="pnOverallPanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="pnOverallPanel" pref="481" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
@ -37,15 +33,13 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="cbExternalDbEnabled" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="cbEnableMultiUser" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="pnSolrSettings" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="pnDatabaseSettings" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="pnMessagingSettings" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="pnExternalDatabase" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="14" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -53,9 +47,9 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cbExternalDbEnabled" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="cbEnableMultiUser" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="pnExternalDatabase" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="pnDatabaseSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="pnSolrSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
@ -66,7 +60,7 @@
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="pnExternalDatabase">
|
||||
<Container class="javax.swing.JPanel" name="pnDatabaseSettings">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
@ -87,7 +81,7 @@
|
||||
<Component id="tbPassword" alignment="0" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="1" max="32767" attributes="0"/>
|
||||
<Component id="lbExternalDatabase" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbDatabaseSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="lbOops" min="-2" pref="320" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@ -102,7 +96,7 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="lbExternalDatabase" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbDatabaseSettings" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="lbOops" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
@ -126,10 +120,10 @@
|
||||
<Font name="Tahoma" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyMultiUserSettingsPanel.tbHostnameOrIp.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbHostnameOrIp.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyMultiUserSettingsPanel.tbHostnameOrIp.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbHostnameOrIp.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@ -139,10 +133,10 @@
|
||||
<Font name="Tahoma" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyMultiUserSettingsPanel.tbPortNumber.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbPortNumber.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyMultiUserSettingsPanel.tbPortNumber.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbPortNumber.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@ -152,10 +146,10 @@
|
||||
<Font name="Tahoma" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyMultiUserSettingsPanel.tbUsername.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbUsername.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyMultiUserSettingsPanel.tbUsername.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbUsername.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@ -165,10 +159,10 @@
|
||||
<Font name="Tahoma" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyMultiUserSettingsPanel.tbPassword.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbPassword.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyMultiUserSettingsPanel.tbPassword.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.tbPassword.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@ -181,18 +175,18 @@
|
||||
<Color blue="0" green="0" red="ff" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyMultiUserSettingsPanel.lbOops.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.lbOops.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="verticalAlignment" type="int" value="3"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbExternalDatabase">
|
||||
<Component class="javax.swing.JLabel" name="lbDatabaseSettings">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyMultiUserSettingsPanel.lbExternalDatabase.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.lbDatabaseSettings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="verticalAlignment" type="int" value="1"/>
|
||||
</Properties>
|
||||
@ -235,7 +229,7 @@
|
||||
<Font name="Tahoma" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyMultiUserSettingsPanel.lbSolrSettings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.lbSolrSettings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@ -256,7 +250,7 @@
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbMessagingSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="392" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -277,20 +271,20 @@
|
||||
<Font name="Tahoma" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyMultiUserSettingsPanel.lbMessagingSettings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.lbMessagingSettings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JCheckBox" name="cbExternalDbEnabled">
|
||||
<Component class="javax.swing.JCheckBox" name="cbEnableMultiUser">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyMultiUserSettingsPanel.cbExternalDbEnabled.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="MultiUserSettingsPanel.cbEnableMultiUser.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="cbExternalDbEnabledItemStateChanged"/>
|
||||
<EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="cbEnableMultiUserItemStateChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
@ -12,15 +12,15 @@ import org.sleuthkit.datamodel.CaseDbConnectionInfo;
|
||||
import org.sleuthkit.datamodel.CaseDbConnectionInfo.DbType;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
|
||||
public class AutopsyMultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
public class MultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
|
||||
private AutopsyMultiUserSettingsPanelController controller;
|
||||
private MultiUserSettingsPanelController controller;
|
||||
private TextBoxChangedListener textBoxChangedListener;
|
||||
|
||||
/**
|
||||
* Creates new form AutopsyMultiUserSettingsPanel
|
||||
*/
|
||||
public AutopsyMultiUserSettingsPanel(AutopsyMultiUserSettingsPanelController theController) {
|
||||
public MultiUserSettingsPanel(MultiUserSettingsPanelController theController) {
|
||||
initComponents();
|
||||
controller = theController;
|
||||
|
||||
@ -40,7 +40,7 @@ public class AutopsyMultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
tpUsername.changeAlpha(alpha);
|
||||
tpPassword.changeAlpha(alpha);
|
||||
|
||||
setNetworkDbEnabled(cbExternalDbEnabled.isSelected());
|
||||
setNetworkDbEnabled(cbEnableMultiUser.isSelected());
|
||||
|
||||
/// Register for notifications when the text boxes get updated
|
||||
textBoxChangedListener = new TextBoxChangedListener();
|
||||
@ -60,71 +60,71 @@ public class AutopsyMultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
private void initComponents() {
|
||||
|
||||
pnOverallPanel = new javax.swing.JPanel();
|
||||
pnExternalDatabase = new javax.swing.JPanel();
|
||||
pnDatabaseSettings = new javax.swing.JPanel();
|
||||
tbHostnameOrIp = new javax.swing.JTextField();
|
||||
tbPortNumber = new javax.swing.JTextField();
|
||||
tbUsername = new javax.swing.JTextField();
|
||||
tbPassword = new javax.swing.JPasswordField();
|
||||
lbOops = new javax.swing.JLabel();
|
||||
lbExternalDatabase = new javax.swing.JLabel();
|
||||
lbDatabaseSettings = new javax.swing.JLabel();
|
||||
pnSolrSettings = new javax.swing.JPanel();
|
||||
lbSolrSettings = new javax.swing.JLabel();
|
||||
pnMessagingSettings = new javax.swing.JPanel();
|
||||
lbMessagingSettings = new javax.swing.JLabel();
|
||||
cbExternalDbEnabled = new javax.swing.JCheckBox();
|
||||
cbEnableMultiUser = new javax.swing.JCheckBox();
|
||||
|
||||
pnExternalDatabase.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
pnDatabaseSettings.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
|
||||
tbHostnameOrIp.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
|
||||
tbHostnameOrIp.setText(org.openide.util.NbBundle.getMessage(AutopsyMultiUserSettingsPanel.class, "AutopsyMultiUserSettingsPanel.tbHostnameOrIp.text")); // NOI18N
|
||||
tbHostnameOrIp.setToolTipText(org.openide.util.NbBundle.getMessage(AutopsyMultiUserSettingsPanel.class, "AutopsyMultiUserSettingsPanel.tbHostnameOrIp.toolTipText")); // NOI18N
|
||||
tbHostnameOrIp.setText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbHostnameOrIp.text")); // NOI18N
|
||||
tbHostnameOrIp.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbHostnameOrIp.toolTipText")); // NOI18N
|
||||
|
||||
tbPortNumber.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
|
||||
tbPortNumber.setText(org.openide.util.NbBundle.getMessage(AutopsyMultiUserSettingsPanel.class, "AutopsyMultiUserSettingsPanel.tbPortNumber.text")); // NOI18N
|
||||
tbPortNumber.setToolTipText(org.openide.util.NbBundle.getMessage(AutopsyMultiUserSettingsPanel.class, "AutopsyMultiUserSettingsPanel.tbPortNumber.toolTipText")); // NOI18N
|
||||
tbPortNumber.setText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbPortNumber.text")); // NOI18N
|
||||
tbPortNumber.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbPortNumber.toolTipText")); // NOI18N
|
||||
|
||||
tbUsername.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
|
||||
tbUsername.setText(org.openide.util.NbBundle.getMessage(AutopsyMultiUserSettingsPanel.class, "AutopsyMultiUserSettingsPanel.tbUsername.text")); // NOI18N
|
||||
tbUsername.setToolTipText(org.openide.util.NbBundle.getMessage(AutopsyMultiUserSettingsPanel.class, "AutopsyMultiUserSettingsPanel.tbUsername.toolTipText")); // NOI18N
|
||||
tbUsername.setText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbUsername.text")); // NOI18N
|
||||
tbUsername.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbUsername.toolTipText")); // NOI18N
|
||||
|
||||
tbPassword.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
|
||||
tbPassword.setText(org.openide.util.NbBundle.getMessage(AutopsyMultiUserSettingsPanel.class, "AutopsyMultiUserSettingsPanel.tbPassword.text")); // NOI18N
|
||||
tbPassword.setToolTipText(org.openide.util.NbBundle.getMessage(AutopsyMultiUserSettingsPanel.class, "AutopsyMultiUserSettingsPanel.tbPassword.toolTipText")); // NOI18N
|
||||
tbPassword.setText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbPassword.text")); // NOI18N
|
||||
tbPassword.setToolTipText(org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.tbPassword.toolTipText")); // NOI18N
|
||||
|
||||
lbOops.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
|
||||
lbOops.setForeground(new java.awt.Color(255, 0, 0));
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbOops, org.openide.util.NbBundle.getMessage(AutopsyMultiUserSettingsPanel.class, "AutopsyMultiUserSettingsPanel.lbOops.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbOops, org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.lbOops.text")); // NOI18N
|
||||
lbOops.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
|
||||
|
||||
lbExternalDatabase.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbExternalDatabase, org.openide.util.NbBundle.getMessage(AutopsyMultiUserSettingsPanel.class, "AutopsyMultiUserSettingsPanel.lbExternalDatabase.text")); // NOI18N
|
||||
lbExternalDatabase.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
lbDatabaseSettings.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbDatabaseSettings, org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.lbDatabaseSettings.text")); // NOI18N
|
||||
lbDatabaseSettings.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
|
||||
javax.swing.GroupLayout pnExternalDatabaseLayout = new javax.swing.GroupLayout(pnExternalDatabase);
|
||||
pnExternalDatabase.setLayout(pnExternalDatabaseLayout);
|
||||
pnExternalDatabaseLayout.setHorizontalGroup(
|
||||
pnExternalDatabaseLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnExternalDatabaseLayout.createSequentialGroup()
|
||||
javax.swing.GroupLayout pnDatabaseSettingsLayout = new javax.swing.GroupLayout(pnDatabaseSettings);
|
||||
pnDatabaseSettings.setLayout(pnDatabaseSettingsLayout);
|
||||
pnDatabaseSettingsLayout.setHorizontalGroup(
|
||||
pnDatabaseSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnDatabaseSettingsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(pnExternalDatabaseLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnDatabaseSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(tbHostnameOrIp)
|
||||
.addComponent(tbPortNumber)
|
||||
.addComponent(tbUsername)
|
||||
.addComponent(tbPassword)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnExternalDatabaseLayout.createSequentialGroup()
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnDatabaseSettingsLayout.createSequentialGroup()
|
||||
.addGap(0, 1, Short.MAX_VALUE)
|
||||
.addComponent(lbExternalDatabase)
|
||||
.addComponent(lbDatabaseSettings)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(lbOops, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
pnExternalDatabaseLayout.setVerticalGroup(
|
||||
pnExternalDatabaseLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnExternalDatabaseLayout.createSequentialGroup()
|
||||
.addGroup(pnExternalDatabaseLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnExternalDatabaseLayout.createSequentialGroup()
|
||||
pnDatabaseSettingsLayout.setVerticalGroup(
|
||||
pnDatabaseSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnDatabaseSettingsLayout.createSequentialGroup()
|
||||
.addGroup(pnDatabaseSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnDatabaseSettingsLayout.createSequentialGroup()
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbExternalDatabase))
|
||||
.addComponent(lbDatabaseSettings))
|
||||
.addComponent(lbOops, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(tbHostnameOrIp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
@ -140,7 +140,7 @@ public class AutopsyMultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
pnSolrSettings.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
|
||||
lbSolrSettings.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbSolrSettings, org.openide.util.NbBundle.getMessage(AutopsyMultiUserSettingsPanel.class, "AutopsyMultiUserSettingsPanel.lbSolrSettings.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbSolrSettings, org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.lbSolrSettings.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout pnSolrSettingsLayout = new javax.swing.GroupLayout(pnSolrSettings);
|
||||
pnSolrSettings.setLayout(pnSolrSettingsLayout);
|
||||
@ -162,7 +162,7 @@ public class AutopsyMultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
pnMessagingSettings.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
|
||||
lbMessagingSettings.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbMessagingSettings, org.openide.util.NbBundle.getMessage(AutopsyMultiUserSettingsPanel.class, "AutopsyMultiUserSettingsPanel.lbMessagingSettings.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbMessagingSettings, org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.lbMessagingSettings.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout pnMessagingSettingsLayout = new javax.swing.GroupLayout(pnMessagingSettings);
|
||||
pnMessagingSettings.setLayout(pnMessagingSettingsLayout);
|
||||
@ -171,7 +171,7 @@ public class AutopsyMultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
.addGroup(pnMessagingSettingsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(lbMessagingSettings)
|
||||
.addContainerGap(392, Short.MAX_VALUE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
pnMessagingSettingsLayout.setVerticalGroup(
|
||||
pnMessagingSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@ -181,10 +181,10 @@ public class AutopsyMultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
.addContainerGap(74, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(cbExternalDbEnabled, org.openide.util.NbBundle.getMessage(AutopsyMultiUserSettingsPanel.class, "AutopsyMultiUserSettingsPanel.cbExternalDbEnabled.text")); // NOI18N
|
||||
cbExternalDbEnabled.addItemListener(new java.awt.event.ItemListener() {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(cbEnableMultiUser, org.openide.util.NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.cbEnableMultiUser.text")); // NOI18N
|
||||
cbEnableMultiUser.addItemListener(new java.awt.event.ItemListener() {
|
||||
public void itemStateChanged(java.awt.event.ItemEvent evt) {
|
||||
cbExternalDbEnabledItemStateChanged(evt);
|
||||
cbEnableMultiUserItemStateChanged(evt);
|
||||
}
|
||||
});
|
||||
|
||||
@ -194,21 +194,20 @@ public class AutopsyMultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
pnOverallPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnOverallPanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(pnOverallPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(cbExternalDbEnabled)
|
||||
.addGroup(pnOverallPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(cbEnableMultiUser)
|
||||
.addComponent(pnSolrSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(pnDatabaseSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(pnMessagingSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addComponent(pnExternalDatabase, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(14, Short.MAX_VALUE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
pnOverallPanelLayout.setVerticalGroup(
|
||||
pnOverallPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnOverallPanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(cbExternalDbEnabled)
|
||||
.addComponent(cbEnableMultiUser)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(pnExternalDatabase, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(pnDatabaseSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(pnSolrSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
@ -220,10 +219,7 @@ public class AutopsyMultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(1, 1, 1)
|
||||
.addComponent(pnOverallPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addComponent(pnOverallPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 481, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@ -243,10 +239,10 @@ public class AutopsyMultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
tbPassword.setEnabled(enabled);
|
||||
}
|
||||
|
||||
private void cbExternalDbEnabledItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbExternalDbEnabledItemStateChanged
|
||||
setNetworkDbEnabled(cbExternalDbEnabled.isSelected());
|
||||
private void cbEnableMultiUserItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbEnableMultiUserItemStateChanged
|
||||
setNetworkDbEnabled(cbEnableMultiUser.isSelected());
|
||||
controller.changed();
|
||||
}//GEN-LAST:event_cbExternalDbEnabledItemStateChanged
|
||||
}//GEN-LAST:event_cbEnableMultiUserItemStateChanged
|
||||
|
||||
void load() {
|
||||
CaseDbConnectionInfo info = UserPreferences.getDatabaseConnectionInfo();
|
||||
@ -255,9 +251,9 @@ public class AutopsyMultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
tbUsername.setText(info.getUserName());
|
||||
tbPassword.setText(info.getPassword());
|
||||
if (info.getDbType() == DbType.UNKNOWN) {
|
||||
cbExternalDbEnabled.setSelected(false);
|
||||
cbEnableMultiUser.setSelected(false);
|
||||
} else {
|
||||
cbExternalDbEnabled.setSelected(true);
|
||||
cbEnableMultiUser.setSelected(true);
|
||||
}
|
||||
|
||||
}
|
||||
@ -266,7 +262,7 @@ public class AutopsyMultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
|
||||
DbType dbType = DbType.UNKNOWN;
|
||||
|
||||
if (cbExternalDbEnabled.isSelected()) {
|
||||
if (cbEnableMultiUser.isSelected()) {
|
||||
dbType = DbType.POSTGRESQL;
|
||||
}
|
||||
|
||||
@ -288,7 +284,7 @@ public class AutopsyMultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
boolean valid() {
|
||||
boolean result = false;
|
||||
String text = "";
|
||||
if (cbExternalDbEnabled.isSelected()) {
|
||||
if (cbEnableMultiUser.isSelected()) {
|
||||
try {
|
||||
if (tbHostnameOrIp.getText().isEmpty()
|
||||
|| tbPortNumber.getText().isEmpty()
|
||||
@ -317,12 +313,12 @@ public class AutopsyMultiUserSettingsPanel extends javax.swing.JPanel {
|
||||
return result;
|
||||
}
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JCheckBox cbExternalDbEnabled;
|
||||
private javax.swing.JLabel lbExternalDatabase;
|
||||
private javax.swing.JCheckBox cbEnableMultiUser;
|
||||
private javax.swing.JLabel lbDatabaseSettings;
|
||||
private javax.swing.JLabel lbMessagingSettings;
|
||||
private javax.swing.JLabel lbOops;
|
||||
private javax.swing.JLabel lbSolrSettings;
|
||||
private javax.swing.JPanel pnExternalDatabase;
|
||||
private javax.swing.JPanel pnDatabaseSettings;
|
||||
private javax.swing.JPanel pnMessagingSettings;
|
||||
private javax.swing.JPanel pnOverallPanel;
|
||||
private javax.swing.JPanel pnSolrSettings;
|
@ -34,12 +34,12 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
position = 2,
|
||||
keywords = "#OptionsCategory_Keywords_Multi_User_Options",
|
||||
keywordsCategory = "Multi-user")
|
||||
public final class AutopsyMultiUserSettingsPanelController extends OptionsPanelController {
|
||||
public final class MultiUserSettingsPanelController extends OptionsPanelController {
|
||||
|
||||
private AutopsyMultiUserSettingsPanel panel;
|
||||
private MultiUserSettingsPanel panel;
|
||||
private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
|
||||
private boolean changed;
|
||||
private static final Logger logger = Logger.getLogger(AutopsyMultiUserSettingsPanelController.class.getName());
|
||||
private static final Logger logger = Logger.getLogger(MultiUserSettingsPanelController.class.getName());
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
@ -95,9 +95,9 @@ public final class AutopsyMultiUserSettingsPanelController extends OptionsPanelC
|
||||
*/
|
||||
}
|
||||
|
||||
private AutopsyMultiUserSettingsPanel getPanel() {
|
||||
private MultiUserSettingsPanel getPanel() {
|
||||
if (panel == null) {
|
||||
panel = new AutopsyMultiUserSettingsPanel(this);
|
||||
panel = new MultiUserSettingsPanel(this);
|
||||
}
|
||||
return panel;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user