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