mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge remote-tracking branch 'upstream/release-4.4.0' into develop
This commit is contained in:
commit
f4808cd622
@ -2019,8 +2019,6 @@ public class Case {
|
||||
|
||||
/**
|
||||
* Closes the case.
|
||||
*
|
||||
* @param progressIndicator A progress indicator.
|
||||
*/
|
||||
private void close() throws CaseActionException {
|
||||
/*
|
||||
@ -2655,7 +2653,7 @@ public class Case {
|
||||
* @param textIndexName The text index name.
|
||||
*
|
||||
* @throws CaseMetadataException
|
||||
* @dprecated Do not use.
|
||||
* @deprecated Do not use.
|
||||
*/
|
||||
@Deprecated
|
||||
public void setTextIndexName(String textIndexName) throws CaseMetadataException {
|
||||
|
@ -72,11 +72,12 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final String firstColumnLabel = NbBundle.getMessage(DataResultViewerTable.class, "DataResultViewerTable.firstColLbl");
|
||||
/* The properties map maps
|
||||
* key: stored value of column index -> value: property at that index
|
||||
* We move around stored values instead of directly using the column indices
|
||||
* in order to not override settings for a column that may not appear in the
|
||||
* current table view due to its collection of its children's properties.
|
||||
/*
|
||||
* The properties map maps key: stored value of column index -> value:
|
||||
* property at that index We move around stored values instead of directly
|
||||
* using the column indices in order to not override settings for a column
|
||||
* that may not appear in the current table view due to its collection of
|
||||
* its children's properties.
|
||||
*/
|
||||
private final Map<Integer, Property<?>> propertiesMap = new TreeMap<>();
|
||||
private final PleasewaitNodeListener pleasewaitNodeListener = new PleasewaitNodeListener();
|
||||
@ -124,15 +125,19 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
@Override
|
||||
public void columnAdded(TableColumnModelEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void columnRemoved(TableColumnModelEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void columnMarginChanged(ChangeEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void columnSelectionChanged(ListSelectionEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void columnMoved(TableColumnModelEvent e) {
|
||||
int fromIndex = e.getFromIndex();
|
||||
@ -141,14 +146,16 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Because a column may be dragged to several different positions before
|
||||
* the mouse is released (thus causing multiple TableColumnModelEvents to
|
||||
* be fired), we want to keep track of the starting column index in this
|
||||
* potential series of movements. Therefore we only keep track of the
|
||||
* original fromIndex in startColumnIndex, but we always update
|
||||
* endColumnIndex to know the final position of the moved column.
|
||||
* See the MouseListener mouseReleased method.
|
||||
*/
|
||||
/*
|
||||
* Because a column may be dragged to several different
|
||||
* positions before the mouse is released (thus causing multiple
|
||||
* TableColumnModelEvents to be fired), we want to keep track of
|
||||
* the starting column index in this potential series of
|
||||
* movements. Therefore we only keep track of the original
|
||||
* fromIndex in startColumnIndex, but we always update
|
||||
* endColumnIndex to know the final position of the moved
|
||||
* column. See the MouseListener mouseReleased method.
|
||||
*/
|
||||
if (startColumnIndex == -1) {
|
||||
startColumnIndex = fromIndex;
|
||||
}
|
||||
@ -175,8 +182,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
propertiesMap.put(range[i], propertiesMap.get(range[i + 1]));
|
||||
}
|
||||
propertiesMap.put(range[rangeSize - 1], movedProp);
|
||||
}
|
||||
// column moved left, shift all properties right, put in moved
|
||||
} // column moved left, shift all properties right, put in moved
|
||||
// property at the leftmost index
|
||||
else {
|
||||
Property<?> movedProp = propertiesMap.get(range[rangeSize - 1]);
|
||||
@ -194,14 +200,15 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
ov.getOutline().getTableHeader().addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
/* If the startColumnIndex is not -1 (which is the reset value), that
|
||||
* means columns have been moved around. We then check to see if either
|
||||
* the starting or end position is 0 (the first column), and then swap
|
||||
* them back if that is the case because we don't want to allow movement
|
||||
* of the first column. We then reset startColumnIndex to -1, the reset
|
||||
* value.
|
||||
* We check if startColumnIndex is at reset or not because it is
|
||||
* possible for the mouse to be released and a MouseEvent to be fired
|
||||
/*
|
||||
* If the startColumnIndex is not -1 (which is the reset value),
|
||||
* that means columns have been moved around. We then check to
|
||||
* see if either the starting or end position is 0 (the first
|
||||
* column), and then swap them back if that is the case because
|
||||
* we don't want to allow movement of the first column. We then
|
||||
* reset startColumnIndex to -1, the reset value. We check if
|
||||
* startColumnIndex is at reset or not because it is possible
|
||||
* for the mouse to be released and a MouseEvent to be fired
|
||||
* without having moved any columns.
|
||||
*/
|
||||
if (startColumnIndex != -1 && (startColumnIndex == 0 || endColumnIndex == 0)) {
|
||||
@ -265,12 +272,16 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
|
||||
/**
|
||||
* Gets regular Bean property set properties from all 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
|
||||
* recursively, subchildren, of a Node.
|
||||
*
|
||||
* @param parent Node with at least one child to get properties from
|
||||
* @param rows max number of rows to retrieve properties for (can be used
|
||||
* for memory optimization)
|
||||
* Note: won't work out the box for lazy load - you need to set all children
|
||||
* properties for the parent by hand.
|
||||
*
|
||||
* @param parent Node (with at least one child) from which toget
|
||||
* properties.
|
||||
* @param rows Maximum number of rows to retrieve properties for
|
||||
* (can be used for memory optimization).
|
||||
* @param propertiesAcc Set in which to accumulate the properties.
|
||||
*/
|
||||
private void getAllChildPropertyHeadersRec(Node parent, int rows, Set<Property<?>> propertiesAcc) {
|
||||
Children children = parent.getChildren();
|
||||
@ -304,10 +315,12 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
@Override
|
||||
public void setNode(Node selectedNode) {
|
||||
final OutlineView ov = ((OutlineView) this.tableScrollPanel);
|
||||
/* The quick filter must be reset because when determining column width,
|
||||
/*
|
||||
* The quick filter must be reset because when determining column width,
|
||||
* ETable.getRowCount is called, and the documentation states that quick
|
||||
* filters must be unset for the method to work
|
||||
* "If the quick-filter is applied the number of rows do not match the number of rows in the model."
|
||||
* filters must be unset for the method to work "If the quick-filter is
|
||||
* applied the number of rows do not match the number of rows in the
|
||||
* model."
|
||||
*/
|
||||
ov.getOutline().unsetQuickFilter();
|
||||
// change the cursor to "waiting cursor" for this operation
|
||||
@ -430,12 +443,14 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
}
|
||||
|
||||
/**
|
||||
* This custom renderer extends the renderer that was already being
|
||||
* used by the outline table. This renderer colors a row if the
|
||||
* tags property of the node is not empty.
|
||||
* This custom renderer extends the renderer that was already being used
|
||||
* by the outline table. This renderer colors a row if the tags property
|
||||
* of the node is not empty.
|
||||
*/
|
||||
class ColorTagCustomRenderer extends DefaultOutlineCellRenderer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table,
|
||||
Object value, boolean isSelected, boolean hasFocus, int row, int col) {
|
||||
@ -555,7 +570,8 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
*
|
||||
* @param prop Property of the column
|
||||
* @param type The type of the current node
|
||||
* @return A generated key for the preference file
|
||||
*
|
||||
* @return A generated key for the preference file
|
||||
*/
|
||||
private String getColumnPreferenceKey(Property<?> prop, String type) {
|
||||
return type.replaceAll("[^a-zA-Z0-9_]", "") + "."
|
||||
|
@ -453,7 +453,7 @@ public final class FileTypesByMimeType extends Observable implements AutopsyVisi
|
||||
* @return query.toString - portion of SQL query which will follow a
|
||||
* WHERE clause.
|
||||
*/
|
||||
private String createQuery(String mime_type) {
|
||||
private String createQuery(String mimeType) {
|
||||
StringBuilder query = new StringBuilder();
|
||||
query.append("(dir_type = ").append(TskData.TSK_FS_NAME_TYPE_ENUM.REG.getValue()).append(")"); //NON-NLS
|
||||
query.append(" AND (type IN (").append(TskData.TSK_DB_FILES_TYPE_ENUM.FS.ordinal()).append(","); //NON-NLS
|
||||
@ -466,7 +466,7 @@ public final class FileTypesByMimeType extends Observable implements AutopsyVisi
|
||||
if (UserPreferences.hideKnownFilesInViewsTree()) {
|
||||
query.append(" AND (known IS NULL OR known != ").append(TskData.FileKnown.KNOWN.getFileKnownValue()).append(")"); //NON-NLS
|
||||
}
|
||||
query.append(" AND mime_type = '").append(mime_type).append("'"); //NON-NLS
|
||||
query.append(" AND mime_type = '").append(mimeType).append("'"); //NON-NLS
|
||||
return query.toString();
|
||||
}
|
||||
|
||||
|
@ -28,26 +28,27 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
|
||||
|
||||
/**
|
||||
* A Raw data source processor that implements the DataSourceProcessor service
|
||||
* provider interface to allow integration with the add data source wizard.
|
||||
* It also provides a run method overload to allow it to be used independently
|
||||
* of the wizard.
|
||||
* provider interface to allow integration with the add data source wizard. It
|
||||
* also provides a run method overload to allow it to be used independently of
|
||||
* the wizard.
|
||||
*/
|
||||
@ServiceProvider(service = DataSourceProcessor.class)
|
||||
public class RawDSProcessor implements DataSourceProcessor {
|
||||
|
||||
private final RawDSInputPanel configPanel;
|
||||
private AddRawImageTask addImageTask;
|
||||
|
||||
/*
|
||||
* Constructs a Raw data source processor that implements the
|
||||
* DataSourceProcessor service provider interface to allow integration
|
||||
* with the add data source wizard. It also provides a run method
|
||||
* overload to allow it to be used independently of the wizard.
|
||||
* DataSourceProcessor service provider interface to allow integration with
|
||||
* the add data source wizard. It also provides a run method overload to
|
||||
* allow it to be used independently of the wizard.
|
||||
*/
|
||||
public RawDSProcessor() {
|
||||
configPanel = RawDSInputPanel.createInstance(RawDSProcessor.class.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Gets a string that describes the type of data sources this processor is
|
||||
* able to add to the case database. The string is suitable for display in a
|
||||
* type selection UI component (e.g., a combo box).
|
||||
@ -68,7 +69,7 @@ public class RawDSProcessor implements DataSourceProcessor {
|
||||
*/
|
||||
@Override
|
||||
public String getDataSourceType() {
|
||||
return Bundle.RawDSProcessor_dataSourceType();
|
||||
return Bundle.RawDSProcessor_dataSourceType();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -119,28 +120,32 @@ public class RawDSProcessor implements DataSourceProcessor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a data source to the case database using a background task in a
|
||||
* separate thread and the given settings instead of those provided by the
|
||||
* Adds a "raw" data source to the case database using a background task in
|
||||
* a separate thread and the given settings instead of those provided by the
|
||||
* selection and configuration panel. Returns as soon as the background task
|
||||
* is started and uses the callback object to signal task completion and
|
||||
* return results.
|
||||
*
|
||||
* @param deviceId An ASCII-printable identifier for the
|
||||
* device associated with the data source
|
||||
* that is intended to be unique across
|
||||
* multiple cases (e.g., a UUID).
|
||||
* @param rawDSInputFilePath Path to a Raw data source file.
|
||||
* @param isHandsetFile Indicates whether the XML file is for a
|
||||
* handset or a SIM.
|
||||
* @param progressMonitor Progress monitor for reporting progress
|
||||
* during processing.
|
||||
* @param deviceId An ASCII-printable identifier for the device
|
||||
* associated with the data source that is
|
||||
* intended to be unique across multiple cases
|
||||
* (e.g., a UUID).
|
||||
* @param imageFilePath Path to the image file.
|
||||
* @param timeZone The time zone to use when processing dates
|
||||
* and times for the image, obtained from
|
||||
* java.util.TimeZone.getID.
|
||||
* @param chunkSize The maximum size of each chunk of the raw
|
||||
* data source as it is divided up into virtual
|
||||
* unallocated space files.
|
||||
* @param progressMonitor Progress monitor for reporting progress
|
||||
* during processing.
|
||||
* @param callback Callback to call when processing is done.
|
||||
*/
|
||||
private void run(String deviceId, String imageFilePath, String timeZone, long chunkSize, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
|
||||
addImageTask = new AddRawImageTask(deviceId, imageFilePath, timeZone, chunkSize, progressMonitor, callback);
|
||||
new Thread(addImageTask).start();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void cancel() {
|
||||
}
|
||||
|
@ -71,8 +71,9 @@ import org.sleuthkit.datamodel.TskException;
|
||||
import org.sleuthkit.datamodel.VirtualDirectory;
|
||||
|
||||
/**
|
||||
* This class wraps nodes as they are passed to the DataResult viewers. It
|
||||
* defines the actions that the node should have.
|
||||
* A node used to wrap another node before passing it to the result viewers. The
|
||||
* wrapper node defines the actions associated with the wrapped node and may
|
||||
* filter out some of its children.
|
||||
*/
|
||||
public class DataResultFilterNode extends FilterNode {
|
||||
|
||||
@ -111,22 +112,33 @@ public class DataResultFilterNode extends FilterNode {
|
||||
private final ExplorerManager sourceEm;
|
||||
|
||||
/**
|
||||
* Constructs a node used to wrap another node before passing it to the
|
||||
* result viewers. The wrapper node defines the actions associated with the
|
||||
* wrapped node and may filter out some of its children.
|
||||
*
|
||||
* @param node Root node to be passed to DataResult viewers
|
||||
* @param em ExplorerManager for component that is creating the node
|
||||
* @param node The node to wrap.
|
||||
* @param em The ExplorerManager for the component that is creating the
|
||||
* node.
|
||||
*/
|
||||
public DataResultFilterNode(Node node, ExplorerManager em) {
|
||||
super(node, new DataResultFilterChildren(node, em));
|
||||
this.sourceEm = em;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a node used to wrap another node before passing it to the
|
||||
* result viewers. The wrapper node defines the actions associated with the
|
||||
* wrapped node and may filter out some of its children.
|
||||
*
|
||||
* @param node Root node to be passed to DataResult viewers
|
||||
* @param em ExplorerManager for component that is creating the node
|
||||
* @param node The node to wrap.
|
||||
* @param em The ExplorerManager for the component that is creating
|
||||
* the node.
|
||||
* @param filterKnown Whether or not to filter out children that represent
|
||||
* known files.
|
||||
* @param filterSlack Whether or not to filter out children that represent
|
||||
* virtual slack space files.
|
||||
*/
|
||||
private DataResultFilterNode(Node node, ExplorerManager em, boolean filterKnown, boolean filterSlack) {
|
||||
private DataResultFilterNode(Node node, ExplorerManager em, boolean filterKnown, boolean filterSlack) {
|
||||
super(node, new DataResultFilterChildren(node, em, filterKnown, filterSlack));
|
||||
this.sourceEm = em;
|
||||
}
|
||||
@ -201,9 +213,9 @@ public class DataResultFilterNode extends FilterNode {
|
||||
* DataResultFilterNode that created in the DataResultFilterNode.java.
|
||||
*
|
||||
*/
|
||||
private static class DataResultFilterChildren extends FilterNode.Children {
|
||||
private static class DataResultFilterChildren extends FilterNode.Children {
|
||||
|
||||
private final ExplorerManager sourceEm;
|
||||
private final ExplorerManager sourceEm;
|
||||
|
||||
private boolean filterKnown;
|
||||
private boolean filterSlack;
|
||||
@ -211,7 +223,7 @@ public class DataResultFilterNode extends FilterNode {
|
||||
/**
|
||||
* the constructor
|
||||
*/
|
||||
private DataResultFilterChildren(Node arg, ExplorerManager sourceEm) {
|
||||
private DataResultFilterChildren(Node arg, ExplorerManager sourceEm) {
|
||||
super(arg);
|
||||
switch (SelectionContext.getSelectionContext(arg)) {
|
||||
case DATA_SOURCES:
|
||||
@ -230,7 +242,7 @@ public class DataResultFilterNode extends FilterNode {
|
||||
this.sourceEm = sourceEm;
|
||||
}
|
||||
|
||||
private DataResultFilterChildren(Node arg, ExplorerManager sourceEm, boolean filterKnown, boolean filterSlack) {
|
||||
private DataResultFilterChildren(Node arg, ExplorerManager sourceEm, boolean filterKnown, boolean filterSlack) {
|
||||
super(arg);
|
||||
this.filterKnown = filterKnown;
|
||||
this.filterSlack = filterSlack;
|
||||
@ -326,9 +338,9 @@ public class DataResultFilterNode extends FilterNode {
|
||||
actionsList.add(AddContentTagAction.getInstance());
|
||||
actionsList.add(AddBlackboardArtifactTagAction.getInstance());
|
||||
|
||||
final Collection<AbstractFile> selectedFilesList =
|
||||
new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
|
||||
if(selectedFilesList.size() == 1) {
|
||||
final Collection<AbstractFile> selectedFilesList
|
||||
= new HashSet<>(Utilities.actionsGlobalContext().lookupAll(AbstractFile.class));
|
||||
if (selectedFilesList.size() == 1) {
|
||||
actionsList.add(DeleteFileContentTagAction.getInstance());
|
||||
}
|
||||
} else {
|
||||
@ -338,13 +350,13 @@ public class DataResultFilterNode extends FilterNode {
|
||||
actionsList.add(AddBlackboardArtifactTagAction.getInstance());
|
||||
}
|
||||
|
||||
final Collection<BlackboardArtifact> selectedArtifactsList =
|
||||
new HashSet<>(Utilities.actionsGlobalContext().lookupAll(BlackboardArtifact.class));
|
||||
if(selectedArtifactsList.size() == 1) {
|
||||
final Collection<BlackboardArtifact> selectedArtifactsList
|
||||
= new HashSet<>(Utilities.actionsGlobalContext().lookupAll(BlackboardArtifact.class));
|
||||
if (selectedArtifactsList.size() == 1) {
|
||||
actionsList.add(DeleteFileBlackboardArtifactTagAction.getInstance());
|
||||
}
|
||||
|
||||
if(n != null) {
|
||||
if (n != null) {
|
||||
actionsList.addAll(ContextMenuExtensionPoint.getActions());
|
||||
}
|
||||
|
||||
@ -362,7 +374,6 @@ public class DataResultFilterNode extends FilterNode {
|
||||
return defaultVisit(fileTypes);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected List<Action> defaultVisit(DisplayableItemNode ditem) {
|
||||
//preserve the default node's actions
|
||||
@ -460,8 +471,6 @@ public class DataResultFilterNode extends FilterNode {
|
||||
return openChild(fileTypes);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Tell the originating ExplorerManager to display the given
|
||||
* dataModelNode.
|
||||
|
@ -42,7 +42,8 @@ public class ImageWriterService implements AutopsyService {
|
||||
/**
|
||||
* Create an image writer object for the given data source ID.
|
||||
*
|
||||
* @param imageId ID for the image
|
||||
* @param imageId ID for the image.
|
||||
* @param settings Image writer settings to be used when writing the image.
|
||||
*/
|
||||
public static void createImageWriter(Long imageId, ImageWriterSettings settings) {
|
||||
|
||||
|
@ -393,6 +393,9 @@ public class IngestJobSettings {
|
||||
/**
|
||||
* Gets the module names for a given key within these ingest job settings.
|
||||
*
|
||||
* @param context The identifier for the context for which to get the
|
||||
* module names, e.g., the Add Data Source wizard or
|
||||
* Run Ingest Modules context.
|
||||
* @param key The key string.
|
||||
* @param defaultSetting The default list of module names.
|
||||
*
|
||||
|
@ -138,9 +138,6 @@ public class IngestOptionsPanel extends IngestModuleGlobalSettingsPanel implemen
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void addPropertyChangeListener(PropertyChangeListener l) {
|
||||
filterPanel.addPropertyChangeListener(l);
|
||||
@ -148,9 +145,6 @@ public class IngestOptionsPanel extends IngestModuleGlobalSettingsPanel implemen
|
||||
profilePanel.addPropertyChangeListener(l);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void removePropertyChangeListener(PropertyChangeListener l) {
|
||||
filterPanel.removePropertyChangeListener(l);
|
||||
@ -158,9 +152,6 @@ public class IngestOptionsPanel extends IngestModuleGlobalSettingsPanel implemen
|
||||
profilePanel.removePropertyChangeListener(l);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void saveSettings() {
|
||||
saveTabByIndex(tabbedPane.getSelectedIndex());
|
||||
@ -189,17 +180,11 @@ public class IngestOptionsPanel extends IngestModuleGlobalSettingsPanel implemen
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void store() {
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void load() {
|
||||
filterPanel.load();
|
||||
|
@ -40,9 +40,6 @@ public class IngestOptionsPanelController extends OptionsPanelController {
|
||||
private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
|
||||
private boolean changed;
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void update() {
|
||||
getPanel().load();
|
||||
@ -69,9 +66,6 @@ public class IngestOptionsPanelController extends OptionsPanelController {
|
||||
return panel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void applyChanges() {
|
||||
if (changed) {
|
||||
@ -85,57 +79,36 @@ public class IngestOptionsPanelController extends OptionsPanelController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void cancel() {
|
||||
getPanel().cancel();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return getPanel().valid();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public boolean isChanged() {
|
||||
return changed;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public JComponent getComponent(Lookup lkp) {
|
||||
return getPanel();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public HelpCtx getHelpCtx() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void addPropertyChangeListener(PropertyChangeListener pl) {
|
||||
pcs.addPropertyChangeListener(pl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void removePropertyChangeListener(PropertyChangeListener pl) {
|
||||
pcs.removePropertyChangeListener(pl);
|
||||
|
@ -43,7 +43,6 @@ public abstract class ShortcutWizardDescriptorPanel implements WizardDescriptor.
|
||||
|
||||
/**
|
||||
* Whether or not the panel immediately following this one should be skipped
|
||||
* .
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
|
@ -169,9 +169,6 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
|
||||
this.equalitySignComboBox.setSelectedIndex(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void saveSettings() {
|
||||
try {
|
||||
@ -203,17 +200,11 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
|
||||
ingestWarningLabel.setVisible(!isEnabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void store() {
|
||||
this.saveSettings();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void load() {
|
||||
this.resetComponents();
|
||||
|
@ -315,16 +315,16 @@ class Ingester {
|
||||
*
|
||||
* @return The field map of fields that are common to all file classes.
|
||||
*/
|
||||
private Map<String, String> getCommonFields(AbstractFile af) {
|
||||
private Map<String, String> getCommonFields(AbstractFile file) {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put(Server.Schema.ID.toString(), Long.toString(af.getId()));
|
||||
params.put(Server.Schema.ID.toString(), Long.toString(file.getId()));
|
||||
try {
|
||||
params.put(Server.Schema.IMAGE_ID.toString(), Long.toString(af.getDataSource().getId()));
|
||||
params.put(Server.Schema.IMAGE_ID.toString(), Long.toString(file.getDataSource().getId()));
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Could not get data source id to properly index the file " + af.getId(), ex); //NON-NLS
|
||||
logger.log(Level.SEVERE, "Could not get data source id to properly index the file " + file.getId(), ex); //NON-NLS
|
||||
params.put(Server.Schema.IMAGE_ID.toString(), Long.toString(-1));
|
||||
}
|
||||
params.put(Server.Schema.FILE_NAME.toString(), af.getName());
|
||||
params.put(Server.Schema.FILE_NAME.toString(), file.getName());
|
||||
return params;
|
||||
}
|
||||
|
||||
|
@ -174,13 +174,10 @@ class StringsTextExtractor extends FileTextExtractor {
|
||||
private final byte[] oneCharBuf = new byte[1];
|
||||
|
||||
/**
|
||||
* Construct new string stream from FsContent Do not attempt to fill
|
||||
* Construct new string stream from FsContent. Do not attempt to fill
|
||||
* entire read buffer if that would break a string
|
||||
*
|
||||
* @param content to extract strings from
|
||||
* @param outputCharset target charset to encode into bytes and index
|
||||
* as, e.g. UTF-8
|
||||
*
|
||||
* @param content Content object from which to extract strings.
|
||||
*/
|
||||
private EnglishOnlyStream(AbstractFile content) {
|
||||
this.content = content;
|
||||
@ -378,8 +375,10 @@ class StringsTextExtractor extends FileTextExtractor {
|
||||
private final AbstractFile content;
|
||||
private final byte[] oneCharBuf = new byte[1];
|
||||
private final StringExtract stringExtractor;
|
||||
/** true if there is nothing to do because neither extractUTF8 nor
|
||||
* extractUTF16 was true in constructor */
|
||||
/**
|
||||
* true if there is nothing to do because neither extractUTF8 nor
|
||||
* extractUTF16 was true in constructor
|
||||
*/
|
||||
private final boolean nothingToDo;
|
||||
private final byte[] fileReadBuff = new byte[FILE_BUF_SIZE];
|
||||
private long fileReadOffset = 0L;
|
||||
|
@ -59,11 +59,9 @@ public class AutopsyTestCases {
|
||||
private long start;
|
||||
|
||||
/**
|
||||
* This method is used to escape file/directory path. Example:
|
||||
* \\NetworkLocation\foo\bar get escaped to \\\\NetworkLocation\foo\bar so
|
||||
* that it can be used as intended.
|
||||
* Escapes the slashes in a file or directory path.
|
||||
*
|
||||
* @param path
|
||||
* @param path The path to be escaped.
|
||||
*
|
||||
* @return escaped path the the file/directory location.
|
||||
*/
|
||||
@ -78,7 +76,7 @@ public class AutopsyTestCases {
|
||||
}
|
||||
}
|
||||
|
||||
public AutopsyTestCases () {
|
||||
public AutopsyTestCases() {
|
||||
start = 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user