mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-08 22:29:33 +00:00
Merge branch 'keyword-search-prototype'
Conflicts: CoreComponents/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerHex.java CoreComponents/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerString.java DataModel/src/org/sleuthkit/autopsy/datamodel/ContentChildren.java
This commit is contained in:
commit
607853a84f
5
.gitignore
vendored
5
.gitignore
vendored
@ -9,3 +9,8 @@
|
|||||||
/DataModel/release/modules/lib/libewf.dll
|
/DataModel/release/modules/lib/libewf.dll
|
||||||
/DataModel/release/modules/lib/libtsk_jni.dll
|
/DataModel/release/modules/lib/libtsk_jni.dll
|
||||||
/DataModel/release/modules/lib/zlib1.dll
|
/DataModel/release/modules/lib/zlib1.dll
|
||||||
|
/KeywordSearch/release/modules/ext/
|
||||||
|
/KeywordSearch/release/solr/lib/
|
||||||
|
/KeywordSearch/release/solr/solr/lib/
|
||||||
|
/KeywordSearch/release/solr/start.jar
|
||||||
|
/KeywordSearch/release/solr/webapps/solr.war
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
build.xml.data.CRC32=8710dca5
|
build.xml.data.CRC32=a2330d9e
|
||||||
build.xml.script.CRC32=601bc2ba
|
build.xml.script.CRC32=601bc2ba
|
||||||
build.xml.stylesheet.CRC32=a56c6a5b@1.46.2
|
build.xml.stylesheet.CRC32=a56c6a5b@2.47.1
|
||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=8710dca5
|
nbproject/build-impl.xml.data.CRC32=a2330d9e
|
||||||
nbproject/build-impl.xml.script.CRC32=65e93a36
|
nbproject/build-impl.xml.script.CRC32=65e93a36
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.46.2
|
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.47.1
|
||||||
|
@ -105,6 +105,15 @@
|
|||||||
<specification-version>1.0</specification-version>
|
<specification-version>1.0</specification-version>
|
||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.sleuthkit.autopsy.coreutils</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<release-version>0-1</release-version>
|
||||||
|
<specification-version>0.0</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<code-name-base>org.sleuthkit.autopsy.datamodel</code-name-base>
|
<code-name-base>org.sleuthkit.autopsy.datamodel</code-name-base>
|
||||||
<build-prerequisite/>
|
<build-prerequisite/>
|
||||||
@ -114,15 +123,6 @@
|
|||||||
<specification-version>1.0</specification-version>
|
<specification-version>1.0</specification-version>
|
||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<code-name-base>org.sleuthkit.autopsy.logging</code-name-base>
|
|
||||||
<build-prerequisite/>
|
|
||||||
<compile-dependency/>
|
|
||||||
<run-dependency>
|
|
||||||
<release-version>0</release-version>
|
|
||||||
<specification-version>0.0</specification-version>
|
|
||||||
</run-dependency>
|
|
||||||
</dependency>
|
|
||||||
</module-dependencies>
|
</module-dependencies>
|
||||||
<test-dependencies>
|
<test-dependencies>
|
||||||
<test-type>
|
<test-type>
|
||||||
|
@ -35,11 +35,13 @@ import org.openide.DialogDisplayer;
|
|||||||
import org.openide.WizardDescriptor;
|
import org.openide.WizardDescriptor;
|
||||||
import org.openide.util.ChangeSupport;
|
import org.openide.util.ChangeSupport;
|
||||||
import org.openide.util.HelpCtx;
|
import org.openide.util.HelpCtx;
|
||||||
|
import org.openide.util.Lookup;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.util.actions.CallableSystemAction;
|
import org.openide.util.actions.CallableSystemAction;
|
||||||
import org.openide.util.actions.Presenter;
|
import org.openide.util.actions.Presenter;
|
||||||
import org.openide.util.lookup.ServiceProvider;
|
import org.openide.util.lookup.ServiceProvider;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
import org.sleuthkit.datamodel.Image;
|
||||||
import org.sleuthkit.datamodel.SleuthkitJNI.CaseDbHandle.AddImageProcess;
|
import org.sleuthkit.datamodel.SleuthkitJNI.CaseDbHandle.AddImageProcess;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -57,7 +59,7 @@ public final class AddImageAction extends CallableSystemAction implements Presen
|
|||||||
// <TYPE>: <DESCRIPTION>
|
// <TYPE>: <DESCRIPTION>
|
||||||
// String: time zone that the image is from
|
// String: time zone that the image is from
|
||||||
static final String TIMEZONE_PROP = "timeZone";
|
static final String TIMEZONE_PROP = "timeZone";
|
||||||
// String[]: task to clean up the database file if wizard errors/is cancelled after it is created
|
// String[]: array of paths to each image selected
|
||||||
static final String IMGPATHS_PROP = "imgPaths";
|
static final String IMGPATHS_PROP = "imgPaths";
|
||||||
// CleanupTask: task to clean up the database file if wizard errors/is cancelled after it is created
|
// CleanupTask: task to clean up the database file if wizard errors/is cancelled after it is created
|
||||||
static final String IMAGECLEANUPTASK_PROP = "finalFileCleanup";
|
static final String IMAGECLEANUPTASK_PROP = "finalFileCleanup";
|
||||||
@ -65,6 +67,10 @@ public final class AddImageAction extends CallableSystemAction implements Presen
|
|||||||
static final String IMAGEID_PROP = "imageId";
|
static final String IMAGEID_PROP = "imageId";
|
||||||
// AddImageProcess: the next availble id for a new image
|
// AddImageProcess: the next availble id for a new image
|
||||||
static final String PROCESS_PROP = "process";
|
static final String PROCESS_PROP = "process";
|
||||||
|
// boolean: whether or not to index the image in Solr
|
||||||
|
static final String SOLR_PROP = "indexInSolr";
|
||||||
|
// boolean: whether or not to lookup files in the hashDB
|
||||||
|
static final String LOOKUPFILES_PROP = "lookupFiles";
|
||||||
|
|
||||||
|
|
||||||
private WizardDescriptor wizardDescriptor;
|
private WizardDescriptor wizardDescriptor;
|
||||||
@ -103,6 +109,7 @@ public final class AddImageAction extends CallableSystemAction implements Presen
|
|||||||
wizardDescriptor = new WizardDescriptor(iterator);
|
wizardDescriptor = new WizardDescriptor(iterator);
|
||||||
wizardDescriptor.setTitle("Add Image");
|
wizardDescriptor.setTitle("Add Image");
|
||||||
wizardDescriptor.putProperty(NAME, e);
|
wizardDescriptor.putProperty(NAME, e);
|
||||||
|
wizardDescriptor.putProperty(SOLR_PROP, false);
|
||||||
|
|
||||||
|
|
||||||
if (dialog != null) {
|
if (dialog != null) {
|
||||||
@ -112,48 +119,12 @@ public final class AddImageAction extends CallableSystemAction implements Presen
|
|||||||
dialog.setVisible(true);
|
dialog.setVisible(true);
|
||||||
dialog.toFront();
|
dialog.toFront();
|
||||||
|
|
||||||
boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION;
|
|
||||||
// @@@ Why don't we commit and revert in the same general area????
|
|
||||||
if (!cancelled) {
|
|
||||||
// commit anything
|
|
||||||
try {
|
|
||||||
commitImage(wizardDescriptor);
|
|
||||||
} catch (Exception ex) {
|
|
||||||
// Log error/display warning
|
|
||||||
Logger logger = Logger.getLogger(AddImageAction.class.getName());
|
|
||||||
logger.log(Level.SEVERE, "Error adding image to case.", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Do any cleanup that needs to happen (potentially: stopping the
|
// Do any cleanup that needs to happen (potentially: stopping the
|
||||||
//add-image process, reverting an image)
|
//add-image process, reverting an image)
|
||||||
runCleanupTasks();
|
runCleanupTasks();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Commit the finished AddImageProcess, and cancel the CleanupTask that
|
|
||||||
* would have reverted it.
|
|
||||||
* @param settings property set to get AddImageProcess and CleanupTask from
|
|
||||||
* @throws Exception if commit or adding the image to the case failed
|
|
||||||
*/
|
|
||||||
private void commitImage(WizardDescriptor settings) throws Exception {
|
|
||||||
|
|
||||||
String[] imgPaths = (String[]) settings.getProperty(AddImageAction.IMGPATHS_PROP);
|
|
||||||
String timezone = settings.getProperty(AddImageAction.TIMEZONE_PROP).toString();
|
|
||||||
|
|
||||||
AddImageProcess process = (AddImageProcess) settings.getProperty(PROCESS_PROP);
|
|
||||||
|
|
||||||
try {
|
|
||||||
long imageId = process.commit();
|
|
||||||
Case.getCurrentCase().addImage(imgPaths, imageId, timezone);
|
|
||||||
} finally {
|
|
||||||
// Can't bail and revert image add after commit, so disable image cleanup
|
|
||||||
// task
|
|
||||||
CleanupTask cleanupImage = (CleanupTask) settings.getProperty(IMAGECLEANUPTASK_PROP);
|
|
||||||
cleanupImage.disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Closes the current dialog and wizard, and opens a new one. Used in the
|
* Closes the current dialog and wizard, and opens a new one. Used in the
|
||||||
* "Add another image" action on the last panel
|
* "Add another image" action on the last panel
|
||||||
@ -175,6 +146,10 @@ public final class AddImageAction extends CallableSystemAction implements Presen
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface IndexImageTask {
|
||||||
|
void runTask(Image newImage);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method does nothing. Use the "actionPerformed(ActionEvent e)" instead of this method.
|
* This method does nothing. Use the "actionPerformed(ActionEvent e)" instead of this method.
|
||||||
*/
|
*/
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.1" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||||
<NonVisualComponents>
|
<NonVisualComponents>
|
||||||
@ -23,6 +23,16 @@
|
|||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Component id="imgPathLabel" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
|
<Component id="imgPathTextField" max="32767" attributes="1"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="imgPathBrowserButton" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" attributes="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Component id="lookupFilesCheckBox" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="imgTypeLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="imgTypeLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<EmptySpace min="10" pref="10" max="10" attributes="0"/>
|
<EmptySpace min="10" pref="10" max="10" attributes="0"/>
|
||||||
@ -33,13 +43,6 @@
|
|||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<Component id="multipleSelectLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="multipleSelectLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<Component id="imgPathLabel" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
|
||||||
<Component id="imgPathTextField" pref="415" max="32767" attributes="1"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="imgPathBrowserButton" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Component id="imgInfoLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="imgInfoLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
@ -47,6 +50,14 @@
|
|||||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||||
<Component id="timeZoneComboBox" min="-2" pref="315" max="-2" attributes="0"/>
|
<Component id="timeZoneComboBox" min="-2" pref="315" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
|
<Component id="indexImageCheckbox" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" alignment="1" attributes="0">
|
||||||
|
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||||
|
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
@ -73,12 +84,18 @@
|
|||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="multipleSelectLabel" min="-2" max="-2" attributes="0"/>
|
<Component id="multipleSelectLabel" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="1" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="timeZoneLabel" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="timeZoneComboBox" min="-2" max="-2" attributes="0"/>
|
<Component id="timeZoneComboBox" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="timeZoneLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace pref="26" max="32767" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="lookupFilesCheckBox" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
|
<Component id="indexImageCheckbox" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
@ -201,5 +218,26 @@
|
|||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component class="javax.swing.JCheckBox" name="lookupFilesCheckBox">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="AddImageVisualPanel1.lookupFilesCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="AddImageVisualPanel1.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JCheckBox" name="indexImageCheckbox">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="AddImageVisualPanel1.indexImageCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -23,10 +23,12 @@ import java.io.File;
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.SimpleTimeZone;
|
import java.util.SimpleTimeZone;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
import javax.swing.JCheckBox;
|
||||||
import javax.swing.event.DocumentEvent;
|
import javax.swing.event.DocumentEvent;
|
||||||
import javax.swing.filechooser.FileFilter;
|
import javax.swing.filechooser.FileFilter;
|
||||||
import javax.swing.JFileChooser;
|
import javax.swing.JFileChooser;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JTextField;
|
||||||
import javax.swing.event.DocumentListener;
|
import javax.swing.event.DocumentListener;
|
||||||
import org.openide.DialogDescriptor;
|
import org.openide.DialogDescriptor;
|
||||||
import org.openide.DialogDisplayer;
|
import org.openide.DialogDisplayer;
|
||||||
@ -103,6 +105,26 @@ final class AddImageVisualPanel1 extends JPanel implements DocumentListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public JTextField getImagePathTextField() {
|
||||||
|
return this.imgPathTextField;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JCheckBox getLookupFilesCheckbox() {
|
||||||
|
return this.lookupFilesCheckBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getLookupFilesCheckboxChecked() {
|
||||||
|
return this.lookupFilesCheckBox.isSelected();
|
||||||
|
}
|
||||||
|
|
||||||
|
public JCheckBox getIndexImageCheckbox() {
|
||||||
|
return this.indexImageCheckbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getIndexImageCheckboxChecked() {
|
||||||
|
return this.indexImageCheckbox.isSelected();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the type of the image that's selected.
|
* Gets the type of the image that's selected.
|
||||||
*
|
*
|
||||||
@ -196,6 +218,9 @@ final class AddImageVisualPanel1 extends JPanel implements DocumentListener {
|
|||||||
jLabel1 = new javax.swing.JLabel();
|
jLabel1 = new javax.swing.JLabel();
|
||||||
timeZoneComboBox = new javax.swing.JComboBox();
|
timeZoneComboBox = new javax.swing.JComboBox();
|
||||||
timeZoneLabel = new javax.swing.JLabel();
|
timeZoneLabel = new javax.swing.JLabel();
|
||||||
|
lookupFilesCheckBox = new javax.swing.JCheckBox();
|
||||||
|
jLabel2 = new javax.swing.JLabel();
|
||||||
|
indexImageCheckbox = new javax.swing.JCheckBox();
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(rawSingle, org.openide.util.NbBundle.getMessage(AddImageVisualPanel1.class, "AddImageVisualPanel1.rawSingle.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(rawSingle, org.openide.util.NbBundle.getMessage(AddImageVisualPanel1.class, "AddImageVisualPanel1.rawSingle.text")); // NOI18N
|
||||||
rawSingle.setRequestFocusEnabled(false);
|
rawSingle.setRequestFocusEnabled(false);
|
||||||
@ -236,7 +261,7 @@ final class AddImageVisualPanel1 extends JPanel implements DocumentListener {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
imgInfoLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
|
imgInfoLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(imgInfoLabel, org.openide.util.NbBundle.getMessage(AddImageVisualPanel1.class, "AddImageVisualPanel1.imgInfoLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(imgInfoLabel, org.openide.util.NbBundle.getMessage(AddImageVisualPanel1.class, "AddImageVisualPanel1.imgInfoLabel.text")); // NOI18N
|
||||||
|
|
||||||
jLabel1.setForeground(new java.awt.Color(255, 0, 51));
|
jLabel1.setForeground(new java.awt.Color(255, 0, 51));
|
||||||
@ -246,6 +271,12 @@ final class AddImageVisualPanel1 extends JPanel implements DocumentListener {
|
|||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(timeZoneLabel, org.openide.util.NbBundle.getMessage(AddImageVisualPanel1.class, "AddImageVisualPanel1.timeZoneLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(timeZoneLabel, org.openide.util.NbBundle.getMessage(AddImageVisualPanel1.class, "AddImageVisualPanel1.timeZoneLabel.text")); // NOI18N
|
||||||
|
|
||||||
|
org.openide.awt.Mnemonics.setLocalizedText(lookupFilesCheckBox, org.openide.util.NbBundle.getMessage(AddImageVisualPanel1.class, "AddImageVisualPanel1.lookupFilesCheckBox.text")); // NOI18N
|
||||||
|
|
||||||
|
org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(AddImageVisualPanel1.class, "AddImageVisualPanel1.jLabel2.text")); // NOI18N
|
||||||
|
|
||||||
|
org.openide.awt.Mnemonics.setLocalizedText(indexImageCheckbox, org.openide.util.NbBundle.getMessage(AddImageVisualPanel1.class, "AddImageVisualPanel1.indexImageCheckbox.text")); // NOI18N
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||||
this.setLayout(layout);
|
this.setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
@ -253,6 +284,15 @@ final class AddImageVisualPanel1 extends JPanel implements DocumentListener {
|
|||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(layout.createSequentialGroup()
|
||||||
|
.addComponent(imgPathLabel)
|
||||||
|
.addGap(18, 18, 18)
|
||||||
|
.addComponent(imgPathTextField)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(imgPathBrowserButton))
|
||||||
|
.addGroup(layout.createSequentialGroup()
|
||||||
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(lookupFilesCheckBox)
|
||||||
.addComponent(imgTypeLabel)
|
.addComponent(imgTypeLabel)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addGap(10, 10, 10)
|
.addGap(10, 10, 10)
|
||||||
@ -261,18 +301,17 @@ final class AddImageVisualPanel1 extends JPanel implements DocumentListener {
|
|||||||
.addComponent(rawSingle)
|
.addComponent(rawSingle)
|
||||||
.addComponent(encase)))
|
.addComponent(encase)))
|
||||||
.addComponent(multipleSelectLabel)
|
.addComponent(multipleSelectLabel)
|
||||||
.addGroup(layout.createSequentialGroup()
|
|
||||||
.addComponent(imgPathLabel)
|
|
||||||
.addGap(18, 18, 18)
|
|
||||||
.addComponent(imgPathTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 415, Short.MAX_VALUE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(imgPathBrowserButton))
|
|
||||||
.addComponent(imgInfoLabel)
|
.addComponent(imgInfoLabel)
|
||||||
.addComponent(jLabel1)
|
.addComponent(jLabel1)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addComponent(timeZoneLabel)
|
.addComponent(timeZoneLabel)
|
||||||
.addGap(10, 10, 10)
|
.addGap(10, 10, 10)
|
||||||
.addComponent(timeZoneComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 315, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
.addComponent(timeZoneComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 315, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addComponent(indexImageCheckbox))
|
||||||
|
.addGap(0, 0, Short.MAX_VALUE))
|
||||||
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||||
|
.addGap(0, 0, Short.MAX_VALUE)
|
||||||
|
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
@ -295,11 +334,17 @@ final class AddImageVisualPanel1 extends JPanel implements DocumentListener {
|
|||||||
.addComponent(imgPathBrowserButton))
|
.addComponent(imgPathBrowserButton))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(multipleSelectLabel)
|
.addComponent(multipleSelectLabel)
|
||||||
.addGap(18, 18, 18)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(timeZoneLabel)
|
.addComponent(timeZoneComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(timeZoneComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addComponent(timeZoneLabel))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(lookupFilesCheckBox)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||||
|
.addComponent(indexImageCheckbox)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||||
|
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(jLabel1)
|
.addComponent(jLabel1)
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
@ -394,7 +439,10 @@ final class AddImageVisualPanel1 extends JPanel implements DocumentListener {
|
|||||||
private javax.swing.JLabel imgPathLabel;
|
private javax.swing.JLabel imgPathLabel;
|
||||||
private static javax.swing.JTextField imgPathTextField;
|
private static javax.swing.JTextField imgPathTextField;
|
||||||
private javax.swing.JLabel imgTypeLabel;
|
private javax.swing.JLabel imgTypeLabel;
|
||||||
|
private javax.swing.JCheckBox indexImageCheckbox;
|
||||||
private javax.swing.JLabel jLabel1;
|
private javax.swing.JLabel jLabel1;
|
||||||
|
private javax.swing.JLabel jLabel2;
|
||||||
|
private javax.swing.JCheckBox lookupFilesCheckBox;
|
||||||
private javax.swing.JLabel multipleSelectLabel;
|
private javax.swing.JLabel multipleSelectLabel;
|
||||||
private static javax.swing.JRadioButton rawSingle;
|
private static javax.swing.JRadioButton rawSingle;
|
||||||
private javax.swing.JRadioButton rawSplit;
|
private javax.swing.JRadioButton rawSplit;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.1" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
@ -19,21 +19,16 @@
|
|||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="crDbLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Group type="102" attributes="0">
|
||||||
<Group type="102" alignment="1" attributes="0">
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Component id="crDbLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="crDbButton" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace min="189" pref="189" max="189" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="crDbProgressBar" alignment="0" pref="292" max="32767" attributes="1"/>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="progressLabel" pref="272" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Component id="jLabel1" alignment="0" min="-2" pref="552" max="-2" attributes="1"/>
|
<Component id="jLabel1" alignment="0" min="-2" pref="552" max="-2" attributes="1"/>
|
||||||
<Component id="lookupFilesCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Component id="crDbProgressBar" alignment="0" pref="568" max="32767" attributes="1"/>
|
||||||
|
<Component id="progressLabel" alignment="0" pref="568" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
@ -46,22 +41,12 @@
|
|||||||
<Component id="crDbLabel" min="-2" max="-2" attributes="0"/>
|
<Component id="crDbLabel" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
<Component id="lookupFilesCheckBox" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
|
||||||
<Group type="102" attributes="0">
|
|
||||||
<EmptySpace min="-2" pref="80" max="-2" attributes="0"/>
|
|
||||||
<Component id="progressLabel" min="-2" pref="12" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
|
||||||
<Component id="crDbButton" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace min="-2" pref="30" max="-2" attributes="0"/>
|
|
||||||
<Component id="jLabel5" min="-2" pref="14" max="-2" attributes="0"/>
|
<Component id="jLabel5" min="-2" pref="14" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
<Component id="crDbProgressBar" min="-2" pref="24" max="-2" attributes="1"/>
|
<Component id="crDbProgressBar" min="-2" pref="24" max="-2" attributes="1"/>
|
||||||
</Group>
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
</Group>
|
<Component id="progressLabel" min="-2" pref="12" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
@ -94,16 +79,6 @@
|
|||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JButton" name="crDbButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
|
||||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="AddImageVisualPanel2.crDbButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="crDbButtonActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
@ -111,12 +86,5 @@
|
|||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JCheckBox" name="lookupFilesCheckBox">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
|
||||||
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="AddImageVisualPanel2.lookupFilesCheckBox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -48,10 +48,6 @@ final class AddImageVisualPanel2 extends JPanel {
|
|||||||
return "Create Database";
|
return "Create Database";
|
||||||
}
|
}
|
||||||
|
|
||||||
public JButton getCrDbButton() {
|
|
||||||
return this.crDbButton;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JProgressBar getCrDbProgressBar() {
|
public JProgressBar getCrDbProgressBar() {
|
||||||
return this.crDbProgressBar;
|
return this.crDbProgressBar;
|
||||||
}
|
}
|
||||||
@ -60,10 +56,6 @@ final class AddImageVisualPanel2 extends JPanel {
|
|||||||
return this.progressLabel;
|
return this.progressLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JCheckBox getLookupFilesCheckbox() {
|
|
||||||
return this.lookupFilesCheckBox;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes the progress bar text and color.
|
* Changes the progress bar text and color.
|
||||||
*
|
*
|
||||||
@ -89,28 +81,17 @@ final class AddImageVisualPanel2 extends JPanel {
|
|||||||
jLabel5 = new javax.swing.JLabel();
|
jLabel5 = new javax.swing.JLabel();
|
||||||
crDbLabel = new javax.swing.JLabel();
|
crDbLabel = new javax.swing.JLabel();
|
||||||
progressLabel = new javax.swing.JLabel();
|
progressLabel = new javax.swing.JLabel();
|
||||||
crDbButton = new javax.swing.JButton();
|
|
||||||
jLabel1 = new javax.swing.JLabel();
|
jLabel1 = new javax.swing.JLabel();
|
||||||
lookupFilesCheckBox = new javax.swing.JCheckBox();
|
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(AddImageVisualPanel2.class, "AddImageVisualPanel2.jLabel5.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(AddImageVisualPanel2.class, "AddImageVisualPanel2.jLabel5.text")); // NOI18N
|
||||||
|
|
||||||
crDbLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
|
crDbLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(crDbLabel, org.openide.util.NbBundle.getMessage(AddImageVisualPanel2.class, "AddImageVisualPanel2.crDbLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(crDbLabel, org.openide.util.NbBundle.getMessage(AddImageVisualPanel2.class, "AddImageVisualPanel2.crDbLabel.text")); // NOI18N
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(progressLabel, org.openide.util.NbBundle.getMessage(AddImageVisualPanel2.class, "AddImageVisualPanel2.progressLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(progressLabel, org.openide.util.NbBundle.getMessage(AddImageVisualPanel2.class, "AddImageVisualPanel2.progressLabel.text")); // NOI18N
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(crDbButton, org.openide.util.NbBundle.getMessage(AddImageVisualPanel2.class, "AddImageVisualPanel2.crDbButton.text")); // NOI18N
|
|
||||||
crDbButton.addActionListener(new java.awt.event.ActionListener() {
|
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
||||||
crDbButtonActionPerformed(evt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(AddImageVisualPanel2.class, "AddImageVisualPanel2.jLabel1.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(AddImageVisualPanel2.class, "AddImageVisualPanel2.jLabel1.text")); // NOI18N
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(lookupFilesCheckBox, org.openide.util.NbBundle.getMessage(AddImageVisualPanel2.class, "AddImageVisualPanel2.lookupFilesCheckBox.text")); // NOI18N
|
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||||
this.setLayout(layout);
|
this.setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
@ -121,20 +102,12 @@ final class AddImageVisualPanel2 extends JPanel {
|
|||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(crDbLabel)
|
.addComponent(crDbLabel)
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 552, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addComponent(jLabel5))
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGap(0, 0, Short.MAX_VALUE))
|
||||||
.addComponent(crDbButton)
|
.addComponent(crDbProgressBar, javax.swing.GroupLayout.DEFAULT_SIZE, 568, Short.MAX_VALUE)
|
||||||
.addGap(189, 189, 189))
|
.addComponent(progressLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 568, Short.MAX_VALUE))
|
||||||
.addComponent(jLabel5)
|
|
||||||
.addComponent(crDbProgressBar, javax.swing.GroupLayout.DEFAULT_SIZE, 292, Short.MAX_VALUE))
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(progressLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 272, Short.MAX_VALUE))
|
|
||||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 552, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
.addGroup(layout.createSequentialGroup()
|
|
||||||
.addComponent(lookupFilesCheckBox)
|
|
||||||
.addContainerGap(407, Short.MAX_VALUE))))
|
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
@ -143,39 +116,21 @@ final class AddImageVisualPanel2 extends JPanel {
|
|||||||
.addComponent(crDbLabel)
|
.addComponent(crDbLabel)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
.addGap(18, 18, 18)
|
||||||
.addComponent(lookupFilesCheckBox)
|
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
||||||
.addGroup(layout.createSequentialGroup()
|
|
||||||
.addGap(80, 80, 80)
|
|
||||||
.addComponent(progressLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
||||||
.addGroup(layout.createSequentialGroup()
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
||||||
.addComponent(crDbButton)
|
|
||||||
.addGap(30, 30, 30)
|
|
||||||
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addGap(18, 18, 18)
|
||||||
.addComponent(crDbProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
.addComponent(crDbProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addGap(18, 18, 18)
|
||||||
|
.addComponent(progressLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
/**
|
|
||||||
* When the "Create Database" button is press. It starts the database
|
|
||||||
* creation process, disables the "Create Database" and "Back" button, and
|
|
||||||
* sets the progress bar text.
|
|
||||||
*
|
|
||||||
* @param evt the action event
|
|
||||||
*/
|
|
||||||
private void crDbButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_crDbButtonActionPerformed
|
|
||||||
}//GEN-LAST:event_crDbButtonActionPerformed
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private javax.swing.JButton crDbButton;
|
|
||||||
private javax.swing.JLabel crDbLabel;
|
private javax.swing.JLabel crDbLabel;
|
||||||
private javax.swing.JProgressBar crDbProgressBar;
|
private javax.swing.JProgressBar crDbProgressBar;
|
||||||
private javax.swing.JLabel jLabel1;
|
private javax.swing.JLabel jLabel1;
|
||||||
private javax.swing.JLabel jLabel5;
|
private javax.swing.JLabel jLabel5;
|
||||||
private javax.swing.JCheckBox lookupFilesCheckBox;
|
|
||||||
private javax.swing.JLabel progressLabel;
|
private javax.swing.JLabel progressLabel;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.1" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
<Form version="1.4" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
<Form version="1.4" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
@ -19,9 +19,9 @@
|
|||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="addImgButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="crDbLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="crDbLabel" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="jLabel1" alignment="0" min="-2" pref="549" max="-2" attributes="0"/>
|
<Component id="jLabel1" alignment="0" min="-2" pref="549" max="-2" attributes="0"/>
|
||||||
|
<Component id="addImgButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
@ -34,9 +34,9 @@
|
|||||||
<Component id="crDbLabel" min="-2" max="-2" attributes="0"/>
|
<Component id="crDbLabel" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
<Component id="addImgButton" min="-2" max="-2" attributes="0"/>
|
<Component id="addImgButton" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="54" max="32767" attributes="0"/>
|
<EmptySpace pref="31" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
|
@ -77,9 +77,9 @@ final class AddImageVisualPanel3 extends JPanel {
|
|||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(addImgButton)
|
|
||||||
.addComponent(crDbLabel)
|
.addComponent(crDbLabel)
|
||||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 549, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 549, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(addImgButton))
|
||||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
@ -91,7 +91,7 @@ final class AddImageVisualPanel3 extends JPanel {
|
|||||||
.addComponent(jLabel1)
|
.addComponent(jLabel1)
|
||||||
.addGap(18, 18, 18)
|
.addGap(18, 18, 18)
|
||||||
.addComponent(addImgButton)
|
.addComponent(addImgButton)
|
||||||
.addContainerGap(54, Short.MAX_VALUE))
|
.addContainerGap(31, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
|
@ -151,6 +151,8 @@ class AddImageWizardIterator implements WizardDescriptor.Iterator<WizardDescript
|
|||||||
if (!hasPrevious()) {
|
if (!hasPrevious()) {
|
||||||
throw new NoSuchElementException();
|
throw new NoSuchElementException();
|
||||||
}
|
}
|
||||||
|
if(index == 2)
|
||||||
|
index--;
|
||||||
index--;
|
index--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,14 +21,24 @@ package org.sleuthkit.autopsy.casemodule;
|
|||||||
|
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
import javax.swing.JCheckBox;
|
||||||
import javax.swing.event.ChangeEvent;
|
import javax.swing.event.ChangeEvent;
|
||||||
import javax.swing.event.ChangeListener;
|
import javax.swing.event.ChangeListener;
|
||||||
import org.openide.WizardDescriptor;
|
import org.openide.WizardDescriptor;
|
||||||
import org.openide.util.HelpCtx;
|
import org.openide.util.HelpCtx;
|
||||||
import org.openide.util.Lookup;
|
import org.openide.util.Lookup;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.AutopsyPropFile;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
import org.sleuthkit.autopsy.hashdatabase.HashDbSettings;
|
||||||
|
import org.sleuthkit.datamodel.SleuthkitJNI;
|
||||||
|
import org.sleuthkit.datamodel.SleuthkitJNI.CaseDbHandle.AddImageProcess;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The "Add Image" wizard panel1 handling the logic of selecting image file(s)
|
* The "Add Image" wizard panel1 handling the logic of selecting image file(s)
|
||||||
@ -42,6 +52,9 @@ class AddImageWizardPanel1 implements WizardDescriptor.Panel<WizardDescriptor>,
|
|||||||
*/
|
*/
|
||||||
private AddImageVisualPanel1 component;
|
private AddImageVisualPanel1 component;
|
||||||
private boolean isNextEnable = false;
|
private boolean isNextEnable = false;
|
||||||
|
private static final String PROP_LASTIMAGE = "LBL_LastImage_PATH";
|
||||||
|
// paths to any set hash lookup databases (can be null)
|
||||||
|
private String NSRLPath, knownBadPath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the visual component for the panel. In this template, the component
|
* Get the visual component for the panel. In this template, the component
|
||||||
@ -158,6 +171,39 @@ class AddImageWizardPanel1 implements WizardDescriptor.Panel<WizardDescriptor>,
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void readSettings(WizardDescriptor settings) {
|
public void readSettings(WizardDescriptor settings) {
|
||||||
|
AddImageVisualPanel1 component = getComponent();
|
||||||
|
|
||||||
|
// Prepopulate the image directory from the properties file
|
||||||
|
String lastImageDirectory = AutopsyPropFile.getInstance().getProperty(PROP_LASTIMAGE);
|
||||||
|
component.getImagePathTextField().setText(lastImageDirectory);
|
||||||
|
|
||||||
|
// Load hash database settings, enable or disable the checkbox
|
||||||
|
this.NSRLPath = null;
|
||||||
|
this.knownBadPath = null;
|
||||||
|
try {
|
||||||
|
HashDbSettings hashDbs = HashDbSettings.getHashDbSettings();
|
||||||
|
this.NSRLPath = hashDbs.getNSRLDatabasePath();
|
||||||
|
this.knownBadPath = hashDbs.getKnownBadDatabasePath();
|
||||||
|
} catch (IOException ex) {
|
||||||
|
Log.get(AddImageWizardPanel1.class).log(Level.WARNING, "Couldn't get hash database settings.", ex);
|
||||||
|
}
|
||||||
|
JCheckBox lookupFilesCheckbox = component.getLookupFilesCheckbox();
|
||||||
|
lookupFilesCheckbox.setSelected(false);
|
||||||
|
lookupFilesCheckbox.setEnabled(this.NSRLPath != null || this.knownBadPath != null);
|
||||||
|
|
||||||
|
// If there is a process object in the settings, revert it and remove it from the settings
|
||||||
|
AddImageAction.CleanupTask cleanupTask = (AddImageAction.CleanupTask) settings.getProperty(AddImageAction.IMAGECLEANUPTASK_PROP);
|
||||||
|
if(cleanupTask != null){
|
||||||
|
try{
|
||||||
|
cleanupTask.cleanup();
|
||||||
|
}catch(Exception ex){
|
||||||
|
Logger logger = Logger.getLogger(AddImageWizardPanel1.class.getName());
|
||||||
|
logger.log(Level.WARNING, "Error cleaning up image task", ex);
|
||||||
|
}finally{
|
||||||
|
cleanupTask.disable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -173,6 +219,13 @@ class AddImageWizardPanel1 implements WizardDescriptor.Panel<WizardDescriptor>,
|
|||||||
public void storeSettings(WizardDescriptor settings) {
|
public void storeSettings(WizardDescriptor settings) {
|
||||||
settings.putProperty(AddImageAction.IMGPATHS_PROP, getComponent().getImagePaths());
|
settings.putProperty(AddImageAction.IMGPATHS_PROP, getComponent().getImagePaths());
|
||||||
settings.putProperty(AddImageAction.TIMEZONE_PROP, getComponent().getSelectedTimezone()); // store the timezone
|
settings.putProperty(AddImageAction.TIMEZONE_PROP, getComponent().getSelectedTimezone()); // store the timezone
|
||||||
|
settings.putProperty(AddImageAction.LOOKUPFILES_PROP, getComponent().getLookupFilesCheckboxChecked());
|
||||||
|
settings.putProperty(AddImageAction.SOLR_PROP, getComponent().getIndexImageCheckboxChecked());
|
||||||
|
|
||||||
|
// Store the path to the first image selected into the properties file
|
||||||
|
String firstImage = getComponent().getImagePaths()[0];
|
||||||
|
String firstImagePath = firstImage.substring(0, firstImage.lastIndexOf(File.separator)+1);
|
||||||
|
AutopsyPropFile.getInstance().setProperty(PROP_LASTIMAGE, firstImagePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ import javax.swing.event.ChangeListener;
|
|||||||
import org.openide.WizardDescriptor;
|
import org.openide.WizardDescriptor;
|
||||||
import org.openide.util.HelpCtx;
|
import org.openide.util.HelpCtx;
|
||||||
import org.openide.util.Lookup;
|
import org.openide.util.Lookup;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
import org.sleuthkit.autopsy.hashdatabase.HashDbSettings;
|
import org.sleuthkit.autopsy.hashdatabase.HashDbSettings;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
|
||||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||||
import org.sleuthkit.datamodel.SleuthkitJNI.CaseDbHandle.AddImageProcess;
|
import org.sleuthkit.datamodel.SleuthkitJNI.CaseDbHandle.AddImageProcess;
|
||||||
import org.sleuthkit.datamodel.TskException;
|
import org.sleuthkit.datamodel.TskException;
|
||||||
@ -57,6 +57,8 @@ class AddImageWizardPanel2 implements WizardDescriptor.Panel<WizardDescriptor> {
|
|||||||
// paths to any set hash lookup databases (can be null)
|
// paths to any set hash lookup databases (can be null)
|
||||||
private String NSRLPath, knownBadPath;
|
private String NSRLPath, knownBadPath;
|
||||||
|
|
||||||
|
private boolean lookupFilesCheckboxChecked;
|
||||||
|
|
||||||
// task that will clean up the created database file if the wizard is cancelled before it finishes
|
// task that will clean up the created database file if the wizard is cancelled before it finishes
|
||||||
private AddImageAction.CleanupTask cleanupImage; // initialized to null in readSettings()
|
private AddImageAction.CleanupTask cleanupImage; // initialized to null in readSettings()
|
||||||
|
|
||||||
@ -89,7 +91,6 @@ class AddImageWizardPanel2 implements WizardDescriptor.Panel<WizardDescriptor> {
|
|||||||
public AddImageVisualPanel2 getComponent() {
|
public AddImageVisualPanel2 getComponent() {
|
||||||
if (component == null) {
|
if (component == null) {
|
||||||
component = new AddImageVisualPanel2();
|
component = new AddImageVisualPanel2();
|
||||||
component.getCrDbButton().addActionListener(new CrDbButtonListener());
|
|
||||||
}
|
}
|
||||||
return component;
|
return component;
|
||||||
}
|
}
|
||||||
@ -122,20 +123,11 @@ class AddImageWizardPanel2 implements WizardDescriptor.Panel<WizardDescriptor> {
|
|||||||
return imgAdded;
|
return imgAdded;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CrDbButtonListener implements ActionListener {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
startAddImage();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the database and adds the image to the XML configuration file.
|
* Creates the database and adds the image to the XML configuration file.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private void startAddImage() {
|
private void startAddImage() {
|
||||||
component.getCrDbButton().setEnabled(false);
|
|
||||||
component.getCrDbProgressBar().setIndeterminate(true);
|
component.getCrDbProgressBar().setIndeterminate(true);
|
||||||
component.changeProgressBarTextAndColor("*Adding the image may take some time for large images.", 0, Color.black);
|
component.changeProgressBarTextAndColor("*Adding the image may take some time for large images.", 0, Color.black);
|
||||||
|
|
||||||
@ -207,38 +199,11 @@ class AddImageWizardPanel2 implements WizardDescriptor.Panel<WizardDescriptor> {
|
|||||||
imgAdded = false;
|
imgAdded = false;
|
||||||
imgPaths = (String[]) settings.getProperty(AddImageAction.IMGPATHS_PROP);
|
imgPaths = (String[]) settings.getProperty(AddImageAction.IMGPATHS_PROP);
|
||||||
timeZone = settings.getProperty(AddImageAction.TIMEZONE_PROP).toString();
|
timeZone = settings.getProperty(AddImageAction.TIMEZONE_PROP).toString();
|
||||||
|
lookupFilesCheckboxChecked = (Boolean) settings.getProperty(AddImageAction.LOOKUPFILES_PROP);
|
||||||
// If the user went back after the image was processed, it will be replaced so its cleanup task should be executed & removed
|
|
||||||
AddImageAction.CleanupTask oldImageCleanup = (AddImageAction.CleanupTask) settings.getProperty(AddImageAction.IMAGECLEANUPTASK_PROP);
|
|
||||||
if (oldImageCleanup != null) {
|
|
||||||
try {
|
|
||||||
oldImageCleanup.cleanup();
|
|
||||||
} catch (Exception ex) {
|
|
||||||
Logger logger = Logger.getLogger(AddImageWizardPanel2.class.getName());
|
|
||||||
logger.log(Level.WARNING, "Error removing previously added image", ex);
|
|
||||||
} finally {
|
|
||||||
oldImageCleanup.disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
component.changeProgressBarTextAndColor("", 0, Color.black);
|
component.changeProgressBarTextAndColor("", 0, Color.black);
|
||||||
component.getCrDbButton().setEnabled(true);
|
|
||||||
|
|
||||||
|
startAddImage();
|
||||||
// Load hash database settings
|
|
||||||
this.NSRLPath = null;
|
|
||||||
this.knownBadPath = null;
|
|
||||||
|
|
||||||
try {
|
|
||||||
HashDbSettings hashDbs = Autopsy.getHashDbSettings();
|
|
||||||
this.NSRLPath = hashDbs.getNSRLDatabasePath();
|
|
||||||
this.knownBadPath = hashDbs.getKnownBadDatabasePath();
|
|
||||||
} catch (IOException ex) {
|
|
||||||
Log.get(AddImageWizardPanel2.class).log(Level.WARNING, "Couldn't get hash database settings.", ex);
|
|
||||||
}
|
|
||||||
JCheckBox lookupFilesCheckbox = component.getLookupFilesCheckbox();
|
|
||||||
lookupFilesCheckbox.setSelected(false);
|
|
||||||
lookupFilesCheckbox.setEnabled(this.NSRLPath != null || this.knownBadPath != null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -262,7 +227,6 @@ class AddImageWizardPanel2 implements WizardDescriptor.Panel<WizardDescriptor> {
|
|||||||
*/
|
*/
|
||||||
private class AddImgTask extends SwingWorker<Integer, Integer> {
|
private class AddImgTask extends SwingWorker<Integer, Integer> {
|
||||||
private JProgressBar progressBar;
|
private JProgressBar progressBar;
|
||||||
private JCheckBox lookupFilesCheckbox;
|
|
||||||
private Case currentCase;
|
private Case currentCase;
|
||||||
|
|
||||||
// true if the process was requested to stop
|
// true if the process was requested to stop
|
||||||
@ -270,7 +234,6 @@ class AddImageWizardPanel2 implements WizardDescriptor.Panel<WizardDescriptor> {
|
|||||||
|
|
||||||
protected AddImgTask() {
|
protected AddImgTask() {
|
||||||
this.progressBar = getComponent().getCrDbProgressBar();
|
this.progressBar = getComponent().getCrDbProgressBar();
|
||||||
this.lookupFilesCheckbox = getComponent().getLookupFilesCheckbox();
|
|
||||||
currentCase = Case.getCurrentCase();
|
currentCase = Case.getCurrentCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,7 +259,7 @@ class AddImageWizardPanel2 implements WizardDescriptor.Panel<WizardDescriptor> {
|
|||||||
SleuthkitCase skCase = currentCase.getSleuthkitCase();
|
SleuthkitCase skCase = currentCase.getSleuthkitCase();
|
||||||
skCase.clearLookupDatabases();
|
skCase.clearLookupDatabases();
|
||||||
|
|
||||||
if (lookupFilesCheckbox.isSelected()) {
|
if (lookupFilesCheckboxChecked) {
|
||||||
if (NSRLPath != null) {
|
if (NSRLPath != null) {
|
||||||
skCase.setNSRLDatabase(NSRLPath);
|
skCase.setNSRLDatabase(NSRLPath);
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,14 @@
|
|||||||
package org.sleuthkit.autopsy.casemodule;
|
package org.sleuthkit.autopsy.casemodule;
|
||||||
|
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
import javax.swing.event.ChangeListener;
|
import javax.swing.event.ChangeListener;
|
||||||
import org.openide.WizardDescriptor;
|
import org.openide.WizardDescriptor;
|
||||||
import org.openide.util.HelpCtx;
|
import org.openide.util.HelpCtx;
|
||||||
|
import org.openide.util.Lookup;
|
||||||
|
import org.sleuthkit.datamodel.Image;
|
||||||
|
import org.sleuthkit.datamodel.SleuthkitJNI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The "Add Image" wizard panel3. No major functionality, just presents the
|
* The "Add Image" wizard panel3. No major functionality, just presents the
|
||||||
@ -140,6 +145,19 @@ class AddImageWizardPanel3 implements WizardDescriptor.Panel<WizardDescriptor> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void readSettings(WizardDescriptor settings) {
|
public void readSettings(WizardDescriptor settings) {
|
||||||
|
if ((SleuthkitJNI.CaseDbHandle.AddImageProcess) settings.getProperty(AddImageAction.PROCESS_PROP) != null) {
|
||||||
|
// commit anything
|
||||||
|
try {
|
||||||
|
commitImage(settings);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
// Log error/display warning
|
||||||
|
Logger logger = Logger.getLogger(AddImageAction.class.getName());
|
||||||
|
logger.log(Level.SEVERE, "Error adding image to case.", ex);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
Logger logger = Logger.getLogger(AddImageAction.class.getName());
|
||||||
|
logger.log(Level.SEVERE, "Missing image process object");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -154,4 +172,37 @@ class AddImageWizardPanel3 implements WizardDescriptor.Panel<WizardDescriptor> {
|
|||||||
@Override
|
@Override
|
||||||
public void storeSettings(WizardDescriptor settings) {
|
public void storeSettings(WizardDescriptor settings) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Commit the finished AddImageProcess, and cancel the CleanupTask that
|
||||||
|
* would have reverted it.
|
||||||
|
* @param settings property set to get AddImageProcess and CleanupTask from
|
||||||
|
* @throws Exception if commit or adding the image to the case failed
|
||||||
|
*/
|
||||||
|
private void commitImage(WizardDescriptor settings) throws Exception {
|
||||||
|
|
||||||
|
String[] imgPaths = (String[]) settings.getProperty(AddImageAction.IMGPATHS_PROP);
|
||||||
|
String timezone = settings.getProperty(AddImageAction.TIMEZONE_PROP).toString();
|
||||||
|
boolean indexImage = (Boolean) settings.getProperty(AddImageAction.SOLR_PROP);
|
||||||
|
|
||||||
|
SleuthkitJNI.CaseDbHandle.AddImageProcess process = (SleuthkitJNI.CaseDbHandle.AddImageProcess) settings.getProperty(AddImageAction.PROCESS_PROP);
|
||||||
|
|
||||||
|
try {
|
||||||
|
long imageId = process.commit();
|
||||||
|
Image newImage = Case.getCurrentCase().addImage(imgPaths, imageId, timezone);
|
||||||
|
|
||||||
|
if (indexImage) {
|
||||||
|
// Must use a Lookup here to prevent a circular dependency
|
||||||
|
// between Case and KeywordSearch...
|
||||||
|
Lookup.getDefault().lookup(AddImageAction.IndexImageTask.class).runTask(newImage);
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
// Can't bail and revert image add after commit, so disable image cleanup
|
||||||
|
// task
|
||||||
|
AddImageAction.CleanupTask cleanupImage = (AddImageAction.CleanupTask) settings.getProperty(AddImageAction.IMAGECLEANUPTASK_PROP);
|
||||||
|
cleanupImage.disable();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,70 +0,0 @@
|
|||||||
/*
|
|
||||||
* Autopsy Forensic Browser
|
|
||||||
*
|
|
||||||
* Copyright 2011 Basis Technology Corp.
|
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.sleuthkit.autopsy.casemodule;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import org.sleuthkit.autopsy.hashdatabase.HashDbSettings;
|
|
||||||
import org.sleuthkit.datamodel.SleuthkitJNI;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class to consolidate application-wide settings.
|
|
||||||
*/
|
|
||||||
public class Autopsy {
|
|
||||||
private final static String propFilePath = System.getProperty("netbeans.user") + File.separator + "autopsy.properties";
|
|
||||||
private static boolean verboseLogging = false;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the property file where the user properties such as Recent Cases
|
|
||||||
* and selected Hash Databases are stored.
|
|
||||||
* @return A new file handle
|
|
||||||
*/
|
|
||||||
public static File getPropertyFile() {
|
|
||||||
return new File(propFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the hash database settings as read from the property file.
|
|
||||||
* @return A new hash database settings object.
|
|
||||||
* @throws IOException if the property file can't be found
|
|
||||||
*/
|
|
||||||
public static HashDbSettings getHashDbSettings() throws IOException {
|
|
||||||
return new HashDbSettings(getPropertyFile());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Activate verbose logging for Sleuth Kit
|
|
||||||
*/
|
|
||||||
public static void startVerboseLogging() {
|
|
||||||
verboseLogging = true;
|
|
||||||
String logPath = System.getProperty("netbeans.user") + File.separator + "sleuthkit.txt";
|
|
||||||
|
|
||||||
SleuthkitJNI.startVerboseLogging(logPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if verbose logging has been enabled.
|
|
||||||
* @return true if verbose logging has been enabled.
|
|
||||||
*/
|
|
||||||
public static boolean verboseLoggingIsSet() {
|
|
||||||
return verboseLogging;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -90,7 +90,6 @@ OpenRecentCasePanel.jLabel1.text=Recent Cases
|
|||||||
AddImageVisualPanel1.imgInfoLabel.text=Enter Disk Image Information:
|
AddImageVisualPanel1.imgInfoLabel.text=Enter Disk Image Information:
|
||||||
AddImageVisualPanel2.crDbLabel.text=Adding Image
|
AddImageVisualPanel2.crDbLabel.text=Adding Image
|
||||||
AddImageVisualPanel2.jLabel5.text=Processing Image and Adding to Database :
|
AddImageVisualPanel2.jLabel5.text=Processing Image and Adding to Database :
|
||||||
AddImageVisualPanel2.crDbButton.text=Process Image
|
|
||||||
AddImageVisualPanel2.progressLabel.text=
|
AddImageVisualPanel2.progressLabel.text=
|
||||||
AddImageVisualPanel2.jLabel1.text=<html> We will now analyze the disk image to extract volume and file system data and populate a local database. This may <br>take a while on large images. </html>
|
AddImageVisualPanel2.jLabel1.text=<html> We will now analyze the disk image to extract volume and file system data and populate a local database. This may <br>take a while on large images. </html>
|
||||||
AddImageVisualPanel3.addImgButton.text=Add Another Image
|
AddImageVisualPanel3.addImgButton.text=Add Another Image
|
||||||
@ -112,4 +111,7 @@ NewJPanel.jLabel5.text=The NSRL index is used to idenify "known" files.
|
|||||||
NewJPanel.jFormattedTextField1.text=jFormattedTextField1
|
NewJPanel.jFormattedTextField1.text=jFormattedTextField1
|
||||||
NewJPanel.jButton1.text=Rename
|
NewJPanel.jButton1.text=Rename
|
||||||
NewJPanel.jLabel4.text=Database:
|
NewJPanel.jLabel4.text=Database:
|
||||||
AddImageVisualPanel2.lookupFilesCheckBox.text=Lookup files in hash databases
|
AddImageVisualPanel2.indexImageCheckBox.text=Index image for keyword search
|
||||||
|
AddImageVisualPanel1.lookupFilesCheckBox.text=Lookup files in hash databases
|
||||||
|
AddImageVisualPanel1.jLabel2.text=<html> Press 'Next' to analyze the disk image to extract volume and file system data and populate a local database. This may <br>take a while on large images. </html>
|
||||||
|
AddImageVisualPanel1.indexImageCheckbox.text=Index Image for Keyword Search
|
||||||
|
23
Case/src/org/sleuthkit/autopsy/casemodule/Case.java
Normal file → Executable file
23
Case/src/org/sleuthkit/autopsy/casemodule/Case.java
Normal file → Executable file
@ -38,6 +38,7 @@ import java.util.Set;
|
|||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
import javax.swing.SwingUtilities;
|
||||||
import org.openide.DialogDisplayer;
|
import org.openide.DialogDisplayer;
|
||||||
import org.openide.NotifyDescriptor;
|
import org.openide.NotifyDescriptor;
|
||||||
import org.openide.util.Lookup;
|
import org.openide.util.Lookup;
|
||||||
@ -45,7 +46,7 @@ import org.openide.util.actions.CallableSystemAction;
|
|||||||
import org.openide.util.actions.SystemAction;
|
import org.openide.util.actions.SystemAction;
|
||||||
import org.openide.windows.WindowManager;
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.corecomponentinterfaces.CoreComponentControl;
|
import org.sleuthkit.autopsy.corecomponentinterfaces.CoreComponentControl;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
import org.sleuthkit.datamodel.*;
|
import org.sleuthkit.datamodel.*;
|
||||||
import org.sleuthkit.datamodel.SleuthkitJNI.CaseDbHandle.AddImageProcess;
|
import org.sleuthkit.datamodel.SleuthkitJNI.CaseDbHandle.AddImageProcess;
|
||||||
|
|
||||||
@ -230,7 +231,7 @@ public class Case {
|
|||||||
* @param imgId the ID of the image that being added
|
* @param imgId the ID of the image that being added
|
||||||
* @param timeZone the timeZone of the image where it's added
|
* @param timeZone the timeZone of the image where it's added
|
||||||
*/
|
*/
|
||||||
void addImage(String[] imgPaths, long imgId, String timeZone) throws Exception {
|
Image addImage(String[] imgPaths, long imgId, String timeZone) throws Exception {
|
||||||
Log.get(this.getClass()).log(Level.INFO, "Adding image to Case. imgPaths: {0} ID: {1} TimeZone: {2}", new Object[]{Arrays.toString(imgPaths), imgId, timeZone});
|
Log.get(this.getClass()).log(Level.INFO, "Adding image to Case. imgPaths: {0} ID: {1} TimeZone: {2}", new Object[]{Arrays.toString(imgPaths), imgId, timeZone});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -238,6 +239,7 @@ public class Case {
|
|||||||
xmlcm.writeFile(); // write any changes to the config file
|
xmlcm.writeFile(); // write any changes to the config file
|
||||||
Image newImage = db.getImageById(imgId);
|
Image newImage = db.getImageById(imgId);
|
||||||
pcs.firePropertyChange(CASE_ADD_IMAGE, null, newImage); // the new value is the instance of the image
|
pcs.firePropertyChange(CASE_ADD_IMAGE, null, newImage); // the new value is the instance of the image
|
||||||
|
return newImage;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
// throw an error here
|
// throw an error here
|
||||||
throw ex;
|
throw ex;
|
||||||
@ -714,7 +716,7 @@ public class Case {
|
|||||||
* Call if there are no images in the case. Displays
|
* Call if there are no images in the case. Displays
|
||||||
* a dialog offering to add one.
|
* a dialog offering to add one.
|
||||||
*/
|
*/
|
||||||
private void noRootObjectsNotification() throws TskException {
|
private static void noRootObjectsNotification() {
|
||||||
NotifyDescriptor nd = new NotifyDescriptor(
|
NotifyDescriptor nd = new NotifyDescriptor(
|
||||||
"This case contains no images. Would you like to add one?",
|
"This case contains no images. Would you like to add one?",
|
||||||
"No images in case", NotifyDescriptor.YES_NO_OPTION,
|
"No images in case", NotifyDescriptor.YES_NO_OPTION,
|
||||||
@ -775,9 +777,7 @@ public class Case {
|
|||||||
Object oldValue = evt.getOldValue();
|
Object oldValue = evt.getOldValue();
|
||||||
Object newValue = evt.getNewValue();
|
Object newValue = evt.getNewValue();
|
||||||
|
|
||||||
|
|
||||||
if (changed.equals(Case.CASE_CURRENT_CASE)) {
|
if (changed.equals(Case.CASE_CURRENT_CASE)) {
|
||||||
try {
|
|
||||||
if (newValue != null) { // new case is open
|
if (newValue != null) { // new case is open
|
||||||
Case newCase = (Case) newValue;
|
Case newCase = (Case) newValue;
|
||||||
|
|
||||||
@ -796,8 +796,12 @@ public class Case {
|
|||||||
} else {
|
} else {
|
||||||
// close all top components
|
// close all top components
|
||||||
CoreComponentControl.closeCoreWindows();
|
CoreComponentControl.closeCoreWindows();
|
||||||
// notify user
|
// prompt user to add an image
|
||||||
newCase.noRootObjectsNotification();
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
Case.noRootObjectsNotification();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else { // case is closed
|
} else { // case is closed
|
||||||
// disable these menus
|
// disable these menus
|
||||||
@ -812,11 +816,8 @@ public class Case {
|
|||||||
Frame f = WindowManager.getDefault().getMainWindow();
|
Frame f = WindowManager.getDefault().getMainWindow();
|
||||||
f.setTitle(Case.getAppName()); // set the window name to just application name
|
f.setTitle(Case.getAppName()); // set the window name to just application name
|
||||||
}
|
}
|
||||||
} catch (TskException ex) {
|
|
||||||
Log.get(CaseListener.class).log(Level.WARNING, "Error handling change in current case.", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// changed in the case name
|
// changed in the case name
|
||||||
if (changed.equals(Case.CASE_NAME)) {
|
if (changed.equals(Case.CASE_NAME)) {
|
||||||
|
@ -31,7 +31,7 @@ import org.openide.util.HelpCtx;
|
|||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.util.actions.CallableSystemAction;
|
import org.openide.util.actions.CallableSystemAction;
|
||||||
import org.openide.util.actions.Presenter;
|
import org.openide.util.actions.Presenter;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The action to close the current Case. This class should be disabled on
|
* The action to close the current Case. This class should be disabled on
|
||||||
|
@ -32,7 +32,7 @@ import org.openide.NotifyDescriptor;
|
|||||||
import org.openide.util.HelpCtx;
|
import org.openide.util.HelpCtx;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.util.actions.CallableSystemAction;
|
import org.openide.util.actions.CallableSystemAction;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The action to delete the current Case. This class should be disabled on
|
* The action to delete the current Case. This class should be disabled on
|
||||||
|
@ -23,7 +23,7 @@ import java.awt.event.ActionEvent;
|
|||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import org.openide.util.actions.SystemAction;
|
import org.openide.util.actions.SystemAction;
|
||||||
import org.openide.util.lookup.ServiceProvider;
|
import org.openide.util.lookup.ServiceProvider;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The action to create a new case. This action class is always enabled.
|
* The action to create a new case. This action class is always enabled.
|
||||||
|
@ -28,7 +28,8 @@ import java.util.logging.Logger;
|
|||||||
import javax.swing.JFileChooser;
|
import javax.swing.JFileChooser;
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
import org.openide.util.lookup.ServiceProvider;
|
import org.openide.util.lookup.ServiceProvider;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.AutopsyPropFile;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The action to open a existing case. This class is always enabled.
|
* The action to open a existing case. This class is always enabled.
|
||||||
@ -38,6 +39,8 @@ import org.sleuthkit.autopsy.logging.Log;
|
|||||||
@ServiceProvider(service = CaseOpenAction.class)
|
@ServiceProvider(service = CaseOpenAction.class)
|
||||||
public final class CaseOpenAction implements ActionListener {
|
public final class CaseOpenAction implements ActionListener {
|
||||||
private static final Logger logger = Logger.getLogger(CaseOpenAction.class.getName());
|
private static final Logger logger = Logger.getLogger(CaseOpenAction.class.getName());
|
||||||
|
private static final String PROP_BASECASE = "LBL_BaseCase_PATH";
|
||||||
|
AutopsyPropFile AutopsyProperties = AutopsyPropFile.getInstance();
|
||||||
|
|
||||||
JFileChooser fc = new JFileChooser();
|
JFileChooser fc = new JFileChooser();
|
||||||
GeneralFilter autFilter = new GeneralFilter(new String[]{".aut"}, "AUTOPSY File (*.aut)", false);
|
GeneralFilter autFilter = new GeneralFilter(new String[]{".aut"}, "AUTOPSY File (*.aut)", false);
|
||||||
@ -48,6 +51,8 @@ public final class CaseOpenAction implements ActionListener {
|
|||||||
fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
||||||
fc.setMultiSelectionEnabled(false);
|
fc.setMultiSelectionEnabled(false);
|
||||||
fc.addChoosableFileFilter(autFilter);
|
fc.addChoosableFileFilter(autFilter);
|
||||||
|
if(AutopsyProperties.getProperty(PROP_BASECASE) != null)
|
||||||
|
fc.setCurrentDirectory(new File(AutopsyProperties.getProperty(PROP_BASECASE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -63,7 +68,8 @@ public final class CaseOpenAction implements ActionListener {
|
|||||||
int retval = fc.showOpenDialog((Component) e.getSource());
|
int retval = fc.showOpenDialog((Component) e.getSource());
|
||||||
if (retval == JFileChooser.APPROVE_OPTION) {
|
if (retval == JFileChooser.APPROVE_OPTION) {
|
||||||
String path = fc.getSelectedFile().getPath();
|
String path = fc.getSelectedFile().getPath();
|
||||||
|
String dirPath = fc.getSelectedFile().getParent();
|
||||||
|
AutopsyProperties.setProperty(PROP_BASECASE, dirPath.substring(0, dirPath.lastIndexOf(File.separator)));
|
||||||
// check if the file exists
|
// check if the file exists
|
||||||
if (!new File(path).exists()) {
|
if (!new File(path).exists()) {
|
||||||
JOptionPane.showMessageDialog(null, "Error: File doesn't exist.", "Error", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(null, "Error: File doesn't exist.", "Error", JOptionPane.ERROR_MESSAGE);
|
||||||
|
@ -31,7 +31,7 @@ import javax.swing.JFrame;
|
|||||||
import org.openide.util.HelpCtx;
|
import org.openide.util.HelpCtx;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.util.actions.CallableSystemAction;
|
import org.openide.util.actions.CallableSystemAction;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The action to pop up the Case Properties Form window. By using this form,
|
* The action to pop up the Case Properties Form window. By using this form,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.1" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
|
@ -23,6 +23,7 @@ import java.awt.Component;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import javax.swing.JFileChooser;
|
import javax.swing.JFileChooser;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JTextField;
|
||||||
import javax.swing.event.DocumentEvent;
|
import javax.swing.event.DocumentEvent;
|
||||||
import javax.swing.event.DocumentListener;
|
import javax.swing.event.DocumentListener;
|
||||||
|
|
||||||
@ -72,6 +73,10 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener{
|
|||||||
return this.caseParentDirTextField.getText();
|
return this.caseParentDirTextField.getText();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public JTextField getCaseParentDirTextField(){
|
||||||
|
return this.caseParentDirTextField;
|
||||||
|
}
|
||||||
|
|
||||||
/** This method is called from within the constructor to initialize the form.
|
/** This method is called from within the constructor to initialize the form.
|
||||||
* WARNING: Do NOT modify this code. The content of this method is always
|
* WARNING: Do NOT modify this code. The content of this method is always
|
||||||
* regenerated by the Form Editor.
|
* regenerated by the Form Editor.
|
||||||
@ -168,7 +173,7 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener{
|
|||||||
// show the directory chooser where the case directory will be created
|
// show the directory chooser where the case directory will be created
|
||||||
fc.setDragEnabled(false);
|
fc.setDragEnabled(false);
|
||||||
if(!caseParentDirTextField.getText().trim().equals("")){
|
if(!caseParentDirTextField.getText().trim().equals("")){
|
||||||
fc.setSelectedFile(new File(caseParentDirTextField.getText()));
|
fc.setCurrentDirectory(new File(caseParentDirTextField.getText()));
|
||||||
}
|
}
|
||||||
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
||||||
//fc.setSelectedFile(new File("C:\\Program Files\\"));
|
//fc.setSelectedFile(new File("C:\\Program Files\\"));
|
||||||
|
@ -32,7 +32,7 @@ import org.openide.WizardDescriptor;
|
|||||||
import org.openide.util.HelpCtx;
|
import org.openide.util.HelpCtx;
|
||||||
import org.openide.util.actions.CallableSystemAction;
|
import org.openide.util.actions.CallableSystemAction;
|
||||||
import org.openide.util.actions.SystemAction;
|
import org.openide.util.actions.SystemAction;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action to open the New Case wizard.
|
* Action to open the New Case wizard.
|
||||||
|
@ -33,6 +33,7 @@ import org.openide.NotifyDescriptor;
|
|||||||
import org.openide.WizardDescriptor;
|
import org.openide.WizardDescriptor;
|
||||||
import org.openide.WizardValidationException;
|
import org.openide.WizardValidationException;
|
||||||
import org.openide.util.HelpCtx;
|
import org.openide.util.HelpCtx;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.AutopsyPropFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The "New Case" wizard panel with a component on it. This class represents
|
* The "New Case" wizard panel with a component on it. This class represents
|
||||||
@ -49,6 +50,7 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel<WizardDesc
|
|||||||
*/
|
*/
|
||||||
private NewCaseVisualPanel1 component;
|
private NewCaseVisualPanel1 component;
|
||||||
private Boolean isFinish = false;
|
private Boolean isFinish = false;
|
||||||
|
private static final String PROP_BASECASE = "LBL_BaseCase_PATH";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the visual component for the panel. In this template, the component
|
* Get the visual component for the panel. In this template, the component
|
||||||
@ -162,6 +164,9 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel<WizardDesc
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void readSettings(WizardDescriptor settings) {
|
public void readSettings(WizardDescriptor settings) {
|
||||||
|
NewCaseVisualPanel1 component = getComponent();
|
||||||
|
String lastBaseDirectory = AutopsyPropFile.getInstance().getProperty(PROP_BASECASE);
|
||||||
|
component.getCaseParentDirTextField().setText(lastBaseDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -177,6 +182,7 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel<WizardDesc
|
|||||||
public void storeSettings(WizardDescriptor settings) {
|
public void storeSettings(WizardDescriptor settings) {
|
||||||
settings.putProperty("caseName", getComponent().getCaseName());
|
settings.putProperty("caseName", getComponent().getCaseName());
|
||||||
settings.putProperty("caseParentDir", getComponent().getCaseParentDir());
|
settings.putProperty("caseParentDir", getComponent().getCaseParentDir());
|
||||||
|
AutopsyPropFile.getInstance().setProperty(PROP_BASECASE, getComponent().getCaseParentDir());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -36,8 +36,9 @@ import javax.swing.JMenuItem;
|
|||||||
import org.openide.util.HelpCtx;
|
import org.openide.util.HelpCtx;
|
||||||
import org.openide.util.actions.CallableSystemAction;
|
import org.openide.util.actions.CallableSystemAction;
|
||||||
import org.openide.util.actions.Presenter;
|
import org.openide.util.actions.Presenter;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
import org.openide.filesystems.FileUtil;
|
import org.openide.filesystems.FileUtil;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.AutopsyPropFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The action in this class is to clear the list of "Recent Cases".
|
* The action in this class is to clear the list of "Recent Cases".
|
||||||
@ -51,7 +52,7 @@ public final class RecentCases extends CallableSystemAction implements Presenter
|
|||||||
static final String PATH_PROP_KEY = "LBL_RecentCase_Path";
|
static final String PATH_PROP_KEY = "LBL_RecentCase_Path";
|
||||||
static final RecentCase BLANK_RECENTCASE = new RecentCase("", "");
|
static final RecentCase BLANK_RECENTCASE = new RecentCase("", "");
|
||||||
// get the path of the case.properties file in the user directory
|
// get the path of the case.properties file in the user directory
|
||||||
private final static String propFilePath = System.getProperty("netbeans.user") + File.separator + "autopsy.properties";
|
private final static String propFilePath = AutopsyPropFile.getPropertiesFilePath();
|
||||||
|
|
||||||
private final static RecentCases INSTANCE = new RecentCases();
|
private final static RecentCases INSTANCE = new RecentCases();
|
||||||
|
|
||||||
@ -86,6 +87,7 @@ public final class RecentCases extends CallableSystemAction implements Presenter
|
|||||||
// try to load all the recent cases from the properties file in the home directory
|
// try to load all the recent cases from the properties file in the home directory
|
||||||
InputStream inputStream = new FileInputStream(propFilePath);
|
InputStream inputStream = new FileInputStream(propFilePath);
|
||||||
properties.load(inputStream);
|
properties.load(inputStream);
|
||||||
|
inputStream.close();
|
||||||
} catch (Exception ignore) {
|
} catch (Exception ignore) {
|
||||||
// if cannot load it, we create a new properties file without any data inside it
|
// if cannot load it, we create a new properties file without any data inside it
|
||||||
try {
|
try {
|
||||||
@ -99,6 +101,7 @@ public final class RecentCases extends CallableSystemAction implements Presenter
|
|||||||
output.createNewFile();
|
output.createNewFile();
|
||||||
FileOutputStream fos = new FileOutputStream(output);
|
FileOutputStream fos = new FileOutputStream(output);
|
||||||
properties.store(fos, "");
|
properties.store(fos, "");
|
||||||
|
fos.close();
|
||||||
} else {
|
} else {
|
||||||
// if the property file already exist, throw an error that says cannot load that file
|
// if the property file already exist, throw an error that says cannot load that file
|
||||||
Logger.getLogger(RecentCases.class.getName()).log(Level.WARNING, "Error: Could not load the property file.", new Exception("The properties file already exist and can't load that file."));
|
Logger.getLogger(RecentCases.class.getName()).log(Level.WARNING, "Error: Could not load the property file.", new Exception("The properties file already exist and can't load that file."));
|
||||||
|
@ -26,7 +26,7 @@ import java.util.logging.Level;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is used to add the action to the recent case menu item. When the
|
* This class is used to add the action to the recent case menu item. When the
|
||||||
|
@ -20,7 +20,7 @@ package org.sleuthkit.autopsy.hashdatabase;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
import org.sleuthkit.datamodel.SleuthkitJNI;
|
import org.sleuthkit.datamodel.SleuthkitJNI;
|
||||||
import org.sleuthkit.datamodel.TskException;
|
import org.sleuthkit.datamodel.TskException;
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ import org.openide.DialogDisplayer;
|
|||||||
import org.openide.NotifyDescriptor;
|
import org.openide.NotifyDescriptor;
|
||||||
import org.openide.util.HelpCtx;
|
import org.openide.util.HelpCtx;
|
||||||
import org.openide.util.actions.CallableSystemAction;
|
import org.openide.util.actions.CallableSystemAction;
|
||||||
import org.sleuthkit.autopsy.casemodule.Autopsy;
|
import org.sleuthkit.autopsy.coreutils.AutopsyPropFile;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The HashDbMgmtAction opens the HashDbMgmtPanel in a dialog, and saves the
|
* The HashDbMgmtAction opens the HashDbMgmtPanel in a dialog, and saves the
|
||||||
@ -48,7 +48,7 @@ class HashDbMgmtAction extends CallableSystemAction {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Load settings from the property file
|
// Load settings from the property file
|
||||||
HashDbSettings hashDatabaseSettings = new HashDbSettings(Autopsy.getPropertyFile());
|
HashDbSettings hashDatabaseSettings = new HashDbSettings(AutopsyPropFile.getPropertyFile());
|
||||||
|
|
||||||
// create the popUp window for it
|
// create the popUp window for it
|
||||||
final JFrame frame = new JFrame(ACTION_NAME);
|
final JFrame frame = new JFrame(ACTION_NAME);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.1" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
@ -20,7 +20,7 @@
|
|||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="databaseNameLabel" min="-2" max="-2" attributes="0"/>
|
<Component id="databaseNameLabel" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="102" alignment="0" max="-2" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
@ -30,7 +30,7 @@ import java.io.IOException;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import javax.swing.JFileChooser;
|
import javax.swing.JFileChooser;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
import org.sleuthkit.datamodel.TskException;
|
import org.sleuthkit.datamodel.TskException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,6 +26,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.AutopsyPropFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads and stores Hash Database settings from/to a property file
|
* Loads and stores Hash Database settings from/to a property file
|
||||||
@ -111,6 +112,15 @@ public class HashDbSettings {
|
|||||||
return this.NSRLDatabase;
|
return this.NSRLDatabase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the hash database settings as read from the property file.
|
||||||
|
* @return A new hash database settings object.
|
||||||
|
* @throws IOException if the property file can't be found
|
||||||
|
*/
|
||||||
|
public static HashDbSettings getHashDbSettings() throws IOException {
|
||||||
|
return new HashDbSettings(AutopsyPropFile.getPropertyFile());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets known bad database if there is one
|
* Gets known bad database if there is one
|
||||||
* @return database (can be null)
|
* @return database (can be null)
|
||||||
|
@ -38,6 +38,12 @@ public interface DataContentViewer {
|
|||||||
*/
|
*/
|
||||||
public String getTitle();
|
public String getTitle();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a short description of this viewer to use as a tool tip for
|
||||||
|
* its tab.
|
||||||
|
*/
|
||||||
|
public String getToolTip();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get new DataContentViewer instance. (This method is weird. We use the
|
* Get new DataContentViewer instance. (This method is weird. We use the
|
||||||
* instance returned by the Lookup as a factory for the instances that
|
* instance returned by the Lookup as a factory for the instances that
|
||||||
@ -63,4 +69,13 @@ public interface DataContentViewer {
|
|||||||
*/
|
*/
|
||||||
public boolean isSupported(Node node);
|
public boolean isSupported(Node node);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether the given viewer is preferred for the Node
|
||||||
|
* @param node Node to check for preference
|
||||||
|
* @param isSupported, true if the viewer is supported by the node
|
||||||
|
* as determined by a previous check
|
||||||
|
* @return True if viewer preferred, else false
|
||||||
|
*/
|
||||||
|
public boolean isPreferred(Node node, boolean isSupported);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -61,4 +61,10 @@ public interface DataResultViewer {
|
|||||||
* preparation for permanently disposing of it.
|
* preparation for permanently disposing of it.
|
||||||
*/
|
*/
|
||||||
public void clearComponent();
|
public void clearComponent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Expand node, if supported by the viewed
|
||||||
|
* @param n Node to expand
|
||||||
|
*/
|
||||||
|
public void expandNode(Node n);
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
build.xml.data.CRC32=8f8b60b5
|
build.xml.data.CRC32=f7f11023
|
||||||
build.xml.script.CRC32=d7506201
|
build.xml.script.CRC32=d7506201
|
||||||
build.xml.stylesheet.CRC32=a56c6a5b@1.46.2
|
build.xml.stylesheet.CRC32=a56c6a5b@2.47.1
|
||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=8f8b60b5
|
nbproject/build-impl.xml.data.CRC32=f7f11023
|
||||||
nbproject/build-impl.xml.script.CRC32=c3845be2
|
nbproject/build-impl.xml.script.CRC32=c3845be2
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.46.2
|
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.47.1
|
||||||
|
@ -132,6 +132,15 @@
|
|||||||
<specification-version>1.0</specification-version>
|
<specification-version>1.0</specification-version>
|
||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.sleuthkit.autopsy.coreutils</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<release-version>0-1</release-version>
|
||||||
|
<specification-version>0.0</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<code-name-base>org.sleuthkit.autopsy.datamodel</code-name-base>
|
<code-name-base>org.sleuthkit.autopsy.datamodel</code-name-base>
|
||||||
<build-prerequisite/>
|
<build-prerequisite/>
|
||||||
@ -141,15 +150,6 @@
|
|||||||
<specification-version>1.0</specification-version>
|
<specification-version>1.0</specification-version>
|
||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<code-name-base>org.sleuthkit.autopsy.logging</code-name-base>
|
|
||||||
<build-prerequisite/>
|
|
||||||
<compile-dependency/>
|
|
||||||
<run-dependency>
|
|
||||||
<release-version>0-1</release-version>
|
|
||||||
<specification-version>0.0</specification-version>
|
|
||||||
</run-dependency>
|
|
||||||
</dependency>
|
|
||||||
</module-dependencies>
|
</module-dependencies>
|
||||||
<public-packages>
|
<public-packages>
|
||||||
<package>org.sleuthkit.autopsy.corecomponents</package>
|
<package>org.sleuthkit.autopsy.corecomponents</package>
|
||||||
|
@ -23,7 +23,7 @@ import org.openide.util.NbBundle;
|
|||||||
import org.netbeans.core.actions.AboutAction;
|
import org.netbeans.core.actions.AboutAction;
|
||||||
import org.openide.DialogDescriptor;
|
import org.openide.DialogDescriptor;
|
||||||
import org.openide.DialogDisplayer;
|
import org.openide.DialogDisplayer;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action to open custom implementation of the "About" window from the Help menu.
|
* Action to open custom implementation of the "About" window from the Help menu.
|
||||||
|
26
CoreComponents/src/org/sleuthkit/autopsy/corecomponents/DataContentTopComponent.java
Normal file → Executable file
26
CoreComponents/src/org/sleuthkit/autopsy/corecomponents/DataContentTopComponent.java
Normal file → Executable file
@ -97,6 +97,10 @@ public final class DataContentTopComponent extends TopComponent implements DataC
|
|||||||
boolean isSupported(Node node) {
|
boolean isSupported(Node node) {
|
||||||
return this.wrapped.isSupported(node);
|
return this.wrapped.isSupported(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isPreferred(Node node, boolean isSupported) {
|
||||||
|
return this.wrapped.isPreferred(node, isSupported);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -191,11 +195,12 @@ public final class DataContentTopComponent extends TopComponent implements DataC
|
|||||||
for (DataContentViewer factory : Lookup.getDefault().lookupAll(DataContentViewer.class)) {
|
for (DataContentViewer factory : Lookup.getDefault().lookupAll(DataContentViewer.class)) {
|
||||||
DataContentViewer dcv = factory.getInstance();
|
DataContentViewer dcv = factory.getInstance();
|
||||||
this.viewers.add(new UpdateWrapper(dcv));
|
this.viewers.add(new UpdateWrapper(dcv));
|
||||||
dataContentTabbedPane.addTab(dcv.getTitle(), dcv.getComponent());
|
dataContentTabbedPane.addTab(dcv.getTitle(), null,
|
||||||
|
dcv.getComponent(), dcv.getToolTip());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resetTabs(currentNode);
|
setupTabs(currentNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -243,14 +248,7 @@ public final class DataContentTopComponent extends TopComponent implements DataC
|
|||||||
|
|
||||||
currentNode = selectedNode;
|
currentNode = selectedNode;
|
||||||
|
|
||||||
resetTabs(selectedNode);
|
setupTabs(selectedNode);
|
||||||
|
|
||||||
// set the display on the current active tab
|
|
||||||
int currentActiveTab = dataContentTabbedPane.getSelectedIndex();
|
|
||||||
if (currentActiveTab != -1) {
|
|
||||||
UpdateWrapper dcv = viewers.get(currentActiveTab);
|
|
||||||
dcv.setNode(selectedNode);
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
this.setCursor(null);
|
this.setCursor(null);
|
||||||
}
|
}
|
||||||
@ -291,7 +289,7 @@ public final class DataContentTopComponent extends TopComponent implements DataC
|
|||||||
*
|
*
|
||||||
* @param selectedNode the selected content Node
|
* @param selectedNode the selected content Node
|
||||||
*/
|
*/
|
||||||
public void resetTabs(Node selectedNode) {
|
public void setupTabs(Node selectedNode) {
|
||||||
|
|
||||||
int totalTabs = dataContentTabbedPane.getTabCount();
|
int totalTabs = dataContentTabbedPane.getTabCount();
|
||||||
|
|
||||||
@ -302,7 +300,8 @@ public final class DataContentTopComponent extends TopComponent implements DataC
|
|||||||
dcv.resetComponent();
|
dcv.resetComponent();
|
||||||
|
|
||||||
// disable an unsupported tab (ex: picture viewer)
|
// disable an unsupported tab (ex: picture viewer)
|
||||||
if (!dcv.isSupported(selectedNode)) {
|
boolean dcvSupported = dcv.isSupported(selectedNode);
|
||||||
|
if (! dcvSupported) {
|
||||||
dataContentTabbedPane.setEnabledAt(i, false);
|
dataContentTabbedPane.setEnabledAt(i, false);
|
||||||
|
|
||||||
// change the tab selection if it's the current selection
|
// change the tab selection if it's the current selection
|
||||||
@ -315,6 +314,9 @@ public final class DataContentTopComponent extends TopComponent implements DataC
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dataContentTabbedPane.setEnabledAt(i, true);
|
dataContentTabbedPane.setEnabledAt(i, true);
|
||||||
|
if (dcv.isPreferred(selectedNode, dcvSupported))
|
||||||
|
dataContentTabbedPane.setSelectedIndex(i);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int newIndex = dataContentTabbedPane.getSelectedIndex();
|
int newIndex = dataContentTabbedPane.getSelectedIndex();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.1" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
|
@ -223,11 +223,9 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set the data on the bottom and show it
|
// set the data on the bottom and show it
|
||||||
String text = "";
|
|
||||||
Boolean setVisible = false;
|
Boolean setVisible = false;
|
||||||
|
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
text = DataConversion.getString(data, 4);
|
|
||||||
setVisible = true;
|
setVisible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,6 +287,12 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
|||||||
return "Hex View";
|
return "Hex View";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getToolTip() {
|
||||||
|
return "Displays the binary contents of a file as hexidecimal, with "
|
||||||
|
+ "bytes that are displayable as ASCII characters on the right.";
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DataContentViewer getInstance() {
|
public DataContentViewer getInstance() {
|
||||||
return new DataContentViewerHex();
|
return new DataContentViewerHex();
|
||||||
@ -297,8 +301,8 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
|||||||
@Override
|
@Override
|
||||||
public void resetComponent() {
|
public void resetComponent() {
|
||||||
// clear / reset the fields
|
// clear / reset the fields
|
||||||
currentOffset = 0;
|
|
||||||
currentPage = 1;
|
currentPage = 1;
|
||||||
|
currentOffset = 0;
|
||||||
this.dataSource = null;
|
this.dataSource = null;
|
||||||
currentPageLabel.setText("");
|
currentPageLabel.setText("");
|
||||||
totalPageLabel.setText("");
|
totalPageLabel.setText("");
|
||||||
@ -327,6 +331,11 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPreferred(Node node, boolean isSupported) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Component getComponent() {
|
public Component getComponent() {
|
||||||
return this;
|
return this;
|
||||||
|
@ -119,6 +119,11 @@ public class DataContentViewerPicture extends javax.swing.JPanel implements Data
|
|||||||
return "Picture View";
|
return "Picture View";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getToolTip() {
|
||||||
|
return "Displays supported image files.";
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DataContentViewer getInstance() {
|
public DataContentViewer getInstance() {
|
||||||
return new DataContentViewerPicture();
|
return new DataContentViewerPicture();
|
||||||
@ -149,6 +154,11 @@ public class DataContentViewerPicture extends javax.swing.JPanel implements Data
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPreferred(Node node, boolean isSupported) {
|
||||||
|
return isSupported;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Component getComponent() {
|
public Component getComponent() {
|
||||||
return this;
|
return this;
|
||||||
|
@ -283,6 +283,11 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
|
|||||||
return "String View";
|
return "String View";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getToolTip() {
|
||||||
|
return "Displays ASCII strings extracted from the file.";
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DataContentViewer getInstance() {
|
public DataContentViewer getInstance() {
|
||||||
return new DataContentViewerString();
|
return new DataContentViewerString();
|
||||||
@ -291,8 +296,8 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
|
|||||||
@Override
|
@Override
|
||||||
public void resetComponent() {
|
public void resetComponent() {
|
||||||
// clear / reset the fields
|
// clear / reset the fields
|
||||||
currentOffset = 0;
|
|
||||||
currentPage = 1;
|
currentPage = 1;
|
||||||
|
currentOffset = 0;
|
||||||
this.dataSource = null;
|
this.dataSource = null;
|
||||||
currentPageLabel.setText("");
|
currentPageLabel.setText("");
|
||||||
totalPageLabel.setText("");
|
totalPageLabel.setText("");
|
||||||
@ -306,6 +311,11 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPreferred(Node node, boolean isSupported) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Component getComponent() {
|
public Component getComponent() {
|
||||||
return this;
|
return this;
|
||||||
|
@ -25,7 +25,9 @@ import java.io.IOException;
|
|||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
import javax.swing.ListSelectionModel;
|
import javax.swing.ListSelectionModel;
|
||||||
import org.openide.explorer.ExplorerManager;
|
import org.openide.explorer.ExplorerManager;
|
||||||
@ -36,6 +38,7 @@ import org.openide.nodes.Node;
|
|||||||
import org.openide.nodes.Node.Property;
|
import org.openide.nodes.Node.Property;
|
||||||
import org.openide.nodes.Node.PropertySet;
|
import org.openide.nodes.Node.PropertySet;
|
||||||
import org.openide.nodes.Sheet;
|
import org.openide.nodes.Sheet;
|
||||||
|
import org.openide.util.lookup.AbstractLookup;
|
||||||
import org.openide.util.lookup.ServiceProvider;
|
import org.openide.util.lookup.ServiceProvider;
|
||||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataResultViewer;
|
import org.sleuthkit.autopsy.corecomponentinterfaces.DataResultViewer;
|
||||||
|
|
||||||
@ -63,6 +66,18 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
|||||||
this.em.addPropertyChangeListener(this);
|
this.em.addPropertyChangeListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Expand node
|
||||||
|
* @param n Node to expand
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void expandNode(Node n) {
|
||||||
|
if ( this.tableScrollPanel != null) {
|
||||||
|
OutlineView ov = ((OutlineView) this.tableScrollPanel);
|
||||||
|
ov.expandNode(n);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** This method is called from within the constructor to
|
/** This method is called from within the constructor to
|
||||||
* initialize the form.
|
* initialize the form.
|
||||||
* WARNING: Do NOT modify this code. The content of this method is
|
* WARNING: Do NOT modify this code. The content of this method is
|
||||||
@ -135,6 +150,41 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets regular Bean property set properties from all first children and, recursively, subchildren of Node.
|
||||||
|
* Note: won't work out the box for lazy load - you need to set all children props for the parent by hand
|
||||||
|
* @param parent Node with at least one child to get properties from
|
||||||
|
* @return Properties,
|
||||||
|
*/
|
||||||
|
private Node.Property[] getAllChildPropertyHeaders(Node parent) {
|
||||||
|
Node firstChild = parent.getChildren().getNodeAt(0);
|
||||||
|
|
||||||
|
Property[] properties = null;
|
||||||
|
|
||||||
|
if (firstChild == null) {
|
||||||
|
throw new IllegalArgumentException("Couldn't get a child Node from the given parent.");
|
||||||
|
} else {
|
||||||
|
Set<Property> allProperties = new LinkedHashSet<Property>();
|
||||||
|
while (firstChild != null) {
|
||||||
|
for (PropertySet ps : firstChild.getPropertySets()) {
|
||||||
|
//if (ps.getName().equals(Sheet.PROPERTIES)) {
|
||||||
|
//return ps.getProperties();
|
||||||
|
final Property [] props = ps.getProperties();
|
||||||
|
final int propsNum = props.length;
|
||||||
|
for (int i = 0; i< propsNum; ++i)
|
||||||
|
allProperties.add(props[i]);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
firstChild = firstChild.getChildren().getNodeAt(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
properties = allProperties.toArray(new Property[0]);
|
||||||
|
//throw new IllegalArgumentException("Child Node doesn't have the regular PropertySet.");
|
||||||
|
}
|
||||||
|
return properties;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setNode(Node selectedNode) {
|
public void setNode(Node selectedNode) {
|
||||||
// change the cursor to "waiting cursor" for this operation
|
// change the cursor to "waiting cursor" for this operation
|
||||||
@ -152,15 +202,18 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
|||||||
if (hasChildren) {
|
if (hasChildren) {
|
||||||
Node root = selectedNode;
|
Node root = selectedNode;
|
||||||
|
|
||||||
if (!(root instanceof TableFilterNode)) {
|
//wrap to filter out children
|
||||||
root = new TableFilterNode(root, true);
|
//note: this breaks the tree view mode in this generic viewer,
|
||||||
}
|
//so wrap nodes earlier if want 1 level view
|
||||||
|
//if (!(root instanceof TableFilterNode)) {
|
||||||
|
/// root = new TableFilterNode(root, true);
|
||||||
|
//}
|
||||||
|
|
||||||
em.setRootContext(root);
|
em.setRootContext(root);
|
||||||
|
|
||||||
OutlineView ov = ((OutlineView) this.tableScrollPanel);
|
OutlineView ov = ((OutlineView) this.tableScrollPanel);
|
||||||
|
|
||||||
List<Node.Property> tempProps = new ArrayList<Node.Property>(Arrays.asList(getChildPropertyHeaders(selectedNode)));
|
List<Node.Property> tempProps = new ArrayList<Node.Property>(Arrays.asList(getAllChildPropertyHeaders(selectedNode)));
|
||||||
|
|
||||||
tempProps.remove(0);
|
tempProps.remove(0);
|
||||||
|
|
||||||
@ -243,7 +296,6 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static Object[][] getRowValues(Node node, int rows) {
|
private static Object[][] getRowValues(Node node, int rows) {
|
||||||
// how many rows are we returning
|
// how many rows are we returning
|
||||||
int maxRows = Math.min(rows, node.getChildren().getNodesCount());
|
int maxRows = Math.min(rows, node.getChildren().getNodesCount());
|
||||||
|
@ -91,6 +91,16 @@ public class DataResultViewerThumbnail extends AbstractDataResultViewer {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Expand node
|
||||||
|
* @param n Node to expand
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void expandNode(Node n) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setNode(Node givenNode) {
|
public void setNode(Node givenNode) {
|
||||||
// change the cursor to "waiting cursor" for this operation
|
// change the cursor to "waiting cursor" for this operation
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.1" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
@ -20,7 +20,7 @@
|
|||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="jScrollPane1" pref="602" max="32767" attributes="0"/>
|
<Component id="jScrollPane1" max="32767" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
@ -35,7 +35,7 @@
|
|||||||
<Component id="prevPageButton" min="-2" max="-2" attributes="0"/>
|
<Component id="prevPageButton" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
<Component id="nextPageButton" min="-2" pref="99" max="-2" attributes="0"/>
|
<Component id="nextPageButton" min="-2" pref="99" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="276" max="32767" attributes="0"/>
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="filePathLabel" max="32767" attributes="0"/>
|
<Component id="filePathLabel" max="32767" attributes="0"/>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.1" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
<Form version="1.3" maxVersion="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
<Form version="1.3" maxVersion="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
|
@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.corecomponents;
|
|||||||
|
|
||||||
import java.awt.Cursor;
|
import java.awt.Cursor;
|
||||||
import java.awt.Window;
|
import java.awt.Window;
|
||||||
|
import java.io.File;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
@ -33,7 +34,7 @@ import javax.swing.event.HyperlinkListener;
|
|||||||
import org.netbeans.core.actions.HTMLViewAction;
|
import org.netbeans.core.actions.HTMLViewAction;
|
||||||
import org.openide.awt.HtmlBrowser;
|
import org.openide.awt.HtmlBrowser;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.casemodule.Autopsy;
|
import org.sleuthkit.autopsy.coreutils.AutopsyPropFile;
|
||||||
import org.sleuthkit.datamodel.SleuthkitJNI;
|
import org.sleuthkit.datamodel.SleuthkitJNI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -43,6 +44,7 @@ class ProductInformationPanel extends JPanel implements HyperlinkListener {
|
|||||||
|
|
||||||
private URL url = null;
|
private URL url = null;
|
||||||
private Icon about;
|
private Icon about;
|
||||||
|
private boolean verboseLogging;
|
||||||
|
|
||||||
ProductInformationPanel() {
|
ProductInformationPanel() {
|
||||||
about = new ImageIcon(org.netbeans.core.startup.Splash.loadContent(true));
|
about = new ImageIcon(org.netbeans.core.startup.Splash.loadContent(true));
|
||||||
@ -54,7 +56,7 @@ class ProductInformationPanel extends JPanel implements HyperlinkListener {
|
|||||||
description.addHyperlinkListener(this);
|
description.addHyperlinkListener(this);
|
||||||
copyright.addHyperlinkListener(this);
|
copyright.addHyperlinkListener(this);
|
||||||
copyright.setBackground(getBackground());
|
copyright.setBackground(getBackground());
|
||||||
if (Autopsy.verboseLoggingIsSet()) {
|
if (verboseLoggingIsSet()) {
|
||||||
disableVerboseLoggingButton();
|
disableVerboseLoggingButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,7 +176,7 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
|
|||||||
}//GEN-LAST:event_jLabel1MouseClicked
|
}//GEN-LAST:event_jLabel1MouseClicked
|
||||||
|
|
||||||
private void activateVerboseLogging(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_activateVerboseLogging
|
private void activateVerboseLogging(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_activateVerboseLogging
|
||||||
Autopsy.startVerboseLogging();
|
startVerboseLogging();
|
||||||
disableVerboseLoggingButton();
|
disableVerboseLoggingButton();
|
||||||
}//GEN-LAST:event_activateVerboseLogging
|
}//GEN-LAST:event_activateVerboseLogging
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
@ -253,4 +255,22 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
|
|||||||
url = null;
|
url = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Activate verbose logging for Sleuth Kit
|
||||||
|
*/
|
||||||
|
public void startVerboseLogging() {
|
||||||
|
verboseLogging = true;
|
||||||
|
String logPath = AutopsyPropFile.getUserDirPath() + File.separator + "sleuthkit.txt";
|
||||||
|
|
||||||
|
SleuthkitJNI.startVerboseLogging(logPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if verbose logging has been enabled.
|
||||||
|
* @return true if verbose logging has been enabled.
|
||||||
|
*/
|
||||||
|
public boolean verboseLoggingIsSet() {
|
||||||
|
return verboseLogging;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ import org.openide.nodes.Node;
|
|||||||
*
|
*
|
||||||
* @author jantonius
|
* @author jantonius
|
||||||
*/
|
*/
|
||||||
class TableFilterNode extends FilterNode {
|
public class TableFilterNode extends FilterNode {
|
||||||
|
|
||||||
private boolean createChild;
|
private boolean createChild;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ import javax.swing.ImageIcon;
|
|||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import org.openide.nodes.FilterNode;
|
import org.openide.nodes.FilterNode;
|
||||||
import org.openide.nodes.Node;
|
import org.openide.nodes.Node;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.sleuthkit.datamodel.TskException;
|
import org.sleuthkit.datamodel.TskException;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
|
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
|
||||||
<!-- for some information on what you could do (e.g. targets to override). -->
|
<!-- for some information on what you could do (e.g. targets to override). -->
|
||||||
<!-- If you delete this file and reopen the project it will be recreated. -->
|
<!-- If you delete this file and reopen the project it will be recreated. -->
|
||||||
<project name="org.sleuthkit.autopsy.logging" default="netbeans" basedir=".">
|
<project name="org.sleuthkit.autopsy.coreutils" default="netbeans" basedir=".">
|
||||||
<description>Builds, tests, and runs the project org.sleuthkit.autopsy.logging.</description>
|
<description>Builds, tests, and runs the project org.sleuthkit.autopsy.coreutils.</description>
|
||||||
<import file="nbproject/build-impl.xml"/>
|
<import file="nbproject/build-impl.xml"/>
|
||||||
</project>
|
</project>
|
6
CoreUtils/manifest.mf
Normal file
6
CoreUtils/manifest.mf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
OpenIDE-Module: org.sleuthkit.autopsy.coreutils/0
|
||||||
|
OpenIDE-Module-Implementation-Version: 2
|
||||||
|
OpenIDE-Module-Install: org/sleuthkit/autopsy/coreutils/Installer.class
|
||||||
|
OpenIDE-Module-Layer: org/sleuthkit/autopsy/coreutils/layer.xml
|
||||||
|
OpenIDE-Module-Localizing-Bundle: org/sleuthkit/autopsy/coreutils/Bundle.properties
|
@ -3,7 +3,7 @@
|
|||||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||||
*** EDIT ../build.xml INSTEAD ***
|
*** EDIT ../build.xml INSTEAD ***
|
||||||
-->
|
-->
|
||||||
<project name="org.sleuthkit.autopsy.logging-impl" basedir="..">
|
<project name="org.sleuthkit.autopsy.coreutils-impl" basedir="..">
|
||||||
<fail message="Please build using Ant 1.7.1 or higher.">
|
<fail message="Please build using Ant 1.7.1 or higher.">
|
||||||
<condition>
|
<condition>
|
||||||
<not>
|
<not>
|
8
CoreUtils/nbproject/genfiles.properties
Normal file
8
CoreUtils/nbproject/genfiles.properties
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
build.xml.data.CRC32=53a3cee0
|
||||||
|
build.xml.script.CRC32=b3e56256
|
||||||
|
build.xml.stylesheet.CRC32=a56c6a5b@1.46.2
|
||||||
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
|
nbproject/build-impl.xml.data.CRC32=53a3cee0
|
||||||
|
nbproject/build-impl.xml.script.CRC32=849ea2ba
|
||||||
|
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.46.2
|
99
CoreUtils/nbproject/platform.properties
Normal file
99
CoreUtils/nbproject/platform.properties
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
cluster.path=\
|
||||||
|
${nbplatform.active.dir}/java:\
|
||||||
|
${nbplatform.active.dir}/platform
|
||||||
|
disabled.modules=\
|
||||||
|
org.apache.tools.ant.module,\
|
||||||
|
org.netbeans.api.debugger.jpda,\
|
||||||
|
org.netbeans.api.java,\
|
||||||
|
org.netbeans.libs.cglib,\
|
||||||
|
org.netbeans.libs.javacapi,\
|
||||||
|
org.netbeans.libs.javacimpl,\
|
||||||
|
org.netbeans.libs.jsr223,\
|
||||||
|
org.netbeans.libs.springframework,\
|
||||||
|
org.netbeans.modules.ant.browsetask,\
|
||||||
|
org.netbeans.modules.ant.debugger,\
|
||||||
|
org.netbeans.modules.ant.freeform,\
|
||||||
|
org.netbeans.modules.ant.grammar,\
|
||||||
|
org.netbeans.modules.ant.kit,\
|
||||||
|
org.netbeans.modules.beans,\
|
||||||
|
org.netbeans.modules.classfile,\
|
||||||
|
org.netbeans.modules.dbschema,\
|
||||||
|
org.netbeans.modules.debugger.jpda,\
|
||||||
|
org.netbeans.modules.debugger.jpda.ant,\
|
||||||
|
org.netbeans.modules.debugger.jpda.projects,\
|
||||||
|
org.netbeans.modules.debugger.jpda.ui,\
|
||||||
|
org.netbeans.modules.form,\
|
||||||
|
org.netbeans.modules.form.j2ee,\
|
||||||
|
org.netbeans.modules.form.kit,\
|
||||||
|
org.netbeans.modules.hibernate,\
|
||||||
|
org.netbeans.modules.hibernatelib,\
|
||||||
|
org.netbeans.modules.hudson.ant,\
|
||||||
|
org.netbeans.modules.hudson.maven,\
|
||||||
|
org.netbeans.modules.i18n,\
|
||||||
|
org.netbeans.modules.i18n.form,\
|
||||||
|
org.netbeans.modules.j2ee.core.utilities,\
|
||||||
|
org.netbeans.modules.j2ee.eclipselink,\
|
||||||
|
org.netbeans.modules.j2ee.eclipselinkmodelgen,\
|
||||||
|
org.netbeans.modules.j2ee.jpa.refactoring,\
|
||||||
|
org.netbeans.modules.j2ee.jpa.verification,\
|
||||||
|
org.netbeans.modules.j2ee.metadata,\
|
||||||
|
org.netbeans.modules.j2ee.metadata.model.support,\
|
||||||
|
org.netbeans.modules.j2ee.persistence,\
|
||||||
|
org.netbeans.modules.j2ee.persistence.kit,\
|
||||||
|
org.netbeans.modules.j2ee.persistenceapi,\
|
||||||
|
org.netbeans.modules.j2ee.toplinklib,\
|
||||||
|
org.netbeans.modules.java.api.common,\
|
||||||
|
org.netbeans.modules.java.debug,\
|
||||||
|
org.netbeans.modules.java.editor,\
|
||||||
|
org.netbeans.modules.java.editor.lib,\
|
||||||
|
org.netbeans.modules.java.examples,\
|
||||||
|
org.netbeans.modules.java.freeform,\
|
||||||
|
org.netbeans.modules.java.guards,\
|
||||||
|
org.netbeans.modules.java.helpset,\
|
||||||
|
org.netbeans.modules.java.hints,\
|
||||||
|
org.netbeans.modules.java.hints.processor,\
|
||||||
|
org.netbeans.modules.java.j2seplatform,\
|
||||||
|
org.netbeans.modules.java.j2seproject,\
|
||||||
|
org.netbeans.modules.java.kit,\
|
||||||
|
org.netbeans.modules.java.lexer,\
|
||||||
|
org.netbeans.modules.java.navigation,\
|
||||||
|
org.netbeans.modules.java.platform,\
|
||||||
|
org.netbeans.modules.java.preprocessorbridge,\
|
||||||
|
org.netbeans.modules.java.project,\
|
||||||
|
org.netbeans.modules.java.source,\
|
||||||
|
org.netbeans.modules.java.source.ant,\
|
||||||
|
org.netbeans.modules.java.sourceui,\
|
||||||
|
org.netbeans.modules.javadoc,\
|
||||||
|
org.netbeans.modules.javawebstart,\
|
||||||
|
org.netbeans.modules.jellytools,\
|
||||||
|
org.netbeans.modules.jellytools.java,\
|
||||||
|
org.netbeans.modules.junit,\
|
||||||
|
org.netbeans.modules.maven,\
|
||||||
|
org.netbeans.modules.maven.coverage,\
|
||||||
|
org.netbeans.modules.maven.embedder,\
|
||||||
|
org.netbeans.modules.maven.grammar,\
|
||||||
|
org.netbeans.modules.maven.graph,\
|
||||||
|
org.netbeans.modules.maven.hints,\
|
||||||
|
org.netbeans.modules.maven.indexer,\
|
||||||
|
org.netbeans.modules.maven.junit,\
|
||||||
|
org.netbeans.modules.maven.kit,\
|
||||||
|
org.netbeans.modules.maven.model,\
|
||||||
|
org.netbeans.modules.maven.osgi,\
|
||||||
|
org.netbeans.modules.maven.persistence,\
|
||||||
|
org.netbeans.modules.maven.repository,\
|
||||||
|
org.netbeans.modules.maven.search,\
|
||||||
|
org.netbeans.modules.maven.spring,\
|
||||||
|
org.netbeans.modules.projectimport.eclipse.core,\
|
||||||
|
org.netbeans.modules.projectimport.eclipse.j2se,\
|
||||||
|
org.netbeans.modules.refactoring.java,\
|
||||||
|
org.netbeans.modules.spellchecker.bindings.java,\
|
||||||
|
org.netbeans.modules.spring.beans,\
|
||||||
|
org.netbeans.modules.swingapp,\
|
||||||
|
org.netbeans.modules.websvc.jaxws21,\
|
||||||
|
org.netbeans.modules.websvc.jaxws21api,\
|
||||||
|
org.netbeans.modules.websvc.saas.codegen.java,\
|
||||||
|
org.netbeans.modules.xml.jaxb,\
|
||||||
|
org.netbeans.modules.xml.tools.java,\
|
||||||
|
org.openide.compat,\
|
||||||
|
org.openide.util.enumerations
|
||||||
|
nbplatform.active=default
|
@ -3,7 +3,7 @@
|
|||||||
<type>org.netbeans.modules.apisupport.project</type>
|
<type>org.netbeans.modules.apisupport.project</type>
|
||||||
<configuration>
|
<configuration>
|
||||||
<data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
|
<data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
|
||||||
<code-name-base>org.sleuthkit.autopsy.logging</code-name-base>
|
<code-name-base>org.sleuthkit.autopsy.coreutils</code-name-base>
|
||||||
<suite-component/>
|
<suite-component/>
|
||||||
<module-dependencies>
|
<module-dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -20,7 +20,7 @@
|
|||||||
<build-prerequisite/>
|
<build-prerequisite/>
|
||||||
<compile-dependency/>
|
<compile-dependency/>
|
||||||
<run-dependency>
|
<run-dependency>
|
||||||
<specification-version>7.23.1</specification-version>
|
<specification-version>7.31.1</specification-version>
|
||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -28,7 +28,7 @@
|
|||||||
<build-prerequisite/>
|
<build-prerequisite/>
|
||||||
<compile-dependency/>
|
<compile-dependency/>
|
||||||
<run-dependency>
|
<run-dependency>
|
||||||
<specification-version>7.15.1</specification-version>
|
<specification-version>7.20.1</specification-version>
|
||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<build-prerequisite/>
|
<build-prerequisite/>
|
||||||
<compile-dependency/>
|
<compile-dependency/>
|
||||||
<run-dependency>
|
<run-dependency>
|
||||||
<specification-version>7.17.2</specification-version>
|
<specification-version>7.23.1</specification-version>
|
||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<build-prerequisite/>
|
<build-prerequisite/>
|
||||||
<compile-dependency/>
|
<compile-dependency/>
|
||||||
<run-dependency>
|
<run-dependency>
|
||||||
<specification-version>8.6.2</specification-version>
|
<specification-version>8.15.1</specification-version>
|
||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -52,12 +52,12 @@
|
|||||||
<build-prerequisite/>
|
<build-prerequisite/>
|
||||||
<compile-dependency/>
|
<compile-dependency/>
|
||||||
<run-dependency>
|
<run-dependency>
|
||||||
<specification-version>8.3.1</specification-version>
|
<specification-version>8.8.1</specification-version>
|
||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
</module-dependencies>
|
</module-dependencies>
|
||||||
<public-packages>
|
<public-packages>
|
||||||
<package>org.sleuthkit.autopsy.logging</package>
|
<package>org.sleuthkit.autopsy.coreutils</package>
|
||||||
</public-packages>
|
</public-packages>
|
||||||
</data>
|
</data>
|
||||||
</configuration>
|
</configuration>
|
@ -17,7 +17,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.sleuthkit.autopsy.logging;
|
package org.sleuthkit.autopsy.coreutils;
|
||||||
|
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.util.logging.Filter;
|
import java.util.logging.Filter;
|
@ -0,0 +1,132 @@
|
|||||||
|
/*
|
||||||
|
* Autopsy Forensic Browser
|
||||||
|
*
|
||||||
|
* Copyright 2011 Basis Technology Corp.
|
||||||
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.sleuthkit.autopsy.coreutils;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
/**
|
||||||
|
* This class contains the framework to read, add, update, and remove
|
||||||
|
* from the properties file located at %USERDIR%/autopsy.properties
|
||||||
|
*
|
||||||
|
* @author dfickling
|
||||||
|
*/
|
||||||
|
public class AutopsyPropFile {
|
||||||
|
|
||||||
|
// The directory where the properties file is lcoated
|
||||||
|
private final static String userDirPath = System.getProperty("netbeans.user");
|
||||||
|
private final static String propFilePath = userDirPath + File.separator + "autopsy.properties";
|
||||||
|
|
||||||
|
// The AutopsyPropFile singleton
|
||||||
|
private static final AutopsyPropFile INSTANCE = new AutopsyPropFile();
|
||||||
|
|
||||||
|
private Properties properties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the instance of the AutopsyPropFile singleton
|
||||||
|
*/
|
||||||
|
public static AutopsyPropFile getInstance(){
|
||||||
|
return INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** the constructor */
|
||||||
|
private AutopsyPropFile() {
|
||||||
|
properties = new Properties();
|
||||||
|
try {
|
||||||
|
// try to load all the properties from the properties file in the home directory
|
||||||
|
InputStream inputStream = new FileInputStream(propFilePath);
|
||||||
|
properties.load(inputStream);
|
||||||
|
inputStream.close();
|
||||||
|
} catch (Exception ignore) {
|
||||||
|
// if cannot load it, we create a new properties file without any data inside it
|
||||||
|
try {
|
||||||
|
// create the directory and property file to store it
|
||||||
|
File output = new File(propFilePath);
|
||||||
|
if (!output.exists()) {
|
||||||
|
File parent = new File(output.getParent());
|
||||||
|
if (!parent.exists()) {
|
||||||
|
parent.mkdirs();
|
||||||
|
}
|
||||||
|
output.createNewFile();
|
||||||
|
FileOutputStream fos = new FileOutputStream(output);
|
||||||
|
properties.store(fos, "");
|
||||||
|
fos.close();
|
||||||
|
} else {
|
||||||
|
// if the property file already exist, throw an error that says cannot load that file
|
||||||
|
Logger.getLogger(AutopsyPropFile.class.getName()).log(Level.WARNING, "Error: Could not load the property file.", new Exception("The properties file already exist and can't load that file."));
|
||||||
|
}
|
||||||
|
} catch (IOException ex2) {
|
||||||
|
Logger.getLogger(AutopsyPropFile.class.getName()).log(Level.WARNING, "Error: Could not create the property file.", ex2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void storeProperties() throws IOException {
|
||||||
|
FileOutputStream fos = new FileOutputStream(new File(propFilePath));
|
||||||
|
properties.store(fos, "");
|
||||||
|
fos.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the properties file paths.
|
||||||
|
*
|
||||||
|
* @return propertyPath
|
||||||
|
*/
|
||||||
|
public static String getPropertiesFilePath() {
|
||||||
|
return propFilePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProperty(String key, String val){
|
||||||
|
properties.setProperty(key, val);
|
||||||
|
try {
|
||||||
|
storeProperties();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Logger.getLogger(AutopsyPropFile.class.getName()).log(Level.WARNING, "Error: Could not update the properties file.", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProperty(String key){
|
||||||
|
return properties.getProperty(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeProperty(String key){
|
||||||
|
properties.setProperty(key, null);
|
||||||
|
try {
|
||||||
|
storeProperties();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Logger.getLogger(AutopsyPropFile.class.getName()).log(Level.WARNING, "Error: Could not update the properties file.", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the property file where the user properties such as Recent Cases
|
||||||
|
* and selected Hash Databases are stored.
|
||||||
|
* @return A new file handle
|
||||||
|
*/
|
||||||
|
public static File getPropertyFile() {
|
||||||
|
return new File(propFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static File getUserDirPath() {
|
||||||
|
return new File(userDirPath);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
OpenIDE-Module-Name=CoreUtils
|
@ -17,7 +17,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.sleuthkit.autopsy.logging;
|
package org.sleuthkit.autopsy.coreutils;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.logging.FileHandler;
|
import java.util.logging.FileHandler;
|
@ -17,7 +17,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.sleuthkit.autopsy.logging;
|
package org.sleuthkit.autopsy.coreutils;
|
||||||
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
Before Width: | Height: | Size: 980 B After Width: | Height: | Size: 980 B |
@ -17,7 +17,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.sleuthkit.autopsy.logging;
|
package org.sleuthkit.autopsy.coreutils;
|
||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package org.sleuthkit.autopsy.logging;
|
package org.sleuthkit.autopsy.coreutils;
|
||||||
|
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
@ -3,6 +3,6 @@ build.xml.script.CRC32=3bd58878
|
|||||||
build.xml.stylesheet.CRC32=a56c6a5b@1.42.2
|
build.xml.stylesheet.CRC32=a56c6a5b@1.42.2
|
||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=c861ba34
|
nbproject/build-impl.xml.data.CRC32=d5d42932
|
||||||
nbproject/build-impl.xml.script.CRC32=b0a13adb
|
nbproject/build-impl.xml.script.CRC32=b0a13adb
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.46.2
|
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.47.1
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<code-name-base>org.sleuthkit.autopsy.logging</code-name-base>
|
<code-name-base>org.sleuthkit.autopsy.coreutils</code-name-base>
|
||||||
<build-prerequisite/>
|
<build-prerequisite/>
|
||||||
<compile-dependency/>
|
<compile-dependency/>
|
||||||
<run-dependency>
|
<run-dependency>
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.datamodel;
|
package org.sleuthkit.autopsy.datamodel;
|
||||||
|
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Map;
|
||||||
import org.openide.nodes.Sheet;
|
import org.openide.nodes.Sheet;
|
||||||
import org.sleuthkit.datamodel.FsContent;
|
import org.sleuthkit.datamodel.FsContent;
|
||||||
|
|
||||||
@ -25,16 +27,139 @@ import org.sleuthkit.datamodel.FsContent;
|
|||||||
* Abstract class that implements the commonality between File and Directory
|
* Abstract class that implements the commonality between File and Directory
|
||||||
* Nodes (same properties).
|
* Nodes (same properties).
|
||||||
*/
|
*/
|
||||||
abstract class AbstractFsContentNode<T extends FsContent> extends AbstractContentNode<T> {
|
public abstract class AbstractFsContentNode<T extends FsContent> extends AbstractContentNode<T> {
|
||||||
|
|
||||||
/**
|
// Note: this order matters for the search result, changed it if the order of property headers on the "KeywordSearchNode"changed
|
||||||
* Name of the property that holds the name.
|
|
||||||
*/
|
public static enum FsContentPropertyType {
|
||||||
public static final String PROPERTY_NAME = "Name";
|
|
||||||
/**
|
NAME {
|
||||||
* Name of the property that holds the path.
|
|
||||||
*/
|
@Override
|
||||||
public static final String PROPERTY_LOCATION = "Location";
|
public String toString() {
|
||||||
|
return "Name";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
LOCATION {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Location";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
MOD_TIME {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Mod. Time";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
CHANGED_TIME {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Change Time";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ACCESS_TIME {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Access Time";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
CREATED_TIME {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Created Time";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
SIZE {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Size";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
FLAGS_DIR {
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Flags(Dir)";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
FLAGS_META {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Flags(Meta)";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
MODE {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Mode";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
USER_ID {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "UserID";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
GROUP_ID {
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "GroupID";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
META_ADDR {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Meta Addr.";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ATTR_ADDR {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Attr. Addr.";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
TYPE_DIR {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Type(Dir)";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
TYPE_META {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Type(Meta)";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
KNOWN {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Known";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
AbstractFsContentNode(T fsContent) {
|
AbstractFsContentNode(T fsContent) {
|
||||||
super(fsContent);
|
super(fsContent);
|
||||||
@ -49,25 +174,43 @@ abstract class AbstractFsContentNode<T extends FsContent> extends AbstractConten
|
|||||||
s.put(ss);
|
s.put(ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: this order matters for the search result, changed it if the order of property headers on the "KeywordSearchNode"changed
|
Map<String, Object> map = new LinkedHashMap<String, Object>();
|
||||||
ss.put(new NodeProperty(PROPERTY_NAME, "Name", "no description", content.getName()));
|
fillPropertyMap(map, content);
|
||||||
ss.put(new NodeProperty(PROPERTY_LOCATION, "Location", "no description", DataConversion.getformattedPath(ContentUtils.getDisplayPath(content), 0)));
|
|
||||||
ss.put(new NodeProperty("Modified Time", "Modified Time", "no description", content.getMtimeAsDate()));
|
FsContentPropertyType[] fsTypes = FsContentPropertyType.values();
|
||||||
ss.put(new NodeProperty("Changed Time", "Changed Time", "no description", content.getCtimeAsDate()));
|
final int FS_PROPS_LEN = fsTypes.length;
|
||||||
ss.put(new NodeProperty("Access Time", "Access Time", "no description", content.getAtimeAsDate()));
|
final String NO_DESCR = "no description";
|
||||||
ss.put(new NodeProperty("Created Time", "Created Time", "no description", content.getCrtimeAsDate()));
|
for (int i = 0; i < FS_PROPS_LEN; ++i) {
|
||||||
ss.put(new NodeProperty("Size", "Size", "no description", content.getSize()));
|
final FsContentPropertyType propType = FsContentPropertyType.values()[i];
|
||||||
ss.put(new NodeProperty("Flags (Directory)", "Flags (Directory)", "no description", content.getDirFlagsAsString()));
|
final String propString = propType.toString();
|
||||||
ss.put(new NodeProperty("Flags (Meta)", "Flags (Meta)", "no description", content.getMetaFlagsAsString()));
|
ss.put(new NodeProperty(propString, propString, NO_DESCR, map.get(propString)));
|
||||||
ss.put(new NodeProperty("Mode ", "Mode", "no description", content.getModeAsString()));
|
}
|
||||||
ss.put(new NodeProperty("User ID", "User ID", "no description", content.getUid()));
|
|
||||||
ss.put(new NodeProperty("Group ID", "Group ID", "no description", content.getGid()));
|
|
||||||
ss.put(new NodeProperty("Metadata Address", "Metadata Addr", "no description", content.getMeta_addr()));
|
|
||||||
ss.put(new NodeProperty("Attribute Address", "Attribute Addr", "no description", Long.toString(content.getAttr_type()) + "-" + Long.toString(content.getAttr_id())));
|
|
||||||
ss.put(new NodeProperty("Type (Directory)", "Type (Directory)", "no description", content.getDirTypeAsString()));
|
|
||||||
ss.put(new NodeProperty("Type (Meta)", "Type (Meta)", "no description", content.getMetaTypeAsString()));
|
|
||||||
ss.put(new NodeProperty("Known", "Known", "no description", content.getKnown().getName()));
|
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fill map with FsContent properties
|
||||||
|
* @param map, with preserved ordering, where property names/values are put
|
||||||
|
* @param content to extract properties from
|
||||||
|
*/
|
||||||
|
public static void fillPropertyMap(Map<String, Object> map, FsContent content) {
|
||||||
|
map.put(FsContentPropertyType.NAME.toString(), content.getName());
|
||||||
|
map.put(FsContentPropertyType.LOCATION.toString(), DataConversion.getformattedPath(ContentUtils.getDisplayPath(content), 0));
|
||||||
|
map.put(FsContentPropertyType.MOD_TIME.toString(), content.getMtimeAsDate());
|
||||||
|
map.put(FsContentPropertyType.CHANGED_TIME.toString(), content.getCtimeAsDate());
|
||||||
|
map.put(FsContentPropertyType.ACCESS_TIME.toString(), content.getAtimeAsDate());
|
||||||
|
map.put(FsContentPropertyType.CREATED_TIME.toString(), content.getCrtimeAsDate());
|
||||||
|
map.put(FsContentPropertyType.SIZE.toString(), Long.toString(content.getSize()));
|
||||||
|
map.put(FsContentPropertyType.FLAGS_DIR.toString(), content.getDirFlagsAsString());
|
||||||
|
map.put(FsContentPropertyType.FLAGS_META.toString(), content.getMetaFlagsAsString());
|
||||||
|
map.put(FsContentPropertyType.MODE.toString(), content.getModeAsString());
|
||||||
|
map.put(FsContentPropertyType.USER_ID.toString(), Long.toString(content.getUid()));
|
||||||
|
map.put(FsContentPropertyType.GROUP_ID.toString(), Long.toString(content.getGid()));
|
||||||
|
map.put(FsContentPropertyType.META_ADDR.toString(), Long.toString(content.getMeta_addr()));
|
||||||
|
map.put(FsContentPropertyType.ATTR_ADDR.toString(), Long.toString(content.getAttr_type()) + "-" + Long.toString(content.getAttr_id()));
|
||||||
|
map.put(FsContentPropertyType.TYPE_DIR.toString(), content.getDirTypeAsString());
|
||||||
|
map.put(FsContentPropertyType.TYPE_META.toString(), content.getMetaTypeAsString());
|
||||||
|
map.put(FsContentPropertyType.KNOWN.toString(), content.getKnown().getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,40 +133,38 @@ public class DataConversion {
|
|||||||
Charset.forName("UTF-8").newEncoder();
|
Charset.forName("UTF-8").newEncoder();
|
||||||
*/
|
*/
|
||||||
|
|
||||||
String result = "";
|
|
||||||
String temp = "";
|
final StringBuilder result = new StringBuilder();
|
||||||
|
StringBuilder temp = new StringBuilder();
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
//char[] converted = new java.lang.System.Text.Encoding.ASCII.GetString(args).ToCharArray();
|
//char[] converted = new java.lang.System.Text.Encoding.ASCII.GetString(args).ToCharArray();
|
||||||
|
|
||||||
char NL = (char) 10; // ASCII char for new line
|
final char NL = (char) 10; // ASCII char for new line
|
||||||
|
final String NLS = Character.toString(NL);
|
||||||
for (int i = 0; i < args.length; i++) {
|
for (int i = 0; i < args.length; i++) {
|
||||||
char tempChar = (char) args[i];
|
char curChar = (char) args[i];
|
||||||
int dec = (int) tempChar;
|
int curCharInt = (int) curChar;
|
||||||
|
|
||||||
// the printable ASCII chars are dec 32-126
|
// ignore non-printable ASCII chars
|
||||||
// and we want to include TAB as well (dec 9)
|
// 32-126 and TAB ( 9)
|
||||||
if (!((dec < 32 || dec > 126) && dec != 9)) {
|
if (((curCharInt < 32) && (curCharInt != 9)) || (curCharInt > 126)) {
|
||||||
temp = temp + Character.toString(tempChar);
|
|
||||||
counter = counter + 1;
|
|
||||||
} else {
|
|
||||||
if (counter >= parameter) {
|
if (counter >= parameter) {
|
||||||
// add to the result and also add the new line at the end
|
// add to the result and also add the new line at the end
|
||||||
result = result + temp + Character.toString(NL);
|
result.append(temp);
|
||||||
|
result.append(NLS);
|
||||||
// reset the temp and counter
|
|
||||||
temp = "";
|
|
||||||
counter = 0;
|
|
||||||
}
|
}
|
||||||
// reset the temp and counter
|
// reset the temp and counter
|
||||||
temp = "";
|
temp = new StringBuilder();
|
||||||
counter = 0;
|
counter = 0;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
temp.append(curChar);
|
||||||
|
++counter;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result = result + temp;
|
result.append(temp);
|
||||||
|
return result.toString();
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* Autopsy Forensic Browser
|
||||||
|
*
|
||||||
|
* Copyright 2011 Basis Technology Corp.
|
||||||
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.sleuthkit.autopsy.datamodel;
|
package org.sleuthkit.autopsy.datamodel;
|
||||||
|
|
||||||
|
19
DataModel/src/org/sleuthkit/autopsy/datamodel/KeyValueThing.java
Normal file → Executable file
19
DataModel/src/org/sleuthkit/autopsy/datamodel/KeyValueThing.java
Normal file → Executable file
@ -1,3 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Autopsy Forensic Browser
|
||||||
|
*
|
||||||
|
* Copyright 2011 Basis Technology Corp.
|
||||||
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.sleuthkit.autopsy.datamodel;
|
package org.sleuthkit.autopsy.datamodel;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
build.xml.data.CRC32=db477856
|
build.xml.data.CRC32=f54ab67d
|
||||||
build.xml.script.CRC32=6ec7becb
|
build.xml.script.CRC32=6ec7becb
|
||||||
build.xml.stylesheet.CRC32=a56c6a5b@1.46.2
|
build.xml.stylesheet.CRC32=a56c6a5b@2.47.1
|
||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=db477856
|
nbproject/build-impl.xml.data.CRC32=f54ab67d
|
||||||
nbproject/build-impl.xml.script.CRC32=8c5007a7
|
nbproject/build-impl.xml.script.CRC32=8c5007a7
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.46.2
|
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.47.1
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<code-name-base>org.sleuthkit.autopsy.datamodel</code-name-base>
|
<code-name-base>org.sleuthkit.autopsy.coreutils</code-name-base>
|
||||||
<build-prerequisite/>
|
<build-prerequisite/>
|
||||||
<compile-dependency/>
|
<compile-dependency/>
|
||||||
<run-dependency>
|
<run-dependency>
|
||||||
@ -116,7 +116,7 @@
|
|||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<code-name-base>org.sleuthkit.autopsy.logging</code-name-base>
|
<code-name-base>org.sleuthkit.autopsy.datamodel</code-name-base>
|
||||||
<build-prerequisite/>
|
<build-prerequisite/>
|
||||||
<compile-dependency/>
|
<compile-dependency/>
|
||||||
<run-dependency>
|
<run-dependency>
|
||||||
|
@ -27,7 +27,7 @@ import org.openide.util.actions.Presenter;
|
|||||||
import org.sleuthkit.autopsy.corecomponents.DataContentTopComponent;
|
import org.sleuthkit.autopsy.corecomponents.DataContentTopComponent;
|
||||||
import org.sleuthkit.autopsy.corecomponents.DataContentViewerHex;
|
import org.sleuthkit.autopsy.corecomponents.DataContentViewerHex;
|
||||||
import org.sleuthkit.autopsy.corecomponents.DataContentViewerString;
|
import org.sleuthkit.autopsy.corecomponents.DataContentViewerString;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The actions to change between the "Hex View" and "String View".
|
* The actions to change between the "Hex View" and "String View".
|
||||||
|
@ -24,7 +24,7 @@ import org.openide.explorer.ExplorerManager;
|
|||||||
import org.openide.explorer.view.BeanTreeView;
|
import org.openide.explorer.view.BeanTreeView;
|
||||||
import org.openide.nodes.Children;
|
import org.openide.nodes.Children;
|
||||||
import org.openide.nodes.Node;
|
import org.openide.nodes.Node;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -24,7 +24,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.sleuthkit.autopsy.datamodel.VolumeNode;
|
import org.sleuthkit.autopsy.datamodel.VolumeNode;
|
||||||
import org.sleuthkit.autopsy.datamodel.FileNode;
|
|
||||||
import org.sleuthkit.autopsy.datamodel.DirectoryNode;
|
import org.sleuthkit.autopsy.datamodel.DirectoryNode;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@ -34,6 +33,7 @@ import org.openide.explorer.ExplorerManager;
|
|||||||
import org.openide.nodes.FilterNode;
|
import org.openide.nodes.FilterNode;
|
||||||
import org.openide.nodes.Node;
|
import org.openide.nodes.Node;
|
||||||
import org.openide.nodes.Sheet;
|
import org.openide.nodes.Sheet;
|
||||||
|
import org.sleuthkit.autopsy.datamodel.AbstractFsContentNode.FsContentPropertyType;
|
||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.sleuthkit.datamodel.ContentVisitor;
|
import org.sleuthkit.datamodel.ContentVisitor;
|
||||||
import org.sleuthkit.datamodel.Directory;
|
import org.sleuthkit.datamodel.Directory;
|
||||||
@ -41,6 +41,7 @@ import org.sleuthkit.datamodel.File;
|
|||||||
import org.sleuthkit.datamodel.Image;
|
import org.sleuthkit.datamodel.Image;
|
||||||
import org.sleuthkit.datamodel.Volume;
|
import org.sleuthkit.datamodel.Volume;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class wraps nodes as they are passed to the DataResult viewers. It
|
* This class wraps nodes as they are passed to the DataResult viewers. It
|
||||||
* defines the actions that the node should have.
|
* defines the actions that the node should have.
|
||||||
@ -52,12 +53,13 @@ public class DataResultFilterNode extends FilterNode{
|
|||||||
|
|
||||||
|
|
||||||
/** the constructor */
|
/** the constructor */
|
||||||
public DataResultFilterNode(Node arg, ExplorerManager em) {
|
public DataResultFilterNode(Node node, ExplorerManager em) {
|
||||||
super(arg, new DataResultFilterChildren(arg, em));
|
super(node, new DataResultFilterChildren(node, em));
|
||||||
this.sourceEm = em;
|
this.sourceEm = em;
|
||||||
getActionsCV = new GetActionsContentVisitor();
|
getActionsCV = new GetActionsContentVisitor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Right click action for the nodes that we want to pass to the directory
|
* Right click action for the nodes that we want to pass to the directory
|
||||||
* table and the output view.
|
* table and the output view.
|
||||||
@ -75,6 +77,8 @@ public class DataResultFilterNode extends FilterNode{
|
|||||||
Content nodeContent = this.getOriginal().getLookup().lookup(Content.class);
|
Content nodeContent = this.getOriginal().getLookup().lookup(Content.class);
|
||||||
actions.addAll(nodeContent.accept(getActionsCV));
|
actions.addAll(nodeContent.accept(getActionsCV));
|
||||||
|
|
||||||
|
//actions.add(new IndexContentFilesAction(nodeContent, "Index"));
|
||||||
|
|
||||||
return actions.toArray(new Action[actions.size()]);
|
return actions.toArray(new Action[actions.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,7 +109,7 @@ public class DataResultFilterNode extends FilterNode{
|
|||||||
public List<Action> visit(File f) {
|
public List<Action> visit(File f) {
|
||||||
List<Action> actions = new ArrayList<Action>();
|
List<Action> actions = new ArrayList<Action>();
|
||||||
actions.add(new ExternalViewerAction("Open in External Viewer", getOriginal()));
|
actions.add(new ExternalViewerAction("Open in External Viewer", getOriginal()));
|
||||||
actions.add(new ExtractAction("Extract", getOriginal()));
|
actions.add(new ExtractAction("Extract File", getOriginal()));
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +195,7 @@ public class DataResultFilterNode extends FilterNode{
|
|||||||
newPs.setShortDescription(ps.getShortDescription());
|
newPs.setShortDescription(ps.getShortDescription());
|
||||||
|
|
||||||
newPs.put(ps.getProperties());
|
newPs.put(ps.getProperties());
|
||||||
newPs.remove(FileNode.PROPERTY_LOCATION);
|
newPs.remove(FsContentPropertyType.LOCATION.toString() );
|
||||||
propertySets[i] = newPs;
|
propertySets[i] = newPs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,7 @@ import org.openide.nodes.Children;
|
|||||||
import org.openide.nodes.Node;
|
import org.openide.nodes.Node;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.corecomponents.DataResultTopComponent;
|
import org.sleuthkit.autopsy.corecomponents.DataResultTopComponent;
|
||||||
|
import org.sleuthkit.autopsy.corecomponents.TableFilterNode;
|
||||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||||
import org.sleuthkit.autopsy.datamodel.DataConversion;
|
import org.sleuthkit.autopsy.datamodel.DataConversion;
|
||||||
import org.sleuthkit.autopsy.datamodel.RootContentChildren;
|
import org.sleuthkit.autopsy.datamodel.RootContentChildren;
|
||||||
@ -555,7 +556,9 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
|||||||
DirectoryTreeTopComponent.this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
DirectoryTreeTopComponent.this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||||
}
|
}
|
||||||
DirectoryTreeTopComponent.this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
DirectoryTreeTopComponent.this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||||
DirectoryTreeTopComponent.this.dataResult.setNode(new DataResultFilterNode(originNode, DirectoryTreeTopComponent.this.em));
|
//set node, wrap in filter node first to filter out children
|
||||||
|
Node drfn = new DataResultFilterNode(originNode, DirectoryTreeTopComponent.this.em);
|
||||||
|
DirectoryTreeTopComponent.this.dataResult.setNode(new TableFilterNode(drfn, true));
|
||||||
|
|
||||||
String path = DataConversion.getformattedPath(ContentUtils.getDisplayPath(originNode.getLookup().lookup(Content.class)), 0);
|
String path = DataConversion.getformattedPath(ContentUtils.getDisplayPath(originNode.getLookup().lookup(Content.class)), 0);
|
||||||
DirectoryTreeTopComponent.this.dataResult.setPath(path);
|
DirectoryTreeTopComponent.this.dataResult.setPath(path);
|
||||||
|
@ -28,7 +28,7 @@ import javax.swing.AbstractAction;
|
|||||||
import org.openide.nodes.Node;
|
import org.openide.nodes.Node;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extracts a File object to a temporary file in the case directory, and then
|
* Extracts a File object to a temporary file in the case directory, and then
|
||||||
|
@ -27,7 +27,7 @@ import javax.swing.JOptionPane;
|
|||||||
import org.openide.nodes.Node;
|
import org.openide.nodes.Node;
|
||||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||||
import org.sleuthkit.autopsy.datamodel.ContentUtils.ExtractFscContentVisitor;
|
import org.sleuthkit.autopsy.datamodel.ContentUtils.ExtractFscContentVisitor;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.sleuthkit.datamodel.ContentVisitor;
|
import org.sleuthkit.datamodel.ContentVisitor;
|
||||||
import org.sleuthkit.datamodel.Directory;
|
import org.sleuthkit.datamodel.Directory;
|
||||||
@ -106,6 +106,11 @@ public final class ExtractAction extends AbstractAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ExtractFscContentVisitor.extract(fsContent, destination);
|
ExtractFscContentVisitor.extract(fsContent, destination);
|
||||||
|
if(fsContent.isDir())
|
||||||
|
JOptionPane.showMessageDialog((Component) e.getSource(), "Directory extracted.");
|
||||||
|
else if(fsContent.isFile()){
|
||||||
|
JOptionPane.showMessageDialog((Component) e.getSource(), "File extracted.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ import org.openide.windows.WindowManager;
|
|||||||
import org.sleuthkit.autopsy.datamodel.DataConversion;
|
import org.sleuthkit.autopsy.datamodel.DataConversion;
|
||||||
import org.sleuthkit.autopsy.corecomponents.DataContentTopComponent;
|
import org.sleuthkit.autopsy.corecomponents.DataContentTopComponent;
|
||||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,7 +35,7 @@ import javax.swing.JFrame;
|
|||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
import javax.swing.table.DefaultTableModel;
|
import javax.swing.table.DefaultTableModel;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.sleuthkit.datamodel.ContentVisitor;
|
import org.sleuthkit.datamodel.ContentVisitor;
|
||||||
import org.sleuthkit.datamodel.FileSystem;
|
import org.sleuthkit.datamodel.FileSystem;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
build.xml.data.CRC32=efa3ed67
|
build.xml.data.CRC32=ad8ce357
|
||||||
build.xml.script.CRC32=c0009852
|
build.xml.script.CRC32=c0009852
|
||||||
build.xml.stylesheet.CRC32=a56c6a5b@1.46.2
|
build.xml.stylesheet.CRC32=a56c6a5b@2.47.1
|
||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=efa3ed67
|
nbproject/build-impl.xml.data.CRC32=ad8ce357
|
||||||
nbproject/build-impl.xml.script.CRC32=2e520747
|
nbproject/build-impl.xml.script.CRC32=2e520747
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.46.2
|
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.47.1
|
||||||
|
@ -98,6 +98,15 @@
|
|||||||
<specification-version>1.0</specification-version>
|
<specification-version>1.0</specification-version>
|
||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.sleuthkit.autopsy.coreutils</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<release-version>0-1</release-version>
|
||||||
|
<specification-version>0.0</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<code-name-base>org.sleuthkit.autopsy.datamodel</code-name-base>
|
<code-name-base>org.sleuthkit.autopsy.datamodel</code-name-base>
|
||||||
<build-prerequisite/>
|
<build-prerequisite/>
|
||||||
@ -116,15 +125,6 @@
|
|||||||
<specification-version>1.0</specification-version>
|
<specification-version>1.0</specification-version>
|
||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<code-name-base>org.sleuthkit.autopsy.logging</code-name-base>
|
|
||||||
<build-prerequisite/>
|
|
||||||
<compile-dependency/>
|
|
||||||
<run-dependency>
|
|
||||||
<release-version>0-1</release-version>
|
|
||||||
<specification-version>0.0</specification-version>
|
|
||||||
</run-dependency>
|
|
||||||
</dependency>
|
|
||||||
</module-dependencies>
|
</module-dependencies>
|
||||||
<public-packages>
|
<public-packages>
|
||||||
<package>org.sleuthkit.autopsy.filesearch</package>
|
<package>org.sleuthkit.autopsy.filesearch</package>
|
||||||
|
@ -60,6 +60,7 @@ public class DataResultFilterNode extends FilterNode {
|
|||||||
@Override
|
@Override
|
||||||
public Action[] visit(Directory dir) {
|
public Action[] visit(Directory dir) {
|
||||||
return new Action[]{
|
return new Action[]{
|
||||||
|
new ExtractAction("Extract Directory", getOriginal()),
|
||||||
new ChangeViewAction("View", 0, getOriginal()),
|
new ChangeViewAction("View", 0, getOriginal()),
|
||||||
new OpenParentFolderAction("Open Parent Directory", ContentUtils.getSystemPath(dir))
|
new OpenParentFolderAction("Open Parent Directory", ContentUtils.getSystemPath(dir))
|
||||||
};
|
};
|
||||||
@ -69,7 +70,7 @@ public class DataResultFilterNode extends FilterNode {
|
|||||||
public Action[] visit(File f) {
|
public Action[] visit(File f) {
|
||||||
return new Action[]{
|
return new Action[]{
|
||||||
new ExternalViewerAction("Open in External Viewer", getOriginal()),
|
new ExternalViewerAction("Open in External Viewer", getOriginal()),
|
||||||
new ExtractAction("Extract", getOriginal()),
|
new ExtractAction("Extract File", getOriginal()),
|
||||||
new ChangeViewAction("View", 0, getOriginal()),
|
new ChangeViewAction("View", 0, getOriginal()),
|
||||||
new OpenParentFolderAction("Open Parent Directory", ContentUtils.getSystemPath(f))
|
new OpenParentFolderAction("Open Parent Directory", ContentUtils.getSystemPath(f))
|
||||||
};
|
};
|
||||||
|
@ -48,6 +48,7 @@ import org.openide.NotifyDescriptor;
|
|||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataExplorer;
|
import org.sleuthkit.autopsy.corecomponentinterfaces.DataExplorer;
|
||||||
import org.sleuthkit.autopsy.corecomponents.DataResultTopComponent;
|
import org.sleuthkit.autopsy.corecomponents.DataResultTopComponent;
|
||||||
|
import org.sleuthkit.autopsy.corecomponents.TableFilterNode;
|
||||||
import org.sleuthkit.autopsy.filesearch.FileSearchFilter.FilterValidationException;
|
import org.sleuthkit.autopsy.filesearch.FileSearchFilter.FilterValidationException;
|
||||||
import org.sleuthkit.datamodel.FsContent;
|
import org.sleuthkit.datamodel.FsContent;
|
||||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||||
@ -174,7 +175,7 @@ public final class FileSearchTopComponent extends TopComponent implements DataEx
|
|||||||
logger.log(Level.WARNING, "Error while trying to get the number of matches.", ex);
|
logger.log(Level.WARNING, "Error while trying to get the number of matches.", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
TopComponent searchResultWin = DataResultTopComponent.createInstance(title, pathText, new SearchNode(fsContentList), totalMatches);
|
TopComponent searchResultWin = DataResultTopComponent.createInstance(title, pathText, new TableFilterNode(new SearchNode(fsContentList), true), totalMatches);
|
||||||
|
|
||||||
searchResultWin.requestActive(); // make it the active top component
|
searchResultWin.requestActive(); // make it the active top component
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ import org.openide.nodes.Node;
|
|||||||
import org.openide.nodes.NodeOp;
|
import org.openide.nodes.NodeOp;
|
||||||
import org.openide.windows.TopComponent;
|
import org.openide.windows.TopComponent;
|
||||||
import org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent;
|
import org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent;
|
||||||
import org.sleuthkit.autopsy.logging.Log;
|
import org.sleuthkit.autopsy.coreutils.Log;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
46
KeywordSearch/build.xml
Normal file
46
KeywordSearch/build.xml
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
|
||||||
|
<!-- for some information on what you could do (e.g. targets to override). -->
|
||||||
|
<!-- If you delete this file and reopen the project it will be recreated. -->
|
||||||
|
<project name="org.sleuthkit.autopsy.keywordsearch" default="netbeans" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||||
|
<description>Builds, tests, and runs the project org.sleuthkit.autopsy.keywordsearch.</description>
|
||||||
|
<import file="nbproject/build-impl.xml"/>
|
||||||
|
|
||||||
|
|
||||||
|
<property name="ivy.install.version" value="2.1.0-rc2" />
|
||||||
|
<condition property="ivy.home" value="${env.IVY_HOME}">
|
||||||
|
<isset property="env.IVY_HOME" />
|
||||||
|
</condition>
|
||||||
|
<property name="ivy.home" value="${user.home}/.ant" />
|
||||||
|
<property name="ivy.jar.dir" value="${ivy.home}/lib" />
|
||||||
|
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
|
||||||
|
|
||||||
|
<target name="download-ivy" unless="offline">
|
||||||
|
<mkdir dir="${ivy.jar.dir}"/>
|
||||||
|
<get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
|
||||||
|
dest="${ivy.jar.file}" usetimestamp="true"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- init-ivy will bootstrap Ivy if the user doesn't have it already -->
|
||||||
|
<target name="init-ivy" depends="download-ivy">
|
||||||
|
<path id="ivy.lib.path">
|
||||||
|
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
|
||||||
|
</path>
|
||||||
|
<taskdef resource="org/apache/ivy/ant/antlib.xml"
|
||||||
|
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<target name="init" depends="basic-init,files-init,build-init,-javac-init,init-ivy">
|
||||||
|
|
||||||
|
<!-- fetch all the dependencies from Ivy and stick them in the right places -->
|
||||||
|
<ivy:resolve/>
|
||||||
|
<ivy:retrieve conf="autopsy" sync="true" pattern="/release/modules/ext/[artifact]-[revision](-[classifier]).[ext]" />
|
||||||
|
<ivy:retrieve conf="solr-war" sync="true" pattern="/release/solr/webapps/solr.war" />
|
||||||
|
<ivy:retrieve conf="start-solr" sync="true" pattern="/release/solr/start.jar" />
|
||||||
|
<ivy:retrieve conf="jetty-libs" sync="true" pattern="/release/solr/lib/[artifact]-[revision](-[classifier]).[ext]" />
|
||||||
|
<ivy:retrieve conf="solr-libs" sync="true" pattern="/release/solr/solr/lib/[artifact]-[revision](-[classifier]).[ext]" />
|
||||||
|
|
||||||
|
</target>
|
||||||
|
|
||||||
|
</project>
|
23
KeywordSearch/ivy.xml
Normal file
23
KeywordSearch/ivy.xml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
<ivy-module version="2.0">
|
||||||
|
<info organisation="org.sleuthkit.autopsy" module="keywordsearch"/>
|
||||||
|
<configurations >
|
||||||
|
<!-- module dependencies -->
|
||||||
|
<conf name="autopsy"/>
|
||||||
|
|
||||||
|
<!-- Solr server dependencies -->
|
||||||
|
<conf name="solr-libs"/>
|
||||||
|
<conf name="solr-war"/>
|
||||||
|
<conf name="start-solr"/>
|
||||||
|
<conf name="jetty-libs"/>
|
||||||
|
</configurations>
|
||||||
|
<dependencies>
|
||||||
|
<dependency conf="solr-libs->default" org="org.apache.solr" name="solr-cell" rev="3.5.0"/>
|
||||||
|
<dependency conf="solr-war->default" org="org.apache.solr" name="solr" rev="3.5.0" transitive="false" /> <!-- the war file -->
|
||||||
|
<dependency conf="autopsy->*" org="org.apache.solr" name="solr-solrj" rev="3.5.0"/>
|
||||||
|
<dependency conf="autopsy->*" org="commons-lang" name="commons-lang" rev="2.4"/>
|
||||||
|
<dependency conf="start-solr->default" org="org.mortbay.jetty" name="start" rev="6.1.26"/>
|
||||||
|
<dependency conf="jetty-libs->default" org="org.mortbay.jetty" name="jetty" rev="6.1.26"/>
|
||||||
|
<dependency conf="jetty-libs->default" org="org.mortbay.jetty" name="jsp-2.1" rev="6.1.14"/>
|
||||||
|
</dependencies>
|
||||||
|
</ivy-module>
|
8
KeywordSearch/manifest.mf
Normal file
8
KeywordSearch/manifest.mf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
OpenIDE-Module: org.sleuthkit.autopsy.keywordsearch/0
|
||||||
|
OpenIDE-Module-Implementation-Version: 1
|
||||||
|
OpenIDE-Module-Install: org/sleuthkit/autopsy/keywordsearch/Installer.class
|
||||||
|
OpenIDE-Module-Layer: org/sleuthkit/autopsy/keywordsearch/layer.xml
|
||||||
|
OpenIDE-Module-Localizing-Bundle: org/sleuthkit/autopsy/keywordsearch/Bundle.properties
|
||||||
|
OpenIDE-Module-Requires: org.openide.windows.WindowManager
|
||||||
|
|
45
KeywordSearch/nbproject/build-impl.xml
Normal file
45
KeywordSearch/nbproject/build-impl.xml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||||
|
*** EDIT ../build.xml INSTEAD ***
|
||||||
|
-->
|
||||||
|
<project name="org.sleuthkit.autopsy.keywordsearch-impl" basedir="..">
|
||||||
|
<fail message="Please build using Ant 1.7.1 or higher.">
|
||||||
|
<condition>
|
||||||
|
<not>
|
||||||
|
<antversion atleast="1.7.1"/>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
</fail>
|
||||||
|
<property file="nbproject/private/suite-private.properties"/>
|
||||||
|
<property file="nbproject/suite.properties"/>
|
||||||
|
<fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
|
||||||
|
<property file="${suite.dir}/nbproject/private/platform-private.properties"/>
|
||||||
|
<property file="${suite.dir}/nbproject/platform.properties"/>
|
||||||
|
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||||
|
<attribute name="name"/>
|
||||||
|
<attribute name="value"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="@{name}" value="${@{value}}"/>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
<macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||||
|
<attribute name="property"/>
|
||||||
|
<attribute name="value"/>
|
||||||
|
<sequential>
|
||||||
|
<property name="@{property}" value="@{value}"/>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
<property file="${user.properties.file}"/>
|
||||||
|
<nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||||
|
<nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||||
|
<nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||||
|
<fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
|
||||||
|
<condition>
|
||||||
|
<not>
|
||||||
|
<contains string="${cluster.path.evaluated}" substring="platform"/>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
</fail>
|
||||||
|
<import file="${harness.dir}/build.xml"/>
|
||||||
|
</project>
|
8
KeywordSearch/nbproject/genfiles.properties
Normal file
8
KeywordSearch/nbproject/genfiles.properties
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
build.xml.data.CRC32=eaa84b46
|
||||||
|
build.xml.script.CRC32=87b97b04
|
||||||
|
build.xml.stylesheet.CRC32=a56c6a5b@1.46.2
|
||||||
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
|
nbproject/build-impl.xml.data.CRC32=957d4757
|
||||||
|
nbproject/build-impl.xml.script.CRC32=fe1f48d2
|
||||||
|
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.47.1
|
12
KeywordSearch/nbproject/project.properties
Normal file
12
KeywordSearch/nbproject/project.properties
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
file.reference.commons-codec-1.5.jar=release/modules/ext/commons-codec-1.5.jar
|
||||||
|
file.reference.commons-httpclient-3.1.jar=release/modules/ext/commons-httpclient-3.1.jar
|
||||||
|
file.reference.commons-io-1.4.jar=release/modules/ext/commons-io-1.4.jar
|
||||||
|
file.reference.commons-lang-2.4.jar=release/modules/ext/commons-lang-2.4.jar
|
||||||
|
file.reference.jcl-over-slf4j-1.6.1.jar=release/modules/ext/jcl-over-slf4j-1.6.1.jar
|
||||||
|
file.reference.slf4j-api-1.6.1.jar=release/modules/ext/slf4j-api-1.6.1.jar
|
||||||
|
file.reference.solr-solrj-3.5.0.jar=release/modules/ext/solr-solrj-3.5.0.jar
|
||||||
|
javac.source=1.6
|
||||||
|
javac.compilerargs=-Xlint -Xlint:-serial
|
||||||
|
javadoc.reference.solr-solrj-3.5.0.jar=release/modules/ext/solr-solrj-3.5.0-javadoc.jar
|
||||||
|
source.reference.solr-solrj-3.5.0.jar=release/modules/ext/solr-solrj-3.5.0-sources.jar
|
||||||
|
spec.version.base=0.0
|
154
KeywordSearch/nbproject/project.xml
Normal file
154
KeywordSearch/nbproject/project.xml
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||||
|
<type>org.netbeans.modules.apisupport.project</type>
|
||||||
|
<configuration>
|
||||||
|
<data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
|
||||||
|
<code-name-base>org.sleuthkit.autopsy.keywordsearch</code-name-base>
|
||||||
|
<suite-component/>
|
||||||
|
<module-dependencies>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.netbeans.api.progress</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<release-version>1</release-version>
|
||||||
|
<specification-version>1.24.1</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.netbeans.modules.settings</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<release-version>1</release-version>
|
||||||
|
<specification-version>1.31.1</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.openide.awt</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<specification-version>7.31.1</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.openide.modules</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<specification-version>7.23.1</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.openide.nodes</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<specification-version>7.21.1</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.openide.util</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<specification-version>8.15.1</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.openide.util.lookup</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<specification-version>8.8.1</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.openide.windows</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<specification-version>6.40.1</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.sleuthkit.autopsy.casemodule</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<release-version>1</release-version>
|
||||||
|
<specification-version>1.0</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.sleuthkit.autopsy.corecomponentinterfaces</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<release-version>1</release-version>
|
||||||
|
<specification-version>1.0</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.sleuthkit.autopsy.corecomponents</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<release-version>1</release-version>
|
||||||
|
<specification-version>1.0</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.sleuthkit.autopsy.coreutils</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<release-version>0-1</release-version>
|
||||||
|
<specification-version>0.0</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.sleuthkit.autopsy.datamodel</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<release-version>1</release-version>
|
||||||
|
<specification-version>1.0</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
|
</module-dependencies>
|
||||||
|
<public-packages>
|
||||||
|
<package>org.sleuthkit.autopsy.keywordsearch</package>
|
||||||
|
</public-packages>
|
||||||
|
<class-path-extension>
|
||||||
|
<runtime-relative-path>ext/slf4j-api-1.6.1.jar</runtime-relative-path>
|
||||||
|
<binary-origin>release/modules/ext/slf4j-api-1.6.1.jar</binary-origin>
|
||||||
|
</class-path-extension>
|
||||||
|
<class-path-extension>
|
||||||
|
<runtime-relative-path>ext/commons-io-1.4.jar</runtime-relative-path>
|
||||||
|
<binary-origin>release/modules/ext/commons-io-1.4.jar</binary-origin>
|
||||||
|
</class-path-extension>
|
||||||
|
<class-path-extension>
|
||||||
|
<runtime-relative-path>ext/commons-httpclient-3.1.jar</runtime-relative-path>
|
||||||
|
<binary-origin>release/modules/ext/commons-httpclient-3.1.jar</binary-origin>
|
||||||
|
</class-path-extension>
|
||||||
|
<class-path-extension>
|
||||||
|
<runtime-relative-path>ext/commons-codec-1.5.jar</runtime-relative-path>
|
||||||
|
<binary-origin>release/modules/ext/commons-codec-1.5.jar</binary-origin>
|
||||||
|
</class-path-extension>
|
||||||
|
<class-path-extension>
|
||||||
|
<runtime-relative-path>ext/commons-lang-2.4.jar</runtime-relative-path>
|
||||||
|
<binary-origin>release/modules/ext/commons-lang-2.4.jar</binary-origin>
|
||||||
|
</class-path-extension>
|
||||||
|
<class-path-extension>
|
||||||
|
<runtime-relative-path>ext/jcl-over-slf4j-1.6.1.jar</runtime-relative-path>
|
||||||
|
<binary-origin>release/modules/ext/jcl-over-slf4j-1.6.1.jar</binary-origin>
|
||||||
|
</class-path-extension>
|
||||||
|
<class-path-extension>
|
||||||
|
<runtime-relative-path>ext/solr-solrj-3.5.0.jar</runtime-relative-path>
|
||||||
|
<binary-origin>release/modules/ext/solr-solrj-3.5.0.jar</binary-origin>
|
||||||
|
</class-path-extension>
|
||||||
|
</data>
|
||||||
|
</configuration>
|
||||||
|
</project>
|
1
KeywordSearch/nbproject/suite.properties
Normal file
1
KeywordSearch/nbproject/suite.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
suite.dir=${basedir}/..
|
227
KeywordSearch/release/solr/etc/jetty.xml
Normal file
227
KeywordSearch/release/solr/etc/jetty.xml
Normal file
@ -0,0 +1,227 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
|
||||||
|
|
||||||
|
<!-- =============================================================== -->
|
||||||
|
<!-- Configure the Jetty Server -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- Documentation of this file format can be found at: -->
|
||||||
|
<!-- http://docs.codehaus.org/display/JETTY/jetty.xml -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- =============================================================== -->
|
||||||
|
|
||||||
|
|
||||||
|
<Configure id="Server" class="org.mortbay.jetty.Server">
|
||||||
|
|
||||||
|
<!-- Increase the maximum POST size to 1 MB to be able to handle large shard requests -->
|
||||||
|
<Call class="java.lang.System" name="setProperty">
|
||||||
|
<Arg>org.mortbay.jetty.Request.maxFormContentSize</Arg>
|
||||||
|
<Arg>1000000</Arg>
|
||||||
|
</Call>
|
||||||
|
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<!-- Server Thread Pool -->
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<Set name="ThreadPool">
|
||||||
|
|
||||||
|
<New class="org.mortbay.thread.QueuedThreadPool">
|
||||||
|
<Set name="minThreads">10</Set>
|
||||||
|
<Set name="maxThreads">10000</Set>
|
||||||
|
<Set name="lowThreads">20</Set>
|
||||||
|
</New>
|
||||||
|
|
||||||
|
<!-- Optional Java 5 bounded threadpool with job queue
|
||||||
|
<New class="org.mortbay.thread.concurrent.ThreadPool">
|
||||||
|
<Set name="corePoolSize">50</Set>
|
||||||
|
<Set name="maximumPoolSize">50</Set>
|
||||||
|
</New>
|
||||||
|
-->
|
||||||
|
</Set>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<!-- Set connectors -->
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<!-- One of each type! -->
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
|
||||||
|
<!-- Use this connector for many frequently idle connections
|
||||||
|
and for threadless continuations.
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
<Call name="addConnector">
|
||||||
|
<Arg>
|
||||||
|
<New class="org.mortbay.jetty.nio.SelectChannelConnector">
|
||||||
|
<Set name="host"><SystemProperty name="jetty.host" /></Set>
|
||||||
|
<Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>
|
||||||
|
<Set name="maxIdleTime">30000</Set>
|
||||||
|
<Set name="Acceptors">2</Set>
|
||||||
|
<Set name="statsOn">false</Set>
|
||||||
|
<Set name="confidentialPort">8443</Set>
|
||||||
|
<Set name="lowResourcesConnections">5000</Set>
|
||||||
|
<Set name="lowResourcesMaxIdleTime">5000</Set>
|
||||||
|
</New>
|
||||||
|
</Arg>
|
||||||
|
</Call>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- This connector is currently being used for Solr because it
|
||||||
|
showed better performance than nio.SelectChannelConnector
|
||||||
|
for typical Solr requests. -->
|
||||||
|
<Call name="addConnector">
|
||||||
|
<Arg>
|
||||||
|
<New class="org.mortbay.jetty.bio.SocketConnector">
|
||||||
|
<Set name="host"><SystemProperty name="jetty.host" default="127.0.0.1"/></Set>
|
||||||
|
<Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>
|
||||||
|
<Set name="maxIdleTime">50000</Set>
|
||||||
|
<Set name="lowResourceMaxIdleTime">1500</Set>
|
||||||
|
<Set name="statsOn">false</Set>
|
||||||
|
</New>
|
||||||
|
</Arg>
|
||||||
|
</Call>
|
||||||
|
|
||||||
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||||
|
<!-- To add a HTTPS SSL listener -->
|
||||||
|
<!-- see jetty-ssl.xml to add an ssl connector. use -->
|
||||||
|
<!-- java -jar start.jar etc/jetty.xml etc/jetty-ssl.xml -->
|
||||||
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||||
|
|
||||||
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||||
|
<!-- To allow Jetty to be started from xinetd -->
|
||||||
|
<!-- mixin jetty-xinetd.xml: -->
|
||||||
|
<!-- java -jar start.jar etc/jetty.xml etc/jetty-xinetd.xml -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- See jetty-xinetd.xml for further instructions. -->
|
||||||
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||||
|
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<!-- Set up global session ID manager -->
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<!--
|
||||||
|
<Set name="sessionIdManager">
|
||||||
|
<New class="org.mortbay.jetty.servlet.HashSessionIdManager">
|
||||||
|
<Set name="workerName">node1</Set>
|
||||||
|
</New>
|
||||||
|
</Set>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<!-- Set handler Collection Structure -->
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<Set name="handler">
|
||||||
|
<New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
|
||||||
|
<Set name="handlers">
|
||||||
|
<Array type="org.mortbay.jetty.Handler">
|
||||||
|
<Item>
|
||||||
|
<New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
|
||||||
|
</Item>
|
||||||
|
<Item>
|
||||||
|
<New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>
|
||||||
|
</Item>
|
||||||
|
<Item>
|
||||||
|
<New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/>
|
||||||
|
</Item>
|
||||||
|
</Array>
|
||||||
|
</Set>
|
||||||
|
</New>
|
||||||
|
</Set>
|
||||||
|
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<!-- Configure the context deployer -->
|
||||||
|
<!-- A context deployer will deploy contexts described in -->
|
||||||
|
<!-- configuration files discovered in a directory. -->
|
||||||
|
<!-- The configuration directory can be scanned for hot -->
|
||||||
|
<!-- deployments at the configured scanInterval. -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- This deployer is configured to deploy contexts configured -->
|
||||||
|
<!-- in the $JETTY_HOME/contexts directory -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<Call name="addLifeCycle">
|
||||||
|
<Arg>
|
||||||
|
<New class="org.mortbay.jetty.deployer.ContextDeployer">
|
||||||
|
<Set name="contexts"><Ref id="Contexts"/></Set>
|
||||||
|
<Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
|
||||||
|
<Set name="scanInterval">5</Set>
|
||||||
|
</New>
|
||||||
|
</Arg>
|
||||||
|
</Call>
|
||||||
|
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<!-- Configure the webapp deployer. -->
|
||||||
|
<!-- A webapp deployer will deploy standard webapps discovered -->
|
||||||
|
<!-- in a directory at startup, without the need for additional -->
|
||||||
|
<!-- configuration files. It does not support hot deploy or -->
|
||||||
|
<!-- non standard contexts (see ContextDeployer above). -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- This deployer is configured to deploy webapps from the -->
|
||||||
|
<!-- $JETTY_HOME/webapps directory -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- Normally only one type of deployer need be used. -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<Call name="addLifeCycle">
|
||||||
|
<Arg>
|
||||||
|
<New class="org.mortbay.jetty.deployer.WebAppDeployer">
|
||||||
|
<Set name="contexts"><Ref id="Contexts"/></Set>
|
||||||
|
<Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/webapps</Set>
|
||||||
|
<Set name="parentLoaderPriority">false</Set>
|
||||||
|
<Set name="extract">true</Set>
|
||||||
|
<Set name="allowDuplicates">false</Set>
|
||||||
|
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
|
||||||
|
</New>
|
||||||
|
</Arg>
|
||||||
|
</Call>
|
||||||
|
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<!-- Configure Authentication Realms -->
|
||||||
|
<!-- Realms may be configured for the entire server here, or -->
|
||||||
|
<!-- they can be configured for a specific web app in a context -->
|
||||||
|
<!-- configuration (see $(jetty.home)/contexts/test.xml for an -->
|
||||||
|
<!-- example). -->
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<!--
|
||||||
|
<Set name="UserRealms">
|
||||||
|
<Array type="org.mortbay.jetty.security.UserRealm">
|
||||||
|
<Item>
|
||||||
|
<New class="org.mortbay.jetty.security.HashUserRealm">
|
||||||
|
<Set name="name">Test Realm</Set>
|
||||||
|
<Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
|
||||||
|
<Set name="refreshInterval">0</Set>
|
||||||
|
</New>
|
||||||
|
</Item>
|
||||||
|
</Array>
|
||||||
|
</Set>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<!-- Configure Request Log -->
|
||||||
|
<!-- Request logs may be configured for the entire server here, -->
|
||||||
|
<!-- or they can be configured for a specific web app in a -->
|
||||||
|
<!-- contexts configuration (see $(jetty.home)/contexts/test.xml -->
|
||||||
|
<!-- for an example). -->
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<!--
|
||||||
|
<Ref id="RequestLog">
|
||||||
|
<Set name="requestLog">
|
||||||
|
<New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog">
|
||||||
|
<Set name="filename"><SystemProperty name="jetty.logs" default="./logs"/>/yyyy_mm_dd.request.log</Set>
|
||||||
|
<Set name="filenameDateFormat">yyyy_MM_dd</Set>
|
||||||
|
<Set name="retainDays">90</Set>
|
||||||
|
<Set name="append">true</Set>
|
||||||
|
<Set name="extended">false</Set>
|
||||||
|
<Set name="logCookies">false</Set>
|
||||||
|
<Set name="LogTimeZone">GMT</Set>
|
||||||
|
</New>
|
||||||
|
</Set>
|
||||||
|
</Ref>
|
||||||
|
-->
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<!-- extra options -->
|
||||||
|
<!-- =========================================================== -->
|
||||||
|
<Set name="stopAtShutdown">true</Set>
|
||||||
|
<Set name="sendServerVersion">false</Set>
|
||||||
|
<Set name="sendDateHeader">false</Set>
|
||||||
|
<Set name="gracefulShutdown">1000</Set>
|
||||||
|
|
||||||
|
</Configure>
|
410
KeywordSearch/release/solr/etc/webdefault.xml
Normal file
410
KeywordSearch/release/solr/etc/webdefault.xml
Normal file
@ -0,0 +1,410 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
|
||||||
|
<!-- ===================================================================== -->
|
||||||
|
<!-- This file contains the default descriptor for web applications. -->
|
||||||
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||||
|
<!-- The intent of this descriptor is to include jetty specific or common -->
|
||||||
|
<!-- configuration for all webapps. If a context has a webdefault.xml -->
|
||||||
|
<!-- descriptor, it is applied before the contexts own web.xml file -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- A context may be assigned a default descriptor by: -->
|
||||||
|
<!-- + Calling WebApplicationContext.setDefaultsDescriptor -->
|
||||||
|
<!-- + Passed an arg to addWebApplications -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- This file is used both as the resource within the jetty.jar (which is -->
|
||||||
|
<!-- used as the default if no explicit defaults descriptor is set) and it -->
|
||||||
|
<!-- is copied to the etc directory of the Jetty distro and explicitly -->
|
||||||
|
<!-- by the jetty.xml file. -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- ===================================================================== -->
|
||||||
|
<web-app
|
||||||
|
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||||
|
metadata-complete="true"
|
||||||
|
version="2.5">
|
||||||
|
|
||||||
|
<description>
|
||||||
|
Default web.xml file.
|
||||||
|
This file is applied to a Web application before it's own WEB_INF/web.xml file
|
||||||
|
</description>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ==================================================================== -->
|
||||||
|
<!-- Context params to control Session Cookies -->
|
||||||
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||||
|
<!-- UNCOMMENT TO ACTIVATE
|
||||||
|
<context-param>
|
||||||
|
<param-name>org.mortbay.jetty.servlet.SessionDomain</param-name>
|
||||||
|
<param-value>127.0.0.1</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
|
<context-param>
|
||||||
|
<param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
|
||||||
|
<param-value>/</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
|
<context-param>
|
||||||
|
<param-name>org.mortbay.jetty.servlet.MaxAge</param-name>
|
||||||
|
<param-value>-1</param-value>
|
||||||
|
</context-param>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<context-param>
|
||||||
|
<param-name>org.mortbay.jetty.webapp.NoTLDJarPattern</param-name>
|
||||||
|
<param-value>start.jar|ant-.*\.jar|dojo-.*\.jar|jetty-.*\.jar|jsp-api-.*\.jar|junit-.*\.jar|servlet-api-.*\.jar|dnsns\.jar|rt\.jar|jsse\.jar|tools\.jar|sunpkcs11\.jar|sunjce_provider\.jar|xerces.*\.jar</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ==================================================================== -->
|
||||||
|
<!-- The default servlet. -->
|
||||||
|
<!-- This servlet, normally mapped to /, provides the handling for static -->
|
||||||
|
<!-- content, OPTIONS and TRACE methods for the context. -->
|
||||||
|
<!-- The following initParameters are supported: -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- acceptRanges If true, range requests and responses are -->
|
||||||
|
<!-- supported -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- dirAllowed If true, directory listings are returned if no -->
|
||||||
|
<!-- welcome file is found. Else 403 Forbidden. -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- welcomeServlets If true, attempt to dispatch to welcome files -->
|
||||||
|
<!-- that are servlets, if no matching static -->
|
||||||
|
<!-- resources can be found. -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- redirectWelcome If true, redirect welcome file requests -->
|
||||||
|
<!-- else use request dispatcher forwards -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- gzip If set to true, then static content will be served-->
|
||||||
|
<!-- as gzip content encoded if a matching resource is -->
|
||||||
|
<!-- found ending with ".gz" -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- resoureBase Can be set to replace the context resource base -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- relativeResourceBase -->
|
||||||
|
<!-- Set with a pathname relative to the base of the -->
|
||||||
|
<!-- servlet context root. Useful for only serving -->
|
||||||
|
<!-- static content from only specific subdirectories. -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- useFileMappedBuffer -->
|
||||||
|
<!-- If set to true (the default), a memory mapped -->
|
||||||
|
<!-- file buffer will be used to serve static content -->
|
||||||
|
<!-- when using an NIO connector. Setting this value -->
|
||||||
|
<!-- to false means that a direct buffer will be used -->
|
||||||
|
<!-- instead. If you are having trouble with Windows -->
|
||||||
|
<!-- file locking, set this to false. -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- cacheControl If set, all static content will have this value -->
|
||||||
|
<!-- set as the cache-control header. -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- maxCacheSize Maximum size of the static resource cache -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- maxCachedFileSize Maximum size of any single file in the cache -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- maxCachedFiles Maximum number of files in the cache -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- cacheType "nio", "bio" or "both" to determine the type(s) -->
|
||||||
|
<!-- of resource cache. A bio cached buffer may be used-->
|
||||||
|
<!-- by nio but is not as efficient as a nio buffer. -->
|
||||||
|
<!-- An nio cached buffer may not be used by bio. -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>default</servlet-name>
|
||||||
|
<servlet-class>org.mortbay.jetty.servlet.DefaultServlet</servlet-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>acceptRanges</param-name>
|
||||||
|
<param-value>true</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>dirAllowed</param-name>
|
||||||
|
<param-value>true</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>welcomeServlets</param-name>
|
||||||
|
<param-value>false</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>redirectWelcome</param-name>
|
||||||
|
<param-value>false</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>maxCacheSize</param-name>
|
||||||
|
<param-value>256000000</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>maxCachedFileSize</param-name>
|
||||||
|
<param-value>10000000</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>maxCachedFiles</param-name>
|
||||||
|
<param-value>1000</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>cacheType</param-name>
|
||||||
|
<param-value>both</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>gzip</param-name>
|
||||||
|
<param-value>true</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>useFileMappedBuffer</param-name>
|
||||||
|
<param-value>true</param-value>
|
||||||
|
</init-param>
|
||||||
|
<!--
|
||||||
|
<init-param>
|
||||||
|
<param-name>cacheControl</param-name>
|
||||||
|
<param-value>max-age=3600,public</param-value>
|
||||||
|
</init-param>
|
||||||
|
-->
|
||||||
|
<load-on-startup>0</load-on-startup>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ==================================================================== -->
|
||||||
|
<!-- JSP Servlet -->
|
||||||
|
<!-- This is the jasper JSP servlet from the jakarta project -->
|
||||||
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||||
|
<!-- The JSP page compiler and execution servlet, which is the mechanism -->
|
||||||
|
<!-- used by Glassfish to support JSP pages. Traditionally, this servlet -->
|
||||||
|
<!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
|
||||||
|
<!-- following initialization parameters (default values are in square -->
|
||||||
|
<!-- brackets): -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- checkInterval If development is false and reloading is true, -->
|
||||||
|
<!-- background compiles are enabled. checkInterval -->
|
||||||
|
<!-- is the time in seconds between checks to see -->
|
||||||
|
<!-- if a JSP page needs to be recompiled. [300] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- compiler Which compiler Ant should use to compile JSP -->
|
||||||
|
<!-- pages. See the Ant documenation for more -->
|
||||||
|
<!-- information. [javac] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- classdebuginfo Should the class file be compiled with -->
|
||||||
|
<!-- debugging information? [true] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- classpath What class path should I use while compiling -->
|
||||||
|
<!-- generated servlets? [Created dynamically -->
|
||||||
|
<!-- based on the current web application] -->
|
||||||
|
<!-- Set to ? to make the container explicitly set -->
|
||||||
|
<!-- this parameter. -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- development Is Jasper used in development mode (will check -->
|
||||||
|
<!-- for JSP modification on every access)? [true] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- enablePooling Determines whether tag handler pooling is -->
|
||||||
|
<!-- enabled [true] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- fork Tell Ant to fork compiles of JSP pages so that -->
|
||||||
|
<!-- a separate JVM is used for JSP page compiles -->
|
||||||
|
<!-- from the one Tomcat is running in. [true] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- ieClassId The class-id value to be sent to Internet -->
|
||||||
|
<!-- Explorer when using <jsp:plugin> tags. -->
|
||||||
|
<!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- javaEncoding Java file encoding to use for generating java -->
|
||||||
|
<!-- source files. [UTF-8] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- keepgenerated Should we keep the generated Java source code -->
|
||||||
|
<!-- for each page instead of deleting it? [true] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- logVerbosityLevel The level of detailed messages to be produced -->
|
||||||
|
<!-- by this servlet. Increasing levels cause the -->
|
||||||
|
<!-- generation of more messages. Valid values are -->
|
||||||
|
<!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
|
||||||
|
<!-- [WARNING] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- mappedfile Should we generate static content with one -->
|
||||||
|
<!-- print statement per input line, to ease -->
|
||||||
|
<!-- debugging? [false] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- reloading Should Jasper check for modified JSPs? [true] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- suppressSmap Should the generation of SMAP info for JSR45 -->
|
||||||
|
<!-- debugging be suppressed? [false] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
|
||||||
|
<!-- dumped to a file? [false] -->
|
||||||
|
<!-- False if suppressSmap is true -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- scratchdir What scratch directory should we use when -->
|
||||||
|
<!-- compiling JSP pages? [default work directory -->
|
||||||
|
<!-- for the current web application] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- tagpoolMaxSize The maximum tag handler pool size [5] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- xpoweredBy Determines whether X-Powered-By response -->
|
||||||
|
<!-- header is added by generated servlet [false] -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- If you wish to use Jikes to compile JSP pages: -->
|
||||||
|
<!-- Set the init parameter "compiler" to "jikes". Define -->
|
||||||
|
<!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty -->
|
||||||
|
<!-- to cause Jikes to emit error messages in a format compatible with -->
|
||||||
|
<!-- Jasper. -->
|
||||||
|
<!-- If you get an error reporting that jikes can't use UTF-8 encoding, -->
|
||||||
|
<!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". -->
|
||||||
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||||
|
<servlet id="jsp">
|
||||||
|
<servlet-name>jsp</servlet-name>
|
||||||
|
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>logVerbosityLevel</param-name>
|
||||||
|
<param-value>DEBUG</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>fork</param-name>
|
||||||
|
<param-value>false</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>xpoweredBy</param-name>
|
||||||
|
<param-value>false</param-value>
|
||||||
|
</init-param>
|
||||||
|
<!--
|
||||||
|
<init-param>
|
||||||
|
<param-name>classpath</param-name>
|
||||||
|
<param-value>?</param-value>
|
||||||
|
</init-param>
|
||||||
|
-->
|
||||||
|
<load-on-startup>0</load-on-startup>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>jsp</servlet-name>
|
||||||
|
<url-pattern>*.jsp</url-pattern>
|
||||||
|
<url-pattern>*.jspf</url-pattern>
|
||||||
|
<url-pattern>*.jspx</url-pattern>
|
||||||
|
<url-pattern>*.xsp</url-pattern>
|
||||||
|
<url-pattern>*.JSP</url-pattern>
|
||||||
|
<url-pattern>*.JSPF</url-pattern>
|
||||||
|
<url-pattern>*.JSPX</url-pattern>
|
||||||
|
<url-pattern>*.XSP</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!-- ==================================================================== -->
|
||||||
|
<!-- Dynamic Servlet Invoker. -->
|
||||||
|
<!-- This servlet invokes anonymous servlets that have not been defined -->
|
||||||
|
<!-- in the web.xml or by other means. The first element of the pathInfo -->
|
||||||
|
<!-- of a request passed to the envoker is treated as a servlet name for -->
|
||||||
|
<!-- an existing servlet, or as a class name of a new servlet. -->
|
||||||
|
<!-- This servlet is normally mapped to /servlet/* -->
|
||||||
|
<!-- This servlet support the following initParams: -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- nonContextServlets If false, the invoker can only load -->
|
||||||
|
<!-- servlets from the contexts classloader. -->
|
||||||
|
<!-- This is false by default and setting this -->
|
||||||
|
<!-- to true may have security implications. -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- verbose If true, log dynamic loads -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- * All other parameters are copied to the -->
|
||||||
|
<!-- each dynamic servlet as init parameters -->
|
||||||
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||||
|
<!-- Uncomment for dynamic invocation
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>invoker</servlet-name>
|
||||||
|
<servlet-class>org.mortbay.jetty.servlet.Invoker</servlet-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>verbose</param-name>
|
||||||
|
<param-value>false</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>nonContextServlets</param-name>
|
||||||
|
<param-value>false</param-value>
|
||||||
|
</init-param>
|
||||||
|
<init-param>
|
||||||
|
<param-name>dynamicParam</param-name>
|
||||||
|
<param-value>anyValue</param-value>
|
||||||
|
</init-param>
|
||||||
|
<load-on-startup>0</load-on-startup>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ==================================================================== -->
|
||||||
|
<session-config>
|
||||||
|
<session-timeout>30</session-timeout>
|
||||||
|
</session-config>
|
||||||
|
|
||||||
|
<!-- ==================================================================== -->
|
||||||
|
<!-- Default MIME mappings -->
|
||||||
|
<!-- The default MIME mappings are provided by the mime.properties -->
|
||||||
|
<!-- resource in the org.mortbay.jetty.jar file. Additional or modified -->
|
||||||
|
<!-- mappings may be specified here -->
|
||||||
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||||
|
<!-- UNCOMMENT TO ACTIVATE
|
||||||
|
<mime-mapping>
|
||||||
|
<extension>mysuffix</extension>
|
||||||
|
<mime-type>mymime/type</mime-type>
|
||||||
|
</mime-mapping>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- ==================================================================== -->
|
||||||
|
<welcome-file-list>
|
||||||
|
<welcome-file>index.html</welcome-file>
|
||||||
|
<welcome-file>index.htm</welcome-file>
|
||||||
|
<welcome-file>index.jsp</welcome-file>
|
||||||
|
</welcome-file-list>
|
||||||
|
|
||||||
|
<!-- ==================================================================== -->
|
||||||
|
<locale-encoding-mapping-list>
|
||||||
|
<locale-encoding-mapping><locale>ar</locale><encoding>ISO-8859-6</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>be</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>bg</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>ca</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>cs</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>da</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>de</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>el</locale><encoding>ISO-8859-7</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>en</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>es</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>et</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>fi</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>fr</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>hr</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>hu</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>is</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>it</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>iw</locale><encoding>ISO-8859-8</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>ja</locale><encoding>Shift_JIS</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>ko</locale><encoding>EUC-KR</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>lt</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>lv</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>mk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>nl</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>no</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>pl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>pt</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>ro</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>ru</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>sh</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>sk</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>sl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>sq</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>sr</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>sv</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>tr</locale><encoding>ISO-8859-9</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>uk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>zh</locale><encoding>GB2312</encoding></locale-encoding-mapping>
|
||||||
|
<locale-encoding-mapping><locale>zh_TW</locale><encoding>Big5</encoding></locale-encoding-mapping>
|
||||||
|
</locale-encoding-mapping-list>
|
||||||
|
|
||||||
|
<security-constraint>
|
||||||
|
<web-resource-collection>
|
||||||
|
<web-resource-name>Disable TRACE</web-resource-name>
|
||||||
|
<url-pattern>/</url-pattern>
|
||||||
|
<http-method>TRACE</http-method>
|
||||||
|
</web-resource-collection>
|
||||||
|
<auth-constraint/>
|
||||||
|
</security-constraint>
|
||||||
|
|
||||||
|
</web-app>
|
||||||
|
|
31
KeywordSearch/release/solr/solr/conf/admin-extra.html
Normal file
31
KeywordSearch/release/solr/solr/conf/admin-extra.html
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- The content of this page will be statically included into the top
|
||||||
|
of the admin page. Uncomment this as an example to see there the content
|
||||||
|
will show up.
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<i>This line will appear before the first table</i>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
This row will be appended to the end of the first table
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
-->
|
36
KeywordSearch/release/solr/solr/conf/elevate.xml
Normal file
36
KeywordSearch/release/solr/solr/conf/elevate.xml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- If this file is found in the config directory, it will only be
|
||||||
|
loaded once at startup. If it is found in Solr's data
|
||||||
|
directory, it will be re-loaded every commit.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<elevate>
|
||||||
|
<query text="foo bar">
|
||||||
|
<doc id="1" />
|
||||||
|
<doc id="2" />
|
||||||
|
<doc id="3" />
|
||||||
|
</query>
|
||||||
|
|
||||||
|
<query text="ipod">
|
||||||
|
<doc id="MA147LL/A" /> <!-- put the actual ipod at the top -->
|
||||||
|
<doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
|
||||||
|
</query>
|
||||||
|
|
||||||
|
</elevate>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user