Merge pull request #4976 from sleuthkit/release-4.12.0

Merge release 4.12.0 branch into develop branch
This commit is contained in:
Richard Cordovano 2019-06-27 15:36:33 -04:00 committed by GitHub
commit f2320ffcc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
46 changed files with 537 additions and 423 deletions

View File

@ -351,7 +351,11 @@ class UnpackagePortableCaseDialog extends javax.swing.JDialog {
private void unpackageButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_unpackageButtonActionPerformed private void unpackageButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_unpackageButtonActionPerformed
UnpackagePortableCaseProgressDialog dialog = new UnpackagePortableCaseProgressDialog(); UnpackagePortableCaseProgressDialog dialog = new UnpackagePortableCaseProgressDialog();
dialog.unpackageCase(caseTextField.getText(), outputTextField.getText()); dialog.unpackageCase(caseTextField.getText(), outputTextField.getText());
if (dialog.isSuccess()) {
dispose();
} else {
validatePaths(); // The output folder now exists so we need to disable the unpackage button validatePaths(); // The output folder now exists so we need to disable the unpackage button
}
}//GEN-LAST:event_unpackageButtonActionPerformed }//GEN-LAST:event_unpackageButtonActionPerformed

View File

@ -81,6 +81,19 @@ class UnpackagePortableCaseProgressDialog extends javax.swing.JDialog implements
} }
/**
* Returns whether the unpackaging was completed successfully.
*
* @return True if unpackaging was completed successfully, false otherwise
*/
boolean isSuccess() {
if (worker == null) {
return false;
} else {
return worker.isSuccess();
}
}
@NbBundle.Messages({"UnpackagePortableCaseProgressDialog.propertyChange.success=Successfully unpacked case",}) @NbBundle.Messages({"UnpackagePortableCaseProgressDialog.propertyChange.success=Successfully unpacked case",})
@Override @Override
public void propertyChange(PropertyChangeEvent evt) { public void propertyChange(PropertyChangeEvent evt) {
@ -127,8 +140,7 @@ class UnpackagePortableCaseProgressDialog extends javax.swing.JDialog implements
@NbBundle.Messages({ @NbBundle.Messages({
"UnpackageWorker.doInBackground.errorFinding7zip=Could not locate 7-Zip executable", "UnpackageWorker.doInBackground.errorFinding7zip=Could not locate 7-Zip executable",
"UnpackageWorker.doInBackground.errorCompressingCase=Error unpackaging case", "UnpackageWorker.doInBackground.errorCompressingCase=Error unpackaging case",
"UnpackageWorker.doInBackground.canceled=Unpackaging canceled by user", "UnpackageWorker.doInBackground.canceled=Unpackaging canceled by user",})
})
@Override @Override
protected Void doInBackground() throws Exception { protected Void doInBackground() throws Exception {
@ -206,13 +218,14 @@ class UnpackagePortableCaseProgressDialog extends javax.swing.JDialog implements
/** /**
* Gets the error to display to the user * Gets the error to display to the user
*
* @return Error to be displayed in the UI * @return Error to be displayed in the UI
*/ */
private synchronized String getDisplayError() { private synchronized String getDisplayError() {
return lastError; return lastError;
} }
private boolean isSuccess() { protected boolean isSuccess() {
return success.get(); return success.get();
} }

View File

@ -1,7 +1,6 @@
DataContentViewerOtherCases.selectAllMenuItem.text=Select All
DataContentViewerOtherCases.showCaseDetailsMenuItem.text=Show Case Details DataContentViewerOtherCases.showCaseDetailsMenuItem.text=Show Case Details
DataContentViewerOtherCases.table.toolTip.text=Click column name to sort. Right-click on the table for more options. DataContentViewerOtherCases.table.toolTip.text=Click column name to sort. Right-click on the table for more options.
DataContentViewerOtherCases.exportToCSVMenuItem.text=Export Selected Rows to CSV DataContentViewerOtherCases.exportToCSVMenuItem.text=Export all Other Occurrences to CSV
DataContentViewerOtherCases.showCommonalityMenuItem.text=Show Frequency DataContentViewerOtherCases.showCommonalityMenuItem.text=Show Frequency
DataContentViewerOtherCases.earliestCaseDate.text=Earliest Case Date DataContentViewerOtherCases.earliestCaseDate.text=Earliest Case Date
DataContentViewerOtherCases.earliestCaseLabel.toolTipText= DataContentViewerOtherCases.earliestCaseLabel.toolTipText=

View File

@ -13,12 +13,11 @@ DataContentViewerOtherCases.dataSources.header.text=Data Source Name
DataContentViewerOtherCases.earliestCaseNotAvailable=\ Not Enabled. DataContentViewerOtherCases.earliestCaseNotAvailable=\ Not Enabled.
DataContentViewerOtherCases.foundIn.text=Found %d instances in %d cases and %d data sources. DataContentViewerOtherCases.foundIn.text=Found %d instances in %d cases and %d data sources.
DataContentViewerOtherCases.noOpenCase.errMsg=No open case available. DataContentViewerOtherCases.noOpenCase.errMsg=No open case available.
DataContentViewerOtherCases.selectAllMenuItem.text=Select All
DataContentViewerOtherCases.showCaseDetailsMenuItem.text=Show Case Details DataContentViewerOtherCases.showCaseDetailsMenuItem.text=Show Case Details
DataContentViewerOtherCases.table.noArtifacts=Item has no attributes with which to search. DataContentViewerOtherCases.table.noArtifacts=Item has no attributes with which to search.
DataContentViewerOtherCases.table.noResultsFound=No results found. DataContentViewerOtherCases.table.noResultsFound=No results found.
DataContentViewerOtherCases.table.toolTip.text=Click column name to sort. Right-click on the table for more options. DataContentViewerOtherCases.table.toolTip.text=Click column name to sort. Right-click on the table for more options.
DataContentViewerOtherCases.exportToCSVMenuItem.text=Export Selected Rows to CSV DataContentViewerOtherCases.exportToCSVMenuItem.text=Export all Other Occurrences to CSV
DataContentViewerOtherCases.showCommonalityMenuItem.text=Show Frequency DataContentViewerOtherCases.showCommonalityMenuItem.text=Show Frequency
DataContentViewerOtherCases.earliestCaseDate.text=Earliest Case Date DataContentViewerOtherCases.earliestCaseDate.text=Earliest Case Date
DataContentViewerOtherCases.earliestCaseLabel.toolTipText= DataContentViewerOtherCases.earliestCaseLabel.toolTipText=

View File

@ -11,13 +11,6 @@
<Property name="useNullLayout" type="boolean" value="true"/> <Property name="useNullLayout" type="boolean" value="true"/>
</Layout> </Layout>
<SubComponents> <SubComponents>
<MenuItem class="javax.swing.JMenuItem" name="selectAllMenuItem">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties" key="DataContentViewerOtherCases.selectAllMenuItem.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="exportToCSVMenuItem"> <MenuItem class="javax.swing.JMenuItem" name="exportToCSVMenuItem">
<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">

View File

@ -141,9 +141,7 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
private void customizeComponents() { private void customizeComponents() {
ActionListener actList = (ActionEvent e) -> { ActionListener actList = (ActionEvent e) -> {
JMenuItem jmi = (JMenuItem) e.getSource(); JMenuItem jmi = (JMenuItem) e.getSource();
if (jmi.equals(selectAllMenuItem)) { if (jmi.equals(showCaseDetailsMenuItem)) {
filesTable.selectAll();
} else if (jmi.equals(showCaseDetailsMenuItem)) {
showCaseDetails(filesTable.getSelectedRow()); showCaseDetails(filesTable.getSelectedRow());
} else if (jmi.equals(exportToCSVMenuItem)) { } else if (jmi.equals(exportToCSVMenuItem)) {
try { try {
@ -157,7 +155,6 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
}; };
exportToCSVMenuItem.addActionListener(actList); exportToCSVMenuItem.addActionListener(actList);
selectAllMenuItem.addActionListener(actList);
showCaseDetailsMenuItem.addActionListener(actList); showCaseDetailsMenuItem.addActionListener(actList);
showCommonalityMenuItem.addActionListener(actList); showCommonalityMenuItem.addActionListener(actList);
@ -956,7 +953,6 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
private void initComponents() { private void initComponents() {
rightClickPopupMenu = new javax.swing.JPopupMenu(); rightClickPopupMenu = new javax.swing.JPopupMenu();
selectAllMenuItem = new javax.swing.JMenuItem();
exportToCSVMenuItem = new javax.swing.JMenuItem(); exportToCSVMenuItem = new javax.swing.JMenuItem();
showCaseDetailsMenuItem = new javax.swing.JMenuItem(); showCaseDetailsMenuItem = new javax.swing.JMenuItem();
showCommonalityMenuItem = new javax.swing.JMenuItem(); showCommonalityMenuItem = new javax.swing.JMenuItem();
@ -986,9 +982,6 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
} }
}); });
org.openide.awt.Mnemonics.setLocalizedText(selectAllMenuItem, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.selectAllMenuItem.text")); // NOI18N
rightClickPopupMenu.add(selectAllMenuItem);
org.openide.awt.Mnemonics.setLocalizedText(exportToCSVMenuItem, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.exportToCSVMenuItem.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(exportToCSVMenuItem, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.exportToCSVMenuItem.text")); // NOI18N
rightClickPopupMenu.add(exportToCSVMenuItem); rightClickPopupMenu.add(exportToCSVMenuItem);
@ -1130,7 +1123,6 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
private javax.swing.JScrollPane filesTableScrollPane; private javax.swing.JScrollPane filesTableScrollPane;
private javax.swing.JLabel foundInLabel; private javax.swing.JLabel foundInLabel;
private javax.swing.JPopupMenu rightClickPopupMenu; private javax.swing.JPopupMenu rightClickPopupMenu;
private javax.swing.JMenuItem selectAllMenuItem;
private javax.swing.JMenuItem showCaseDetailsMenuItem; private javax.swing.JMenuItem showCaseDetailsMenuItem;
private javax.swing.JMenuItem showCommonalityMenuItem; private javax.swing.JMenuItem showCommonalityMenuItem;
private javax.swing.JPanel tableContainerPanel; private javax.swing.JPanel tableContainerPanel;

View File

@ -123,9 +123,9 @@ public final class InstanceCountNode extends DisplayableItemNode {
final String NO_DESCR = Bundle.InstanceCountNode_createSheet_noDescription(); final String NO_DESCR = Bundle.InstanceCountNode_createSheet_noDescription();
sheetSet.put(new NodeProperty<>(NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.nameColLbl"), NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.nameColLbl"), NO_DESCR, "")); sheetSet.put(new NodeProperty<>(NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.nameColLbl"), NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.nameColLbl"), NO_DESCR, ""));
if (UserPreferences.getHideSCOColumns() == false) {
sheetSet.put(new NodeProperty<>(NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.score.name"), NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.score.name"), NO_DESCR, "")); sheetSet.put(new NodeProperty<>(NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.score.name"), NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.score.name"), NO_DESCR, ""));
sheetSet.put(new NodeProperty<>(NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.comment.name"), NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.comment.name"), NO_DESCR, "")); sheetSet.put(new NodeProperty<>(NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.comment.name"), NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.comment.name"), NO_DESCR, ""));
if (UserPreferences.hideCentralRepoCommentsAndOccurrences() == false) {
sheetSet.put(new NodeProperty<>(NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.count.name"), NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.count.name"), NO_DESCR, "")); sheetSet.put(new NodeProperty<>(NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.count.name"), NbBundle.getMessage(AbstractAbstractFileNode.class, "AbstractAbstractFileNode.createSheet.count.name"), NO_DESCR, ""));
} }
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_instancesColLbl(), Bundle.CommonFilesSearchResultsViewerTable_instancesColLbl(), NO_DESCR, this.getInstanceCount())); sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_instancesColLbl(), Bundle.CommonFilesSearchResultsViewerTable_instancesColLbl(), NO_DESCR, this.getInstanceCount()));

View File

@ -108,7 +108,7 @@ public final class AccountsBrowser extends JPanel implements ExplorerManager.Pro
accountDeviceInstances.add(((AccountDeviceInstanceNode) node).getAccountDeviceInstance()); accountDeviceInstances.add(((AccountDeviceInstanceNode) node).getAccountDeviceInstance());
filter = ((AccountDeviceInstanceNode)node).getFilter(); filter = ((AccountDeviceInstanceNode)node).getFilter();
} }
relationshipBrowser.setSelectionInfo(new SelectionInfo(accountDeviceInstances, filter)); relationshipBrowser.setSelectionInfo(new SelectionInfo(accountDeviceInstances, new HashSet<>(), filter));
} }
}); });

View File

@ -914,23 +914,24 @@ final public class VisualizationPanel extends JPanel {
Object[] selectionCells = graph.getSelectionCells(); Object[] selectionCells = graph.getSelectionCells();
if (selectionCells.length > 0) { if (selectionCells.length > 0) {
mxICell[] selectedCells = Arrays.asList(selectionCells).toArray(new mxCell[selectionCells.length]); mxICell[] selectedCells = Arrays.asList(selectionCells).toArray(new mxCell[selectionCells.length]);
HashSet<AccountDeviceInstance> deviceInstances = new HashSet<>(); HashSet<AccountDeviceInstance> selectedNodes = new HashSet<>();
HashSet<SelectionInfo.GraphEdge> selectedEdges = new HashSet<>();
for (mxICell cell : selectedCells) { for (mxICell cell : selectedCells) {
if (cell.isEdge()) { if (cell.isEdge()) {
mxICell source = (mxICell) graph.getModel().getTerminal(cell, true); mxICell source = (mxICell) graph.getModel().getTerminal(cell, true);
mxICell target = (mxICell) graph.getModel().getTerminal(cell, false); mxICell target = (mxICell) graph.getModel().getTerminal(cell, false);
deviceInstances.add(((AccountDeviceInstanceKey) source.getValue()).getAccountDeviceInstance()); selectedEdges.add(new SelectionInfo.GraphEdge(((AccountDeviceInstanceKey) source.getValue()).getAccountDeviceInstance(),
deviceInstances.add(((AccountDeviceInstanceKey) target.getValue()).getAccountDeviceInstance()); ((AccountDeviceInstanceKey) target.getValue()).getAccountDeviceInstance()));
} else if (cell.isVertex()) { } else if (cell.isVertex()) {
deviceInstances.add(((AccountDeviceInstanceKey) cell.getValue()).getAccountDeviceInstance()); selectedNodes.add(((AccountDeviceInstanceKey) cell.getValue()).getAccountDeviceInstance());
} }
} }
relationshipBrowser.setSelectionInfo(new SelectionInfo(deviceInstances, currentFilter)); relationshipBrowser.setSelectionInfo(new SelectionInfo(selectedNodes, selectedEdges, currentFilter));
} else { } else {
relationshipBrowser.setSelectionInfo(new SelectionInfo(Collections.EMPTY_SET, currentFilter)); relationshipBrowser.setSelectionInfo(new SelectionInfo(new HashSet<>(), new HashSet<>(), currentFilter));
} }
} }
} }

View File

@ -1,13 +1,11 @@
ContactDetailsPane.nameLabel.text=Placeholder ContactDetailsPane.nameLabel.text=Placeholder
SummaryViewer.countsPanel.border.title=Counts SummaryViewer.countsPanel.border.title=Counts
SummaryViewer.emailLabel.text=Emails:
SummaryViewer.contactsLabel.text=Contacts: SummaryViewer.contactsLabel.text=Contacts:
SummaryViewer.attachmentsLabel.text=Attachments: SummaryViewer.attachmentsLabel.text=Media Attachments:
OutlineViewPanel.messageLabel.text=<Control Disabled> OutlineViewPanel.messageLabel.text=<Control Disabled>
SummaryViewer.messagesDataLabel.text=messages SummaryViewer.messagesDataLabel.text=messages
SummaryViewer.callLogsDataLabel.text=callLogs SummaryViewer.callLogsDataLabel.text=callLogs
SummaryViewer.contactsDataLabel.text=contacts SummaryViewer.contactsDataLabel.text=contacts
SummaryViewer.emailDataLabel.text=emails
SummaryViewer.attachmentsDataLabel.text=attachments SummaryViewer.attachmentsDataLabel.text=attachments
SummaryViewer.messagesLabel.text=Messages: SummaryViewer.messagesLabel.text=Messages:
SummaryViewer.callLogsLabel.text=Call Logs: SummaryViewer.callLogsLabel.text=Call Logs:

View File

@ -11,7 +11,7 @@ ContactsViewer_columnHeader_Name=Name
ContactsViewer_columnHeader_Phone=Phone ContactsViewer_columnHeader_Phone=Phone
ContactsViewer_noContacts_message=<No contacts found for selected account> ContactsViewer_noContacts_message=<No contacts found for selected account>
ContactsViewer_tabTitle=Contacts ContactsViewer_tabTitle=Contacts
MediaViewer_Name=Media MediaViewer_Name=Media Attachments
MessageNode_Node_Property_Attms=Attachments MessageNode_Node_Property_Attms=Attachments
MessageNode_Node_Property_Date=Date MessageNode_Node_Property_Date=Date
MessageNode_Node_Property_From=From MessageNode_Node_Property_From=From
@ -27,17 +27,16 @@ MessageViewer_columnHeader_To=To
MessageViewer_no_messages=<No messages found for selected account> MessageViewer_no_messages=<No messages found for selected account>
MessageViewer_tabTitle=Messages MessageViewer_tabTitle=Messages
MessageViewer_viewMessage_all=All MessageViewer_viewMessage_all=All
MessageViewer_viewMessage_calllogs=Call Logs
MessageViewer_viewMessage_selected=Selected MessageViewer_viewMessage_selected=Selected
MessageViewer_viewMessage_unthreaded=Unthreaded MessageViewer_viewMessage_unthreaded=Unthreaded
SummaryViewer.countsPanel.border.title=Counts SummaryViewer.countsPanel.border.title=Counts
SummaryViewer.emailLabel.text=Emails:
SummaryViewer.contactsLabel.text=Contacts: SummaryViewer.contactsLabel.text=Contacts:
SummaryViewer.attachmentsLabel.text=Attachments: SummaryViewer.attachmentsLabel.text=Media Attachments:
OutlineViewPanel.messageLabel.text=<Control Disabled> OutlineViewPanel.messageLabel.text=<Control Disabled>
SummaryViewer.messagesDataLabel.text=messages SummaryViewer.messagesDataLabel.text=messages
SummaryViewer.callLogsDataLabel.text=callLogs SummaryViewer.callLogsDataLabel.text=callLogs
SummaryViewer.contactsDataLabel.text=contacts SummaryViewer.contactsDataLabel.text=contacts
SummaryViewer.emailDataLabel.text=emails
SummaryViewer.attachmentsDataLabel.text=attachments SummaryViewer.attachmentsDataLabel.text=attachments
SummaryViewer.messagesLabel.text=Messages: SummaryViewer.messagesLabel.text=Messages:
SummaryViewer.callLogsLabel.text=Call Logs: SummaryViewer.callLogsLabel.text=Call Logs:

View File

@ -68,22 +68,18 @@ final class ContactsChildNodeFactory extends ChildFactory<BlackboardArtifact>{
*/ */
@Override @Override
protected boolean createKeys(List<BlackboardArtifact> list) { protected boolean createKeys(List<BlackboardArtifact> list) {
CommunicationsManager communicationManager;
try {
communicationManager = Case.getCurrentCaseThrows().getSleuthkitCase().getCommunicationsManager();
} catch (NoCurrentCaseException | TskCoreException ex) {
logger.log(Level.SEVERE, "Failed to get communications manager from case.", ex); //NON-NLS
return false;
}
if(selectionInfo == null) { if(selectionInfo == null) {
return true; return true;
} }
final Set<Content> relationshipSources; final Set<Content> relationshipSources;
try { try {
relationshipSources = communicationManager.getRelationshipSources(selectionInfo.getAccountDevicesInstances(), selectionInfo.getCommunicationsFilter()); relationshipSources = selectionInfo.getRelationshipSources();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Failed to load relationship sources.", ex); //NON-NLS
return false;
}
relationshipSources.stream().filter((content) -> (content instanceof BlackboardArtifact)).forEachOrdered((content) -> { relationshipSources.stream().filter((content) -> (content instanceof BlackboardArtifact)).forEachOrdered((content) -> {
@ -95,10 +91,6 @@ final class ContactsChildNodeFactory extends ChildFactory<BlackboardArtifact>{
} }
}); });
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Failed to get relationship sources.", ex); //NON-NLS
}
return true; return true;
} }

View File

@ -59,7 +59,7 @@ final class MediaViewer extends JPanel implements RelationshipsViewer, ExplorerM
private final ModifiableProxyLookup proxyLookup; private final ModifiableProxyLookup proxyLookup;
@Messages({ @Messages({
"MediaViewer_Name=Media" "MediaViewer_Name=Media Attachments"
}) })
/** /**
* Creates new form ThumbnailViewer * Creates new form ThumbnailViewer
@ -113,20 +113,17 @@ final class MediaViewer extends JPanel implements RelationshipsViewer, ExplorerM
@Override @Override
public void setSelectionInfo(SelectionInfo info) { public void setSelectionInfo(SelectionInfo info) {
final Set<Content> relationshipSources; Set<Content> relationshipSources;
CommunicationsManager communicationManager;
Set<BlackboardArtifact> artifactList = new HashSet<>(); Set<BlackboardArtifact> artifactList = new HashSet<>();
try { try {
communicationManager = Case.getCurrentCaseThrows().getSleuthkitCase().getCommunicationsManager(); relationshipSources = info.getRelationshipSources();
relationshipSources = communicationManager.getRelationshipSources(info.getAccountDevicesInstances(), info.getCommunicationsFilter());
relationshipSources.stream().filter((content) -> (content instanceof BlackboardArtifact)).forEachOrdered((content) -> { relationshipSources.stream().filter((content) -> (content instanceof BlackboardArtifact)).forEachOrdered((content) -> {
artifactList.add((BlackboardArtifact) content); artifactList.add((BlackboardArtifact) content);
}); });
} catch (TskCoreException | NoCurrentCaseException ex) { } catch (TskCoreException ex) {
logger.log(Level.WARNING, "Unable to update selection." , ex); logger.log(Level.WARNING, "Unable to update selection." , ex);
} }

View File

@ -48,6 +48,7 @@ import org.sleuthkit.autopsy.datamodel.BlackboardArtifactNode;
class MessageNode extends BlackboardArtifactNode { class MessageNode extends BlackboardArtifactNode {
public static final String UNTHREADED_ID = "<UNTHREADED>"; public static final String UNTHREADED_ID = "<UNTHREADED>";
public static final String CALL_LOG_ID = "<CALLLOG>";
private static final Logger logger = Logger.getLogger(MessageNode.class.getName()); private static final Logger logger = Logger.getLogger(MessageNode.class.getName());
@ -87,9 +88,14 @@ class MessageNode extends BlackboardArtifactNode {
sheetSet.put(new NodeProperty<>("Type", Bundle.MessageNode_Node_Property_Type(), "", getDisplayName())); //NON-NLS sheetSet.put(new NodeProperty<>("Type", Bundle.MessageNode_Node_Property_Type(), "", getDisplayName())); //NON-NLS
sheetSet.put(new NodeProperty<>("ThreadID", "ThreadID","",threadID == null ? UNTHREADED_ID : threadID)); //NON-NLS
final BlackboardArtifact artifact = getArtifact(); final BlackboardArtifact artifact = getArtifact();
if (artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG.getTypeID()) {
sheetSet.put(new NodeProperty<>("ThreadID", "ThreadID","",CALL_LOG_ID)); //NON-NLS
} else {
sheetSet.put(new NodeProperty<>("ThreadID", "ThreadID","",threadID == null ? UNTHREADED_ID : threadID)); //NON-NLS
}
BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID()); BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID());
if (null != fromID) { if (null != fromID) {

View File

@ -82,7 +82,8 @@ public class MessageViewer extends JPanel implements RelationshipsViewer {
"MessageViewer_no_messages=<No messages found for selected account>", "MessageViewer_no_messages=<No messages found for selected account>",
"MessageViewer_viewMessage_all=All", "MessageViewer_viewMessage_all=All",
"MessageViewer_viewMessage_selected=Selected", "MessageViewer_viewMessage_selected=Selected",
"MessageViewer_viewMessage_unthreaded=Unthreaded",}) "MessageViewer_viewMessage_unthreaded=Unthreaded",
"MessageViewer_viewMessage_calllogs=Call Logs"})
/** /**
* Creates new form MessageViewer * Creates new form MessageViewer
@ -227,9 +228,13 @@ public class MessageViewer extends JPanel implements RelationshipsViewer {
if (!subject.isEmpty()) { if (!subject.isEmpty()) {
threadNameLabel.setText(subject); threadNameLabel.setText(subject);
} else {
if (threadIDList.contains(MessageNode.CALL_LOG_ID)) {
threadNameLabel.setText(Bundle.MessageViewer_viewMessage_calllogs());
} else { } else {
threadNameLabel.setText(Bundle.MessageViewer_viewMessage_unthreaded()); threadNameLabel.setText(Bundle.MessageViewer_viewMessage_unthreaded());
} }
}
showMessagesPane(); showMessagesPane();
} }

View File

@ -70,24 +70,20 @@ public class MessagesChildNodeFactory extends ChildFactory<BlackboardArtifact>{
@Override @Override
protected boolean createKeys(List<BlackboardArtifact> list) { protected boolean createKeys(List<BlackboardArtifact> list) {
CommunicationsManager communicationManager;
try {
communicationManager = Case.getCurrentCaseThrows().getSleuthkitCase().getCommunicationsManager();
} catch (NoCurrentCaseException | TskCoreException ex) {
logger.log(Level.SEVERE, "Failed to get communications manager from case.", ex); //NON-NLS
return false;
}
if(selectionInfo == null) { if(selectionInfo == null) {
return true; return true;
} }
final Set<Content> relationshipSources; final Set<Content> relationshipSources;
try {
relationshipSources = selectionInfo.getRelationshipSources();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Failed to load relationship sources.", ex); //NON-NLS
return false;
}
try { try {
relationshipSources = communicationManager.getRelationshipSources(selectionInfo.getAccountDevicesInstances(), selectionInfo.getCommunicationsFilter());
for(Content content: relationshipSources) { for(Content content: relationshipSources) {
if( !(content instanceof BlackboardArtifact)){ if( !(content instanceof BlackboardArtifact)){
continue; continue;
@ -102,10 +98,16 @@ public class MessagesChildNodeFactory extends ChildFactory<BlackboardArtifact>{
continue; continue;
} }
// We want all artifacts that do not have "threadIDs" to appear as one thread in the UI // We want email and message artifacts that do not have "threadIDs" to appear as one thread in the UI
// To achive this assign any artifact that does not have a threadID // To achive this assign any artifact that does not have a threadID
// the "UNTHREADED_ID" // the "UNTHREADED_ID"
String artifactThreadID = MessageNode.UNTHREADED_ID; // All call logs will default to a single call logs thread
String artifactThreadID;
if (fromID == BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG) {
artifactThreadID = MessageNode.CALL_LOG_ID;
} else {
artifactThreadID = MessageNode.UNTHREADED_ID;
}
BlackboardAttribute attribute = bba.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_THREAD_ID)); BlackboardAttribute attribute = bba.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_THREAD_ID));
if(attribute != null) { if(attribute != null) {
@ -119,7 +121,7 @@ public class MessagesChildNodeFactory extends ChildFactory<BlackboardArtifact>{
} }
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Failed to get relationship sources.", ex); //NON-NLS logger.log(Level.SEVERE, "Failed to load artifacts for relationship sources.", ex); //NON-NLS
} }
return true; return true;

View File

@ -40,7 +40,8 @@ public final class SelectionInfo {
private static final Logger logger = Logger.getLogger(SelectionInfo.class.getName()); private static final Logger logger = Logger.getLogger(SelectionInfo.class.getName());
private final Set<AccountDeviceInstance> accountDeviceInstances; private final Set<AccountDeviceInstance> selectedNodes;
private final Set<GraphEdge> selectedEdges;
private final CommunicationsFilter communicationFilter; private final CommunicationsFilter communicationFilter;
private final Set<Account> accounts; private final Set<Account> accounts;
@ -50,26 +51,38 @@ public final class SelectionInfo {
/** /**
* Wraps the details of the currently selected accounts. * Wraps the details of the currently selected accounts.
* *
* @param accountDeviceInstances Selected accountDecivedInstances * @param selectedNodes Selected AccountDeviceInstances
* @param selectedEdges Selected pairs of AccountDeviceInstances
* @param communicationFilter Currently selected communications filters * @param communicationFilter Currently selected communications filters
*/ */
public SelectionInfo(Set<AccountDeviceInstance> accountDeviceInstances, CommunicationsFilter communicationFilter) { public SelectionInfo(Set<AccountDeviceInstance> selectedNodes, Set<GraphEdge> selectedEdges,
this.accountDeviceInstances = accountDeviceInstances; CommunicationsFilter communicationFilter) {
this.selectedNodes = selectedNodes;
this.selectedEdges = selectedEdges;
this.communicationFilter = communicationFilter; this.communicationFilter = communicationFilter;
accounts = new HashSet<>(); accounts = new HashSet<>();
accountDeviceInstances.forEach((instance) -> { selectedNodes.forEach((instance) -> {
accounts.add(instance.getAccount()); accounts.add(instance.getAccount());
}); });
} }
/** /**
* Returns the currently selected accountDeviceInstances * Returns the currently selected nodes
* *
* @return Set of AccountDeviceInstance * @return Set of AccountDeviceInstance
*/ */
public Set<AccountDeviceInstance> getAccountDevicesInstances() { public Set<AccountDeviceInstance> getSelectedNodes() {
return accountDeviceInstances; return selectedNodes;
}
/**
* Returns the currently selected edges
*
* @return Set of GraphEdge objects
*/
public Set<GraphEdge> getSelectedEdges() {
return selectedEdges;
} }
/** /**
@ -85,28 +98,50 @@ public final class SelectionInfo {
return accounts; return accounts;
} }
public Set<BlackboardArtifact> getArtifacts() { /**
if(accountArtifacts == null) { * Get the set of relationship sources from the case database
accountArtifacts = new HashSet<>(); *
* @return the relationship sources (may be empty)
* @throws TskCoreException
*/
Set<Content> getRelationshipSources() throws TskCoreException {
CommunicationsManager communicationManager; CommunicationsManager communicationManager;
try { try {
communicationManager = Case.getCurrentCaseThrows().getSleuthkitCase().getCommunicationsManager(); communicationManager = Case.getCurrentCaseThrows().getSleuthkitCase().getCommunicationsManager();
} catch (NoCurrentCaseException | TskCoreException ex) { } catch (NoCurrentCaseException ex) {
logger.log(Level.SEVERE, "Failed to get communications manager from case.", ex); //NON-NLS throw new TskCoreException("Failed to get current case", ex);
return null;
} }
final Set<Content> relationshipSources; Set<Content> relationshipSources = new HashSet<>();
try {
// Add all nodes
relationshipSources.addAll(communicationManager.getRelationshipSources(getSelectedNodes(), getCommunicationsFilter()));
// Add all edges. For edges, the relationship has to include both endpoints
for (SelectionInfo.GraphEdge edge : getSelectedEdges()) {
relationshipSources.addAll(communicationManager.getRelationshipSources(edge.getStartNode(),
edge.getEndNode(), getCommunicationsFilter()));
}
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Failed to get relationships from case database.", ex); //NON-NLS
}
return relationshipSources;
}
public Set<BlackboardArtifact> getArtifacts() {
if(accountArtifacts == null) {
accountArtifacts = new HashSet<>();
try { try {
relationshipSources = communicationManager.getRelationshipSources(getAccountDevicesInstances(), getCommunicationsFilter()); final Set<Content> relationshipSources = getRelationshipSources();
relationshipSources.stream().filter((content) -> (content instanceof BlackboardArtifact)).forEachOrdered((content) -> { relationshipSources.stream().filter((content) -> (content instanceof BlackboardArtifact)).forEachOrdered((content) -> {
accountArtifacts.add((BlackboardArtifact) content); accountArtifacts.add((BlackboardArtifact) content);
}); });
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Failed to get relationship sources.", ex); //NON-NLS logger.log(Level.SEVERE, "Failed to load relationship sources.", ex); //NON-NLS
return accountArtifacts;
} }
} }
@ -182,4 +217,24 @@ public final class SelectionInfo {
} }
} }
/**
* Utility class to represent an edge from the graph visualization.
*/
public static class GraphEdge {
AccountDeviceInstance startNode;
AccountDeviceInstance endNode;
public GraphEdge(AccountDeviceInstance startNode, AccountDeviceInstance endNode) {
this.startNode = startNode;
this.endNode = endNode;
}
public AccountDeviceInstance getStartNode() {
return startNode;
}
public AccountDeviceInstance getEndNode() {
return endNode;
}
}
} }

View File

@ -11,7 +11,7 @@
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,3,70,0,0,4,-35"/> <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,4,7,0,0,4,-35"/>
</AuxValues> </AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
@ -38,21 +38,19 @@
<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="attachmentsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="messagesLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="messagesLabel" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="callLogsLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="callLogsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="contactsLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="contactsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="emailLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="attachmentsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace type="separate" max="-2" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="emailDataLabel" min="-2" max="-2" attributes="0"/> <Component id="attachmentsDataLabel" min="-2" max="-2" attributes="0"/>
<Component id="contactsDataLabel" min="-2" max="-2" attributes="0"/> <Component id="contactsDataLabel" min="-2" max="-2" attributes="0"/>
<Component id="callLogsDataLabel" min="-2" max="-2" attributes="0"/> <Component id="callLogsDataLabel" min="-2" max="-2" attributes="0"/>
<Component id="messagesDataLabel" min="-2" max="-2" attributes="0"/> <Component id="messagesDataLabel" min="-2" max="-2" attributes="0"/>
<Component id="attachmentsDataLabel" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace max="32767" attributes="0"/> <EmptySpace pref="959" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -60,11 +58,6 @@
<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">
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/> <EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="attachmentsLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="attachmentsDataLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0"> <Group type="103" groupAlignment="3" attributes="0">
<Component id="messagesLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="messagesLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="messagesDataLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="messagesDataLabel" alignment="3" min="-2" max="-2" attributes="0"/>
@ -81,8 +74,8 @@
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0"> <Group type="103" groupAlignment="3" attributes="0">
<Component id="emailLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="attachmentsLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="emailDataLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="attachmentsDataLabel" alignment="3" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace max="32767" attributes="0"/> <EmptySpace max="32767" attributes="0"/>
</Group> </Group>
@ -90,13 +83,6 @@
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents> <SubComponents>
<Component class="javax.swing.JLabel" name="emailLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/relationships/Bundle.properties" key="SummaryViewer.emailLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="contactsLabel"> <Component class="javax.swing.JLabel" name="contactsLabel">
<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">
@ -153,13 +139,6 @@
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="emailDataLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/communications/relationships/Bundle.properties" key="SummaryViewer.emailDataLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
</SubComponents> </SubComponents>
</Container> </Container>
<Component class="org.sleuthkit.autopsy.communications.relationships.OutlineViewPanel" name="fileReferencesPanel"> <Component class="org.sleuthkit.autopsy.communications.relationships.OutlineViewPanel" name="fileReferencesPanel">

View File

@ -47,8 +47,7 @@ public class SummaryViewer extends javax.swing.JPanel implements RelationshipsVi
"SummaryViewer_CaseRefNameColumn_Title=Case Name", "SummaryViewer_CaseRefNameColumn_Title=Case Name",
"SummaryViewer_CentralRepository_Message=<Enable Central Resposity to see Other Occurrences>", "SummaryViewer_CentralRepository_Message=<Enable Central Resposity to see Other Occurrences>",
"SummaryViewer_Creation_Date_Title=Creation Date", "SummaryViewer_Creation_Date_Title=Creation Date",
"SummeryViewer_FileRef_Message=<Select one Accout to see File References>", "SummeryViewer_FileRef_Message=<Select one Accout to see File References>",})
})
/** /**
* Creates new form SummaryViewer * Creates new form SummaryViewer
@ -108,8 +107,7 @@ public class SummaryViewer extends javax.swing.JPanel implements RelationshipsVi
attachmentsDataLabel.setText(Integer.toString(summaryDetails.getAttachmentCnt())); attachmentsDataLabel.setText(Integer.toString(summaryDetails.getAttachmentCnt()));
callLogsDataLabel.setText(Integer.toString(summaryDetails.getCallLogCnt())); callLogsDataLabel.setText(Integer.toString(summaryDetails.getCallLogCnt()));
contactsDataLabel.setText(Integer.toString(summaryDetails.getContactsCnt())); contactsDataLabel.setText(Integer.toString(summaryDetails.getContactsCnt()));
emailDataLabel.setText(Integer.toString(summaryDetails.getEmailCnt())); messagesDataLabel.setText(Integer.toString(summaryDetails.getMessagesCnt() + summaryDetails.getEmailCnt()));
messagesDataLabel.setText(Integer.toString(summaryDetails.getMessagesCnt()));
fileReferencesPanel.showOutlineView(); fileReferencesPanel.showOutlineView();
@ -136,7 +134,6 @@ public class SummaryViewer extends javax.swing.JPanel implements RelationshipsVi
attachmentsLabel.setEnabled(enabled); attachmentsLabel.setEnabled(enabled);
callLogsLabel.setEnabled(enabled); callLogsLabel.setEnabled(enabled);
contactsLabel.setEnabled(enabled); contactsLabel.setEnabled(enabled);
emailLabel.setEnabled(enabled);
messagesLabel.setEnabled(enabled); messagesLabel.setEnabled(enabled);
caseReferencesPanel.setEnabled(enabled); caseReferencesPanel.setEnabled(enabled);
fileReferencesPanel.setEnabled(enabled); fileReferencesPanel.setEnabled(enabled);
@ -150,7 +147,6 @@ public class SummaryViewer extends javax.swing.JPanel implements RelationshipsVi
attachmentsDataLabel.setText(""); attachmentsDataLabel.setText("");
callLogsDataLabel.setText(""); callLogsDataLabel.setText("");
contactsDataLabel.setText(""); contactsDataLabel.setText("");
emailDataLabel.setText("");
messagesDataLabel.setText(""); messagesDataLabel.setText("");
fileReferencesPanel.setNode(new AbstractNode(Children.LEAF)); fileReferencesPanel.setNode(new AbstractNode(Children.LEAF));
@ -188,7 +184,6 @@ public class SummaryViewer extends javax.swing.JPanel implements RelationshipsVi
java.awt.GridBagConstraints gridBagConstraints; java.awt.GridBagConstraints gridBagConstraints;
countsPanel = new javax.swing.JPanel(); countsPanel = new javax.swing.JPanel();
emailLabel = new javax.swing.JLabel();
contactsLabel = new javax.swing.JLabel(); contactsLabel = new javax.swing.JLabel();
messagesLabel = new javax.swing.JLabel(); messagesLabel = new javax.swing.JLabel();
callLogsLabel = new javax.swing.JLabel(); callLogsLabel = new javax.swing.JLabel();
@ -197,7 +192,6 @@ public class SummaryViewer extends javax.swing.JPanel implements RelationshipsVi
messagesDataLabel = new javax.swing.JLabel(); messagesDataLabel = new javax.swing.JLabel();
callLogsDataLabel = new javax.swing.JLabel(); callLogsDataLabel = new javax.swing.JLabel();
contactsDataLabel = new javax.swing.JLabel(); contactsDataLabel = new javax.swing.JLabel();
emailDataLabel = new javax.swing.JLabel();
fileReferencesPanel = new org.sleuthkit.autopsy.communications.relationships.OutlineViewPanel(); fileReferencesPanel = new org.sleuthkit.autopsy.communications.relationships.OutlineViewPanel();
caseReferencesPanel = new org.sleuthkit.autopsy.communications.relationships.OutlineViewPanel(); caseReferencesPanel = new org.sleuthkit.autopsy.communications.relationships.OutlineViewPanel();
@ -205,8 +199,6 @@ public class SummaryViewer extends javax.swing.JPanel implements RelationshipsVi
countsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(SummaryViewer.class, "SummaryViewer.countsPanel.border.title"))); // NOI18N countsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(SummaryViewer.class, "SummaryViewer.countsPanel.border.title"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(emailLabel, org.openide.util.NbBundle.getMessage(SummaryViewer.class, "SummaryViewer.emailLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(contactsLabel, org.openide.util.NbBundle.getMessage(SummaryViewer.class, "SummaryViewer.contactsLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(contactsLabel, org.openide.util.NbBundle.getMessage(SummaryViewer.class, "SummaryViewer.contactsLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(messagesLabel, org.openide.util.NbBundle.getMessage(SummaryViewer.class, "SummaryViewer.messagesLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(messagesLabel, org.openide.util.NbBundle.getMessage(SummaryViewer.class, "SummaryViewer.messagesLabel.text")); // NOI18N
@ -223,8 +215,6 @@ public class SummaryViewer extends javax.swing.JPanel implements RelationshipsVi
org.openide.awt.Mnemonics.setLocalizedText(contactsDataLabel, org.openide.util.NbBundle.getMessage(SummaryViewer.class, "SummaryViewer.contactsDataLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(contactsDataLabel, org.openide.util.NbBundle.getMessage(SummaryViewer.class, "SummaryViewer.contactsDataLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(emailDataLabel, org.openide.util.NbBundle.getMessage(SummaryViewer.class, "SummaryViewer.emailDataLabel.text")); // NOI18N
javax.swing.GroupLayout countsPanelLayout = new javax.swing.GroupLayout(countsPanel); javax.swing.GroupLayout countsPanelLayout = new javax.swing.GroupLayout(countsPanel);
countsPanel.setLayout(countsPanelLayout); countsPanel.setLayout(countsPanelLayout);
countsPanelLayout.setHorizontalGroup( countsPanelLayout.setHorizontalGroup(
@ -232,28 +222,22 @@ public class SummaryViewer extends javax.swing.JPanel implements RelationshipsVi
.addGroup(countsPanelLayout.createSequentialGroup() .addGroup(countsPanelLayout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addGroup(countsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(countsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(attachmentsLabel)
.addComponent(messagesLabel) .addComponent(messagesLabel)
.addComponent(callLogsLabel) .addComponent(callLogsLabel)
.addComponent(contactsLabel) .addComponent(contactsLabel)
.addComponent(emailLabel)) .addComponent(attachmentsLabel))
.addGap(18, 18, 18) .addGap(18, 18, 18)
.addGroup(countsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(countsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(emailDataLabel) .addComponent(attachmentsDataLabel)
.addComponent(contactsDataLabel) .addComponent(contactsDataLabel)
.addComponent(callLogsDataLabel) .addComponent(callLogsDataLabel)
.addComponent(messagesDataLabel) .addComponent(messagesDataLabel))
.addComponent(attachmentsDataLabel)) .addContainerGap(959, Short.MAX_VALUE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
); );
countsPanelLayout.setVerticalGroup( countsPanelLayout.setVerticalGroup(
countsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) countsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(countsPanelLayout.createSequentialGroup() .addGroup(countsPanelLayout.createSequentialGroup()
.addGap(7, 7, 7) .addGap(7, 7, 7)
.addGroup(countsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(attachmentsLabel)
.addComponent(attachmentsDataLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(countsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addGroup(countsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(messagesLabel) .addComponent(messagesLabel)
.addComponent(messagesDataLabel)) .addComponent(messagesDataLabel))
@ -267,8 +251,8 @@ public class SummaryViewer extends javax.swing.JPanel implements RelationshipsVi
.addComponent(contactsDataLabel)) .addComponent(contactsDataLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(countsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addGroup(countsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(emailLabel) .addComponent(attachmentsLabel)
.addComponent(emailDataLabel)) .addComponent(attachmentsDataLabel))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
); );
@ -311,8 +295,6 @@ public class SummaryViewer extends javax.swing.JPanel implements RelationshipsVi
private javax.swing.JLabel contactsDataLabel; private javax.swing.JLabel contactsDataLabel;
private javax.swing.JLabel contactsLabel; private javax.swing.JLabel contactsLabel;
private javax.swing.JPanel countsPanel; private javax.swing.JPanel countsPanel;
private javax.swing.JLabel emailDataLabel;
private javax.swing.JLabel emailLabel;
private org.sleuthkit.autopsy.communications.relationships.OutlineViewPanel fileReferencesPanel; private org.sleuthkit.autopsy.communications.relationships.OutlineViewPanel fileReferencesPanel;
private javax.swing.JLabel messagesDataLabel; private javax.swing.JLabel messagesDataLabel;
private javax.swing.JLabel messagesLabel; private javax.swing.JLabel messagesLabel;

View File

@ -83,26 +83,16 @@ final class ThreadChildNodeFactory extends ChildFactory<BlackboardArtifact> {
*/ */
@Override @Override
protected boolean createKeys(List<BlackboardArtifact> list) { protected boolean createKeys(List<BlackboardArtifact> list) {
CommunicationsManager communicationManager;
try {
communicationManager = Case.getCurrentCaseThrows().getSleuthkitCase().getCommunicationsManager();
} catch (NoCurrentCaseException | TskCoreException ex) {
logger.log(Level.SEVERE, "Failed to get communications manager from case.", ex); //NON-NLS
return false;
}
if(selectionInfo == null) { if(selectionInfo == null) {
return true; return true;
} }
final Set<Content> relationshipSources;
try { try {
relationshipSources = communicationManager.getRelationshipSources(selectionInfo.getAccountDevicesInstances(), selectionInfo.getCommunicationsFilter()); final Set<Content> relationshipSources = selectionInfo.getRelationshipSources();
createRootMessageKeys(list, relationshipSources) ; createRootMessageKeys(list, relationshipSources) ;
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Failed to get relationship sources.", ex); //NON-NLS logger.log(Level.SEVERE, "Failed to load relationship sources.", ex); //NON-NLS
return false;
} }
return true; return true;
@ -133,10 +123,16 @@ final class ThreadChildNodeFactory extends ChildFactory<BlackboardArtifact> {
|| fromID == BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG || fromID == BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG
|| fromID == BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE) { || fromID == BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE) {
// We want all artifacts that do not have "threadIDs" to appear as one thread in the UI // We want email and message artifacts that do not have "threadIDs" to appear as one thread in the UI
// To achive this assign any artifact that does not have a threadID // To achive this assign any artifact that does not have a threadID
// the "UNTHREADED_ID" // the "UNTHREADED_ID"
String threadID = MessageNode.UNTHREADED_ID; // All call logs will default to a single call logs thread
String threadID;
if (fromID == BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG) {
threadID = MessageNode.CALL_LOG_ID;
} else {
threadID = MessageNode.UNTHREADED_ID;
}
BlackboardAttribute attribute = bba.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_THREAD_ID)); BlackboardAttribute attribute = bba.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_THREAD_ID));
if(attribute != null) { if(attribute != null) {
@ -179,14 +175,47 @@ final class ThreadChildNodeFactory extends ChildFactory<BlackboardArtifact> {
if (attribute != null) { if (attribute != null) {
return new ThreadNode(bba, attribute.getValueString(), preferredAction); return new ThreadNode(bba, attribute.getValueString(), preferredAction);
} else {
if (bba.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG.getTypeID()) {
return new CallLogNode();
} else { } else {
// Only one of these should occur. // Only one of these should occur.
return new UnthreadedNode(); return new UnthreadedNode();
} }
} }
}
/** /**
* An this node represents the "unthreaded" thread. * This node represents the "call log" thread.
*/
final class CallLogNode extends AbstractNode {
/**
* Construct an instance of a CallLogNode.
*/
CallLogNode() {
super(Children.LEAF);
setDisplayName("Call Logs");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/communications/images/unthreaded.png" );
}
@Override
protected Sheet createSheet() {
Sheet sheet = super.createSheet();
Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
if (sheetSet == null) {
sheetSet = Sheet.createPropertiesSet();
sheet.put(sheetSet);
}
// Give this node a threadID of "CALL_LOG_ID"
sheetSet.put(new NodeProperty<>("ThreadID", "ThreadID","",MessageNode.CALL_LOG_ID));
return sheet;
}
}
/**
* This node represents the "unthreaded" thread.
*/ */
final class UnthreadedNode extends AbstractNode { final class UnthreadedNode extends AbstractNode {
/** /**

View File

@ -25,7 +25,7 @@ import org.openide.nodes.Sheet;
import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardArtifact;
/** /**
* An AbstractNode subclass which wraps a MessagNode object. Doing this allows * An AbstractNode subclass which wraps a MessageNode object. Doing this allows
* for the reuse of the createSheet and other function from MessageNode, but * for the reuse of the createSheet and other function from MessageNode, but
* also some customizing of how a ThreadNode is shown. * also some customizing of how a ThreadNode is shown.
*/ */

View File

@ -42,11 +42,15 @@ MediaFileViewer.toolTip=Displays supported multimedia files (images, videos, aud
MediaPlayerPanel.noSupport=File not supported. MediaPlayerPanel.noSupport=File not supported.
MediaPlayerPanel.timeFormat=%02d:%02d:%02d MediaPlayerPanel.timeFormat=%02d:%02d:%02d
MediaPlayerPanel.unknownTime=Unknown MediaPlayerPanel.unknownTime=Unknown
MediaViewImagePanel.createTagOption=Create
MediaViewImagePanel.deleteTagOption=Delete
MediaViewImagePanel.errorLabel.OOMText=Could not load file into Media View: insufficent memory. MediaViewImagePanel.errorLabel.OOMText=Could not load file into Media View: insufficent memory.
MediaViewImagePanel.errorLabel.text=Could not load file into Media View. MediaViewImagePanel.errorLabel.text=Could not load file into Media View.
MediaViewImagePanel.exportSaveText=Save MediaViewImagePanel.exportSaveText=Save
MediaViewImagePanel.exportTagOption=Export
MediaViewImagePanel.externalViewerButton.text=Open in External Viewer Ctrl+E MediaViewImagePanel.externalViewerButton.text=Open in External Viewer Ctrl+E
MediaViewImagePanel.fileChooserTitle=Choose a save location MediaViewImagePanel.fileChooserTitle=Choose a save location
MediaViewImagePanel.hideTagOption=Hide
MediaViewImagePanel.successfulExport=Tagged image was successfully saved. MediaViewImagePanel.successfulExport=Tagged image was successfully saved.
MediaViewImagePanel.unsuccessfulExport=Unable to export tagged image to disk. MediaViewImagePanel.unsuccessfulExport=Unable to export tagged image to disk.
MediaViewVideoPanel.pauseButton.text=\u25ba MediaViewVideoPanel.pauseButton.text=\u25ba

View File

@ -83,8 +83,10 @@ import org.sleuthkit.autopsy.contentviewers.imagetagging.ImageTagRegion;
import org.sleuthkit.autopsy.contentviewers.imagetagging.ImageTagCreator; import org.sleuthkit.autopsy.contentviewers.imagetagging.ImageTagCreator;
import org.sleuthkit.autopsy.contentviewers.imagetagging.ImageTag; import org.sleuthkit.autopsy.contentviewers.imagetagging.ImageTag;
import org.sleuthkit.autopsy.contentviewers.imagetagging.ImageTagsGroup; import org.sleuthkit.autopsy.contentviewers.imagetagging.ImageTagsGroup;
import org.sleuthkit.autopsy.corelibs.OpenCvLoader;
import org.sleuthkit.autopsy.coreutils.ImageUtils; import org.sleuthkit.autopsy.coreutils.ImageUtils;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
import org.sleuthkit.autopsy.datamodel.FileNode; import org.sleuthkit.autopsy.datamodel.FileNode;
import org.sleuthkit.autopsy.directorytree.ExternalViewerAction; import org.sleuthkit.autopsy.directorytree.ExternalViewerAction;
import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.AbstractFile;
@ -116,7 +118,7 @@ class MediaViewImagePanel extends JPanel implements MediaFileViewer.MediaViewPan
private final ProgressBar progressBar = new ProgressBar(); private final ProgressBar progressBar = new ProgressBar();
private final MaskerPane maskerPane = new MaskerPane(); private final MaskerPane maskerPane = new MaskerPane();
private final JPopupMenu popupMenu = new JPopupMenu(); private final JPopupMenu imageTaggingOptions = new JPopupMenu();
private final JMenuItem createTagMenuItem; private final JMenuItem createTagMenuItem;
private final JMenuItem deleteTagMenuItem; private final JMenuItem deleteTagMenuItem;
private final JMenuItem hideTagsMenuItem; private final JMenuItem hideTagsMenuItem;
@ -158,6 +160,12 @@ class MediaViewImagePanel extends JPanel implements MediaFileViewer.MediaViewPan
/** /**
* Creates new form MediaViewImagePanel * Creates new form MediaViewImagePanel
*/ */
@NbBundle.Messages({
"MediaViewImagePanel.createTagOption=Create",
"MediaViewImagePanel.deleteTagOption=Delete",
"MediaViewImagePanel.hideTagOption=Hide",
"MediaViewImagePanel.exportTagOption=Export"
})
public MediaViewImagePanel() { public MediaViewImagePanel() {
initComponents(); initComponents();
fxInited = org.sleuthkit.autopsy.core.Installer.isJavaFxInited(); fxInited = org.sleuthkit.autopsy.core.Installer.isJavaFxInited();
@ -166,29 +174,35 @@ class MediaViewImagePanel extends JPanel implements MediaFileViewer.MediaViewPan
exportChooser.setDialogTitle(Bundle.MediaViewImagePanel_fileChooserTitle()); exportChooser.setDialogTitle(Bundle.MediaViewImagePanel_fileChooserTitle());
//Build popupMenu when Tags Menu button is pressed. //Build popupMenu when Tags Menu button is pressed.
createTagMenuItem = new JMenuItem("Create"); createTagMenuItem = new JMenuItem(Bundle.MediaViewImagePanel_createTagOption());
createTagMenuItem.addActionListener((event) -> createTag()); createTagMenuItem.addActionListener((event) -> createTag());
popupMenu.add(createTagMenuItem); imageTaggingOptions.add(createTagMenuItem);
popupMenu.add(new JSeparator()); imageTaggingOptions.add(new JSeparator());
deleteTagMenuItem = new JMenuItem("Delete"); deleteTagMenuItem = new JMenuItem(Bundle.MediaViewImagePanel_deleteTagOption());
deleteTagMenuItem.addActionListener((event) -> deleteTag()); deleteTagMenuItem.addActionListener((event) -> deleteTag());
popupMenu.add(deleteTagMenuItem); imageTaggingOptions.add(deleteTagMenuItem);
popupMenu.add(new JSeparator()); imageTaggingOptions.add(new JSeparator());
hideTagsMenuItem = new JMenuItem("Hide"); hideTagsMenuItem = new JMenuItem(Bundle.MediaViewImagePanel_hideTagOption());
hideTagsMenuItem.addActionListener((event) -> showOrHideTags()); hideTagsMenuItem.addActionListener((event) -> showOrHideTags());
popupMenu.add(hideTagsMenuItem); imageTaggingOptions.add(hideTagsMenuItem);
popupMenu.add(new JSeparator()); imageTaggingOptions.add(new JSeparator());
exportTagsMenuItem = new JMenuItem("Export"); exportTagsMenuItem = new JMenuItem(Bundle.MediaViewImagePanel_exportTagOption());
exportTagsMenuItem.addActionListener((event) -> exportTags()); exportTagsMenuItem.addActionListener((event) -> exportTags());
popupMenu.add(exportTagsMenuItem); imageTaggingOptions.add(exportTagsMenuItem);
popupMenu.setPopupSize(300, 150); imageTaggingOptions.setPopupSize(300, 150);
//Disable image tagging for non-windows users or upon failure to load OpenCV.
if (!PlatformUtil.isWindowsOS() || !OpenCvLoader.hasOpenCvLoaded()) {
tagsMenu.setEnabled(false);
imageTaggingOptions.setEnabled(false);
}
if (fxInited) { if (fxInited) {
Platform.runLater(new Runnable() { Platform.runLater(new Runnable() {
@ -893,7 +907,9 @@ class MediaViewImagePanel extends JPanel implements MediaFileViewer.MediaViewPan
} }
private void tagsMenuMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tagsMenuMousePressed private void tagsMenuMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tagsMenuMousePressed
popupMenu.show(tagsMenu, -300 + tagsMenu.getWidth(), tagsMenu.getHeight() + 3); if (imageTaggingOptions.isEnabled()) {
imageTaggingOptions.show(tagsMenu, -300 + tagsMenu.getWidth(), tagsMenu.getHeight() + 3);
}
}//GEN-LAST:event_tagsMenuMousePressed }//GEN-LAST:event_tagsMenuMousePressed
/** /**

View File

@ -73,7 +73,7 @@ public final class UserPreferences {
private static final int LOG_FILE_NUM_INT = 10; private static final int LOG_FILE_NUM_INT = 10;
public static final String GROUP_ITEMS_IN_TREE_BY_DATASOURCE = "GroupItemsInTreeByDataSource"; //NON-NLS public static final String GROUP_ITEMS_IN_TREE_BY_DATASOURCE = "GroupItemsInTreeByDataSource"; //NON-NLS
public static final String SHOW_ONLY_CURRENT_USER_TAGS = "ShowOnlyCurrentUserTags"; public static final String SHOW_ONLY_CURRENT_USER_TAGS = "ShowOnlyCurrentUserTags";
public static final String HIDE_CENTRAL_REPO_COMMENTS_AND_OCCURRENCES = "HideCentralRepoCommentsAndOccurrences"; public static final String HIDE_SCO_COLUMNS = "HideCentralRepoCommentsAndOccurrences"; //The key for this setting pre-dates the settings current functionality //NON-NLS
public static final String DISPLAY_TRANSLATED_NAMES = "DisplayTranslatedNames"; public static final String DISPLAY_TRANSLATED_NAMES = "DisplayTranslatedNames";
public static final String EXTERNAL_HEX_EDITOR_PATH = "ExternalHexEditorPath"; public static final String EXTERNAL_HEX_EDITOR_PATH = "ExternalHexEditorPath";
public static final String SOLR_MAX_JVM_SIZE = "SolrMaxJVMSize"; public static final String SOLR_MAX_JVM_SIZE = "SolrMaxJVMSize";
@ -224,7 +224,6 @@ public final class UserPreferences {
return preferences.getBoolean(SHOW_ONLY_CURRENT_USER_TAGS, false); return preferences.getBoolean(SHOW_ONLY_CURRENT_USER_TAGS, false);
} }
/** /**
* Set the user preference which identifies whether tags should be shown for * Set the user preference which identifies whether tags should be shown for
* only the current user or all users. * only the current user or all users.
@ -236,27 +235,25 @@ public final class UserPreferences {
} }
/** /**
* Get the user preference which identifies whether the Central Repository * Get the user preference which identifies whether the (S)core, (C)omments,
* should be called to get comments and occurrences for the (C)omments and * and (O)ccurrences columns should be populated and displayed in the result
* (O)ccurrences columns in the result view. * view.
* *
* @return True if hiding Central Repository data for comments and * @return True if hiding SCO columns; otherwise false.
* occurrences; otherwise false.
*/ */
public static boolean hideCentralRepoCommentsAndOccurrences() { public static boolean getHideSCOColumns() {
return preferences.getBoolean(HIDE_CENTRAL_REPO_COMMENTS_AND_OCCURRENCES, false); return preferences.getBoolean(HIDE_SCO_COLUMNS, false);
} }
/** /**
* Set the user preference which identifies whether the Central Repository * Set the user preference which identifies whether the (S)core, (C)omments,
* should be called to get comments and occurrences for the (C)omments and * and (O)ccurrences columns should be populated and displayed in the result
* (O)ccurrences columns in the result view. * view.
* *
* @param value The value of which to assign to the user preference. * @param value The value of which to assign to the user preference.
*/ */
public static void setHideCentralRepoCommentsAndOccurrences(boolean value) { public static void setHideSCOColumns(boolean value) {
preferences.putBoolean(HIDE_CENTRAL_REPO_COMMENTS_AND_OCCURRENCES, value); preferences.putBoolean(HIDE_SCO_COLUMNS, value);
} }
public static void setDisplayTranslatedFileNames(boolean value) { public static void setDisplayTranslatedFileNames(boolean value) {
@ -337,11 +334,11 @@ public final class UserPreferences {
preferences.putInt(INDEXING_SERVER_PORT, port); preferences.putInt(INDEXING_SERVER_PORT, port);
} }
public static void setTextTranslatorName(String textTranslatorName){ public static void setTextTranslatorName(String textTranslatorName) {
preferences.put(TEXT_TRANSLATOR_NAME, textTranslatorName); preferences.put(TEXT_TRANSLATOR_NAME, textTranslatorName);
} }
public static String getTextTranslatorName(){ public static String getTextTranslatorName() {
return preferences.get(TEXT_TRANSLATOR_NAME, null); return preferences.get(TEXT_TRANSLATOR_NAME, null);
} }

View File

@ -153,10 +153,7 @@ ViewPreferencesPanel.currentSessionSettingsPanel.border.title=Current Session Se
ViewPreferencesPanel.hideRejectedResultsCheckbox.text=Hide rejected results ViewPreferencesPanel.hideRejectedResultsCheckbox.text=Hide rejected results
ViewPreferencesPanel.selectFileLabel.text=When selecting a file: ViewPreferencesPanel.selectFileLabel.text=When selecting a file:
ViewPreferencesPanel.globalSettingsPanel.border.title=Global Settings ViewPreferencesPanel.globalSettingsPanel.border.title=Global Settings
ViewPreferencesPanel.commentsOccurencesColumnWrapAroundText.text=to reduce loading times
ViewPreferencesPanel.translateTextLabel.text=Translate text: ViewPreferencesPanel.translateTextLabel.text=Translate text:
ViewPreferencesPanel.commentsOccurencesColumnsCheckbox.text=C(omments) and O(ccurences) columns
ViewPreferencesPanel.centralRepoLabel.text=Do not use Central Repository for:
ViewPreferencesPanel.hideOtherUsersTagsLabel.text=Hide other users' tags in the: ViewPreferencesPanel.hideOtherUsersTagsLabel.text=Hide other users' tags in the:
ViewPreferencesPanel.hideOtherUsersTagsCheckbox.text=Tags area in the tree ViewPreferencesPanel.hideOtherUsersTagsCheckbox.text=Tags area in the tree
ViewPreferencesPanel.useAnotherTimeRadioButton.text=Use another time zone ViewPreferencesPanel.useAnotherTimeRadioButton.text=Use another time zone
@ -218,3 +215,6 @@ DataResultViewerTable.pageLabel.text=Page:
ViewPreferencesPanel.maxResultsLabel.text=Maximum number of Results to show in table: ViewPreferencesPanel.maxResultsLabel.text=Maximum number of Results to show in table:
ViewPreferencesPanel.maxResultsLabel.toolTipText=<html>\nSetting this value to 0 will display all results in the results table.\n<br>Note that setting this value to 0 may result in poor UI responsiveness when there are large numbers of results.\n</html> ViewPreferencesPanel.maxResultsLabel.toolTipText=<html>\nSetting this value to 0 will display all results in the results table.\n<br>Note that setting this value to 0 may result in poor UI responsiveness when there are large numbers of results.\n</html>
DataResultViewerTable.exportCSVButton.text=Save table as CSV DataResultViewerTable.exportCSVButton.text=Save table as CSV
ViewPreferencesPanel.scoColumnsCheckbox.text=S(core), C(omments), and O(ccurrences)
ViewPreferencesPanel.scoColumnsWrapAroundText.text=to reduce loading times
ViewPreferencesPanel.scoColumnsLabel.text=Do not add columns for:

View File

@ -207,10 +207,7 @@ ViewPreferencesPanel.currentSessionSettingsPanel.border.title=Current Session Se
ViewPreferencesPanel.hideRejectedResultsCheckbox.text=Hide rejected results ViewPreferencesPanel.hideRejectedResultsCheckbox.text=Hide rejected results
ViewPreferencesPanel.selectFileLabel.text=When selecting a file: ViewPreferencesPanel.selectFileLabel.text=When selecting a file:
ViewPreferencesPanel.globalSettingsPanel.border.title=Global Settings ViewPreferencesPanel.globalSettingsPanel.border.title=Global Settings
ViewPreferencesPanel.commentsOccurencesColumnWrapAroundText.text=to reduce loading times
ViewPreferencesPanel.translateTextLabel.text=Translate text: ViewPreferencesPanel.translateTextLabel.text=Translate text:
ViewPreferencesPanel.commentsOccurencesColumnsCheckbox.text=C(omments) and O(ccurences) columns
ViewPreferencesPanel.centralRepoLabel.text=Do not use Central Repository for:
ViewPreferencesPanel.hideOtherUsersTagsLabel.text=Hide other users' tags in the: ViewPreferencesPanel.hideOtherUsersTagsLabel.text=Hide other users' tags in the:
ViewPreferencesPanel.hideOtherUsersTagsCheckbox.text=Tags area in the tree ViewPreferencesPanel.hideOtherUsersTagsCheckbox.text=Tags area in the tree
ViewPreferencesPanel.useAnotherTimeRadioButton.text=Use another time zone ViewPreferencesPanel.useAnotherTimeRadioButton.text=Use another time zone
@ -272,3 +269,6 @@ DataResultViewerTable.pageLabel.text=Page:
ViewPreferencesPanel.maxResultsLabel.text=Maximum number of Results to show in table: ViewPreferencesPanel.maxResultsLabel.text=Maximum number of Results to show in table:
ViewPreferencesPanel.maxResultsLabel.toolTipText=<html>\nSetting this value to 0 will display all results in the results table.\n<br>Note that setting this value to 0 may result in poor UI responsiveness when there are large numbers of results.\n</html> ViewPreferencesPanel.maxResultsLabel.toolTipText=<html>\nSetting this value to 0 will display all results in the results table.\n<br>Note that setting this value to 0 may result in poor UI responsiveness when there are large numbers of results.\n</html>
DataResultViewerTable.exportCSVButton.text=Save table as CSV DataResultViewerTable.exportCSVButton.text=Save table as CSV
ViewPreferencesPanel.scoColumnsCheckbox.text=S(core), C(omments), and O(ccurrences)
ViewPreferencesPanel.scoColumnsWrapAroundText.text=to reduce loading times
ViewPreferencesPanel.scoColumnsLabel.text=Do not add columns for:

View File

@ -100,7 +100,7 @@
<Component id="hideOtherUsersTagsCheckbox" min="-2" max="-2" attributes="0"/> <Component id="hideOtherUsersTagsCheckbox" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Component id="centralRepoLabel" min="-2" max="-2" attributes="0"/> <Component id="scoColumnsLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="135" max="-2" attributes="0"/> <EmptySpace min="-2" pref="135" max="-2" attributes="0"/>
<Component id="jScrollPane1" min="-2" pref="272" max="-2" attributes="0"/> <Component id="jScrollPane1" min="-2" pref="272" max="-2" attributes="0"/>
</Group> </Group>
@ -129,11 +129,11 @@
</Group> </Group>
<Group type="102" attributes="0"> <Group type="102" attributes="0">
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/> <EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
<Component id="commentsOccurencesColumnsCheckbox" min="-2" max="-2" attributes="0"/> <Component id="scoColumnsCheckbox" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="32" max="-2" attributes="0"/> <EmptySpace min="-2" pref="32" max="-2" attributes="0"/>
<Component id="commentsOccurencesColumnWrapAroundText" min="-2" max="-2" attributes="0"/> <Component id="scoColumnsWrapAroundText" min="-2" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
<EmptySpace type="separate" max="-2" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/>
@ -185,11 +185,11 @@
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="hideOtherUsersTagsCheckbox" min="-2" max="-2" attributes="0"/> <Component id="hideOtherUsersTagsCheckbox" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="centralRepoLabel" min="-2" max="-2" attributes="0"/> <Component id="scoColumnsLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/> <EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
<Component id="commentsOccurencesColumnsCheckbox" min="-2" pref="18" max="-2" attributes="0"/> <Component id="scoColumnsCheckbox" min="-2" pref="18" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="commentsOccurencesColumnWrapAroundText" min="-2" max="-2" attributes="0"/> <Component id="scoColumnsWrapAroundText" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Component id="selectFileLabel" min="-2" max="-2" attributes="0"/> <Component id="selectFileLabel" min="-2" max="-2" attributes="0"/>
@ -353,22 +353,22 @@
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="centralRepoLabel"> <Component class="javax.swing.JLabel" name="scoColumnsLabel">
<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">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="ViewPreferencesPanel.centralRepoLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="ViewPreferencesPanel.scoColumnsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JCheckBox" name="commentsOccurencesColumnsCheckbox"> <Component class="javax.swing.JCheckBox" name="scoColumnsCheckbox">
<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">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="ViewPreferencesPanel.commentsOccurencesColumnsCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="ViewPreferencesPanel.scoColumnsCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="horizontalAlignment" type="int" value="11"/> <Property name="horizontalAlignment" type="int" value="11"/>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="commentsOccurencesColumnsCheckboxActionPerformed"/> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scoColumnsCheckboxActionPerformed"/>
</Events> </Events>
</Component> </Component>
<Container class="javax.swing.JScrollPane" name="jScrollPane1"> <Container class="javax.swing.JScrollPane" name="jScrollPane1">
@ -400,10 +400,10 @@
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="commentsOccurencesColumnWrapAroundText"> <Component class="javax.swing.JLabel" name="scoColumnsWrapAroundText">
<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">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="ViewPreferencesPanel.commentsOccurencesColumnWrapAroundText.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="ViewPreferencesPanel.scoColumnsWrapAroundText.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
</Properties> </Properties>
</Component> </Component>

View File

@ -80,9 +80,7 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
dataSourcesHideSlackCheckbox.setSelected(UserPreferences.hideSlackFilesInDataSourcesTree()); dataSourcesHideSlackCheckbox.setSelected(UserPreferences.hideSlackFilesInDataSourcesTree());
viewsHideSlackCheckbox.setSelected(UserPreferences.hideSlackFilesInViewsTree()); viewsHideSlackCheckbox.setSelected(UserPreferences.hideSlackFilesInViewsTree());
commentsOccurencesColumnsCheckbox.setEnabled(EamDb.isEnabled()); scoColumnsCheckbox.setSelected(UserPreferences.getHideSCOColumns());
commentsOccurencesColumnWrapAroundText.setEnabled(EamDb.isEnabled());
commentsOccurencesColumnsCheckbox.setSelected(UserPreferences.hideCentralRepoCommentsAndOccurrences());
hideOtherUsersTagsCheckbox.setSelected(UserPreferences.showOnlyCurrentUserTags()); hideOtherUsersTagsCheckbox.setSelected(UserPreferences.showOnlyCurrentUserTags());
fileNameTranslationColumnCheckbox.setSelected(UserPreferences.displayTranslatedFileNames()); fileNameTranslationColumnCheckbox.setSelected(UserPreferences.displayTranslatedFileNames());
@ -119,7 +117,7 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
UserPreferences.setHideSlackFilesInDataSourcesTree(dataSourcesHideSlackCheckbox.isSelected()); UserPreferences.setHideSlackFilesInDataSourcesTree(dataSourcesHideSlackCheckbox.isSelected());
UserPreferences.setHideSlackFilesInViewsTree(viewsHideSlackCheckbox.isSelected()); UserPreferences.setHideSlackFilesInViewsTree(viewsHideSlackCheckbox.isSelected());
UserPreferences.setShowOnlyCurrentUserTags(hideOtherUsersTagsCheckbox.isSelected()); UserPreferences.setShowOnlyCurrentUserTags(hideOtherUsersTagsCheckbox.isSelected());
UserPreferences.setHideCentralRepoCommentsAndOccurrences(commentsOccurencesColumnsCheckbox.isSelected()); UserPreferences.setHideSCOColumns(scoColumnsCheckbox.isSelected());
UserPreferences.setDisplayTranslatedFileNames(fileNameTranslationColumnCheckbox.isSelected()); UserPreferences.setDisplayTranslatedFileNames(fileNameTranslationColumnCheckbox.isSelected());
UserPreferences.setResultsTablePageSize((int)maxResultsSpinner.getValue()); UserPreferences.setResultsTablePageSize((int)maxResultsSpinner.getValue());
@ -168,12 +166,12 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
useAnotherTimeRadioButton = new javax.swing.JRadioButton(); useAnotherTimeRadioButton = new javax.swing.JRadioButton();
hideOtherUsersTagsCheckbox = new javax.swing.JCheckBox(); hideOtherUsersTagsCheckbox = new javax.swing.JCheckBox();
hideOtherUsersTagsLabel = new javax.swing.JLabel(); hideOtherUsersTagsLabel = new javax.swing.JLabel();
centralRepoLabel = new javax.swing.JLabel(); scoColumnsLabel = new javax.swing.JLabel();
commentsOccurencesColumnsCheckbox = new javax.swing.JCheckBox(); scoColumnsCheckbox = new javax.swing.JCheckBox();
jScrollPane1 = new javax.swing.JScrollPane(); jScrollPane1 = new javax.swing.JScrollPane();
timeZoneList = new javax.swing.JList<>(); timeZoneList = new javax.swing.JList<>();
translateTextLabel = new javax.swing.JLabel(); translateTextLabel = new javax.swing.JLabel();
commentsOccurencesColumnWrapAroundText = new javax.swing.JLabel(); scoColumnsWrapAroundText = new javax.swing.JLabel();
fileNameTranslationColumnCheckbox = new javax.swing.JCheckBox(); fileNameTranslationColumnCheckbox = new javax.swing.JCheckBox();
maxResultsLabel = new javax.swing.JLabel(); maxResultsLabel = new javax.swing.JLabel();
maxResultsSpinner = new javax.swing.JSpinner(); maxResultsSpinner = new javax.swing.JSpinner();
@ -266,13 +264,13 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
org.openide.awt.Mnemonics.setLocalizedText(hideOtherUsersTagsLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.hideOtherUsersTagsLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(hideOtherUsersTagsLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.hideOtherUsersTagsLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(centralRepoLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.centralRepoLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(scoColumnsLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.scoColumnsLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(commentsOccurencesColumnsCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.commentsOccurencesColumnsCheckbox.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(scoColumnsCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.scoColumnsCheckbox.text")); // NOI18N
commentsOccurencesColumnsCheckbox.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); scoColumnsCheckbox.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
commentsOccurencesColumnsCheckbox.addActionListener(new java.awt.event.ActionListener() { scoColumnsCheckbox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
commentsOccurencesColumnsCheckboxActionPerformed(evt); scoColumnsCheckboxActionPerformed(evt);
} }
}); });
@ -285,7 +283,7 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
org.openide.awt.Mnemonics.setLocalizedText(translateTextLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.translateTextLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(translateTextLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.translateTextLabel.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(commentsOccurencesColumnWrapAroundText, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.commentsOccurencesColumnWrapAroundText.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(scoColumnsWrapAroundText, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.scoColumnsWrapAroundText.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(fileNameTranslationColumnCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.fileNameTranslationColumnCheckbox.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(fileNameTranslationColumnCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.fileNameTranslationColumnCheckbox.text")); // NOI18N
fileNameTranslationColumnCheckbox.addActionListener(new java.awt.event.ActionListener() { fileNameTranslationColumnCheckbox.addActionListener(new java.awt.event.ActionListener() {
@ -315,7 +313,7 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
.addGap(10, 10, 10) .addGap(10, 10, 10)
.addComponent(hideOtherUsersTagsCheckbox)) .addComponent(hideOtherUsersTagsCheckbox))
.addGroup(globalSettingsPanelLayout.createSequentialGroup() .addGroup(globalSettingsPanelLayout.createSequentialGroup()
.addComponent(centralRepoLabel) .addComponent(scoColumnsLabel)
.addGap(135, 135, 135) .addGap(135, 135, 135)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 272, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 272, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(hideOtherUsersTagsLabel) .addComponent(hideOtherUsersTagsLabel)
@ -337,10 +335,10 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
.addComponent(viewsHideKnownCheckbox)))) .addComponent(viewsHideKnownCheckbox))))
.addGroup(globalSettingsPanelLayout.createSequentialGroup() .addGroup(globalSettingsPanelLayout.createSequentialGroup()
.addGap(10, 10, 10) .addGap(10, 10, 10)
.addComponent(commentsOccurencesColumnsCheckbox)) .addComponent(scoColumnsCheckbox))
.addGroup(globalSettingsPanelLayout.createSequentialGroup() .addGroup(globalSettingsPanelLayout.createSequentialGroup()
.addGap(32, 32, 32) .addGap(32, 32, 32)
.addComponent(commentsOccurencesColumnWrapAroundText))) .addComponent(scoColumnsWrapAroundText)))
.addGap(18, 18, 18) .addGap(18, 18, 18)
.addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(displayTimeLabel) .addComponent(displayTimeLabel)
@ -382,11 +380,11 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(hideOtherUsersTagsCheckbox) .addComponent(hideOtherUsersTagsCheckbox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(centralRepoLabel) .addComponent(scoColumnsLabel)
.addGap(3, 3, 3) .addGap(3, 3, 3)
.addComponent(commentsOccurencesColumnsCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(scoColumnsCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(commentsOccurencesColumnWrapAroundText)) .addComponent(scoColumnsWrapAroundText))
.addGroup(globalSettingsPanelLayout.createSequentialGroup() .addGroup(globalSettingsPanelLayout.createSequentialGroup()
.addComponent(selectFileLabel) .addComponent(selectFileLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
@ -523,13 +521,13 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
} }
}//GEN-LAST:event_timeZoneListValueChanged }//GEN-LAST:event_timeZoneListValueChanged
private void commentsOccurencesColumnsCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_commentsOccurencesColumnsCheckboxActionPerformed private void scoColumnsCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_scoColumnsCheckboxActionPerformed
if (immediateUpdates) { if (immediateUpdates) {
UserPreferences.setHideCentralRepoCommentsAndOccurrences(commentsOccurencesColumnsCheckbox.isSelected()); UserPreferences.setHideSCOColumns(scoColumnsCheckbox.isSelected());
} else { } else {
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
} }
}//GEN-LAST:event_commentsOccurencesColumnsCheckboxActionPerformed }//GEN-LAST:event_scoColumnsCheckboxActionPerformed
private void hideOtherUsersTagsCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hideOtherUsersTagsCheckboxActionPerformed private void hideOtherUsersTagsCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hideOtherUsersTagsCheckboxActionPerformed
if (immediateUpdates) { if (immediateUpdates) {
@ -631,9 +629,6 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel centralRepoLabel;
private javax.swing.JLabel commentsOccurencesColumnWrapAroundText;
private javax.swing.JCheckBox commentsOccurencesColumnsCheckbox;
private javax.swing.JPanel currentCaseSettingsPanel; private javax.swing.JPanel currentCaseSettingsPanel;
private javax.swing.JPanel currentSessionSettingsPanel; private javax.swing.JPanel currentSessionSettingsPanel;
private javax.swing.JCheckBox dataSourcesHideKnownCheckbox; private javax.swing.JCheckBox dataSourcesHideKnownCheckbox;
@ -651,6 +646,9 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
private javax.swing.JRadioButton keepCurrentViewerRadioButton; private javax.swing.JRadioButton keepCurrentViewerRadioButton;
private javax.swing.JLabel maxResultsLabel; private javax.swing.JLabel maxResultsLabel;
private javax.swing.JSpinner maxResultsSpinner; private javax.swing.JSpinner maxResultsSpinner;
private javax.swing.JCheckBox scoColumnsCheckbox;
private javax.swing.JLabel scoColumnsLabel;
private javax.swing.JLabel scoColumnsWrapAroundText;
private javax.swing.JLabel selectFileLabel; private javax.swing.JLabel selectFileLabel;
private javax.swing.JList<String> timeZoneList; private javax.swing.JList<String> timeZoneList;
private javax.swing.JLabel translateTextLabel; private javax.swing.JLabel translateTextLabel;

View File

@ -22,7 +22,6 @@
package org.sleuthkit.autopsy.coreutils; package org.sleuthkit.autopsy.coreutils;
import com.google.common.collect.ImmutableSortedSet; import com.google.common.collect.ImmutableSortedSet;
import com.google.common.io.Files;
import java.awt.Image; import java.awt.Image;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
@ -122,7 +121,7 @@ public class ImageUtils {
} }
DEFAULT_THUMBNAIL = tempImage; DEFAULT_THUMBNAIL = tempImage;
boolean tempFfmpegLoaded = false; boolean tempFfmpegLoaded = false;
if (OpenCvLoader.isOpenCvLoaded()) { if (OpenCvLoader.hasOpenCvLoaded()) {
try { try {
if (System.getProperty("os.arch").equals("amd64") || System.getProperty("os.arch").equals("x86_64")) { //NON-NLS if (System.getProperty("os.arch").equals("amd64") || System.getProperty("os.arch").equals("x86_64")) { //NON-NLS
System.loadLibrary("opencv_ffmpeg248_64"); //NON-NLS System.loadLibrary("opencv_ffmpeg248_64"); //NON-NLS

View File

@ -199,7 +199,7 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
//Set the tooltip //Set the tooltip
this.setShortDescription(content.getName()); this.setShortDescription(content.getName());
updateSheet(new NodeProperty<>(ORIGINAL_NAME.toString(), ORIGINAL_NAME.toString(), NO_DESCR, content.getName())); updateSheet(new NodeProperty<>(ORIGINAL_NAME.toString(), ORIGINAL_NAME.toString(), NO_DESCR, content.getName()));
} else if (eventType.equals(NodeSpecificEvents.SCO_AVAILABLE.toString())) { } else if (eventType.equals(NodeSpecificEvents.SCO_AVAILABLE.toString()) && !UserPreferences.getHideSCOColumns()) {
SCOData scoData = (SCOData) evt.getNewValue(); SCOData scoData = (SCOData) evt.getNewValue();
if (scoData.getScoreAndDescription() != null) { if (scoData.getScoreAndDescription() != null) {
updateSheet(new NodeProperty<>(SCORE.toString(), SCORE.toString(), scoData.getScoreAndDescription().getRight(), scoData.getScoreAndDescription().getLeft())); updateSheet(new NodeProperty<>(SCORE.toString(), SCORE.toString(), scoData.getScoreAndDescription().getRight(), scoData.getScoreAndDescription().getLeft()));
@ -207,8 +207,7 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
if (scoData.getComment() != null) { if (scoData.getComment() != null) {
updateSheet(new NodeProperty<>(COMMENT.toString(), COMMENT.toString(), NO_DESCR, scoData.getComment())); updateSheet(new NodeProperty<>(COMMENT.toString(), COMMENT.toString(), NO_DESCR, scoData.getComment()));
} }
if (scoData.getCountAndDescription() != null if (scoData.getCountAndDescription() != null) {
&& !UserPreferences.hideCentralRepoCommentsAndOccurrences()) {
updateSheet(new NodeProperty<>(OCCURRENCES.toString(), OCCURRENCES.toString(), scoData.getCountAndDescription().getRight(), scoData.getCountAndDescription().getLeft())); updateSheet(new NodeProperty<>(OCCURRENCES.toString(), OCCURRENCES.toString(), scoData.getCountAndDescription().getRight(), scoData.getCountAndDescription().getLeft()));
} }
} }
@ -325,11 +324,13 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
} }
// Create place holders for S C O // Create place holders for S C O
if (!UserPreferences.getHideSCOColumns()) {
properties.add(new NodeProperty<>(SCORE.toString(), SCORE.toString(), VALUE_LOADING, "")); properties.add(new NodeProperty<>(SCORE.toString(), SCORE.toString(), VALUE_LOADING, ""));
properties.add(new NodeProperty<>(COMMENT.toString(), COMMENT.toString(), VALUE_LOADING, "")); properties.add(new NodeProperty<>(COMMENT.toString(), COMMENT.toString(), VALUE_LOADING, ""));
if (EamDb.isEnabled() && UserPreferences.hideCentralRepoCommentsAndOccurrences() == false) { if (EamDb.isEnabled()) {
properties.add(new NodeProperty<>(OCCURRENCES.toString(), OCCURRENCES.toString(), VALUE_LOADING, "")); properties.add(new NodeProperty<>(OCCURRENCES.toString(), OCCURRENCES.toString(), VALUE_LOADING, ""));
} }
}
// Get the SCO columns data in a background task // Get the SCO columns data in a background task
backgroundTasksPool.submit(new GetSCOTask( backgroundTasksPool.submit(new GetSCOTask(
@ -393,10 +394,11 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
@NbBundle.Messages({ @NbBundle.Messages({
"AbstractAbstractFileNode.createSheet.count.displayName=O", "AbstractAbstractFileNode.createSheet.count.displayName=O",
"AbstractAbstractFileNode.createSheet.count.hashLookupNotRun.description=Hash lookup had not been run on this file when the column was populated", "AbstractAbstractFileNode.createSheet.count.hashLookupNotRun.description=Hash lookup had not been run on this file when the column was populated",
"# {0} - occurenceCount", "# {0} - occurrenceCount",
"AbstractAbstractFileNode.createSheet.count.description=There were {0} datasource(s) found with occurences of the MD5 correlation value"}) "AbstractAbstractFileNode.createSheet.count.description=There were {0} datasource(s) found with occurrences of the MD5 correlation value"})
@Override @Override
protected Pair<Long, String> getCountPropertyAndDescription(CorrelationAttributeInstance.Type attributeType, String attributeValue, String defaultDescription) { protected Pair<Long, String> getCountPropertyAndDescription(CorrelationAttributeInstance.Type attributeType, String attributeValue,
String defaultDescription) {
Long count = -1L; //The column renderer will not display negative values, negative value used when count unavailble to preserve sorting Long count = -1L; //The column renderer will not display negative values, negative value used when count unavailble to preserve sorting
String description = defaultDescription; String description = defaultDescription;
try { try {
@ -535,7 +537,7 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
@Override @Override
protected CorrelationAttributeInstance getCorrelationAttributeInstance() { protected CorrelationAttributeInstance getCorrelationAttributeInstance() {
CorrelationAttributeInstance attribute = null; CorrelationAttributeInstance attribute = null;
if (EamDb.isEnabled() && !UserPreferences.hideCentralRepoCommentsAndOccurrences()) { if (EamDb.isEnabled() && !UserPreferences.getHideSCOColumns()) {
attribute = EamArtifactUtil.getInstanceFromContent(content); attribute = EamArtifactUtil.getInstanceFromContent(content);
} }
return attribute; return attribute;

View File

@ -152,7 +152,7 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
removeListeners(); removeListeners();
contentCache.invalidateAll(); contentCache.invalidateAll();
} }
} else if (eventType.equals(NodeSpecificEvents.SCO_AVAILABLE.toString())) { } else if (eventType.equals(NodeSpecificEvents.SCO_AVAILABLE.toString()) && !UserPreferences.getHideSCOColumns()) {
SCOData scoData = (SCOData) evt.getNewValue(); SCOData scoData = (SCOData) evt.getNewValue();
if (scoData.getScoreAndDescription() != null) { if (scoData.getScoreAndDescription() != null) {
updateSheet(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_score_name(), Bundle.BlackboardArtifactNode_createSheet_score_displayName(), scoData.getScoreAndDescription().getRight(), scoData.getScoreAndDescription().getLeft())); updateSheet(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_score_name(), Bundle.BlackboardArtifactNode_createSheet_score_displayName(), scoData.getScoreAndDescription().getRight(), scoData.getScoreAndDescription().getLeft()));
@ -160,8 +160,7 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
if (scoData.getComment() != null) { if (scoData.getComment() != null) {
updateSheet(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_comment_name(), Bundle.BlackboardArtifactNode_createSheet_comment_displayName(), NO_DESCR, scoData.getComment())); updateSheet(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_comment_name(), Bundle.BlackboardArtifactNode_createSheet_comment_displayName(), NO_DESCR, scoData.getComment()));
} }
if (scoData.getCountAndDescription() != null if (scoData.getCountAndDescription() != null) {
&& !UserPreferences.hideCentralRepoCommentsAndOccurrences()) {
updateSheet(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_count_name(), Bundle.BlackboardArtifactNode_createSheet_count_displayName(), scoData.getCountAndDescription().getRight(), scoData.getCountAndDescription().getLeft())); updateSheet(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_count_name(), Bundle.BlackboardArtifactNode_createSheet_count_displayName(), scoData.getCountAndDescription().getRight(), scoData.getCountAndDescription().getLeft()));
} }
} }
@ -364,11 +363,13 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
this.getSourceName())); this.getSourceName()));
// Create place holders for S C O // Create place holders for S C O
if (!UserPreferences.getHideSCOColumns()) {
sheetSet.put(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_score_name(), Bundle.BlackboardArtifactNode_createSheet_score_displayName(), VALUE_LOADING, "")); sheetSet.put(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_score_name(), Bundle.BlackboardArtifactNode_createSheet_score_displayName(), VALUE_LOADING, ""));
sheetSet.put(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_comment_name(), Bundle.BlackboardArtifactNode_createSheet_comment_displayName(), VALUE_LOADING, "")); sheetSet.put(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_comment_name(), Bundle.BlackboardArtifactNode_createSheet_comment_displayName(), VALUE_LOADING, ""));
if (EamDb.isEnabled() && UserPreferences.hideCentralRepoCommentsAndOccurrences() == false) { if (EamDb.isEnabled()) {
sheetSet.put(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_count_name(), Bundle.BlackboardArtifactNode_createSheet_count_displayName(), VALUE_LOADING, "")); sheetSet.put(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_count_name(), Bundle.BlackboardArtifactNode_createSheet_count_displayName(), VALUE_LOADING, ""));
} }
}
// Get the SCO columns data in a background task // Get the SCO columns data in a background task
backgroundTasksPool.submit(new GetSCOTask( backgroundTasksPool.submit(new GetSCOTask(
@ -747,7 +748,7 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
"BlackboardArtifactNode.createSheet.count.displayName=O", "BlackboardArtifactNode.createSheet.count.displayName=O",
"BlackboardArtifactNode.createSheet.count.noCorrelationAttributes.description=No correlation properties found", "BlackboardArtifactNode.createSheet.count.noCorrelationAttributes.description=No correlation properties found",
"BlackboardArtifactNode.createSheet.count.noCorrelationValues.description=Unable to find other occurrences because no value exists for the available correlation property", "BlackboardArtifactNode.createSheet.count.noCorrelationValues.description=Unable to find other occurrences because no value exists for the available correlation property",
"# {0} - occurenceCount", "# {0} - occurrenceCount",
"# {1} - attributeType", "# {1} - attributeType",
"BlackboardArtifactNode.createSheet.count.description=There were {0} datasource(s) found with occurrences of the correlation value of type {1}"}) "BlackboardArtifactNode.createSheet.count.description=There were {0} datasource(s) found with occurrences of the correlation value of type {1}"})
@Deprecated @Deprecated

View File

@ -4,8 +4,8 @@ AbstractAbstractFileNode.changeTimeColLbl=Change Time
AbstractAbstractFileNode.createdTimeColLbl=Created Time AbstractAbstractFileNode.createdTimeColLbl=Created Time
AbstractAbstractFileNode.createSheet.comment.displayName=C AbstractAbstractFileNode.createSheet.comment.displayName=C
AbstractAbstractFileNode.createSheet.comment.name=C AbstractAbstractFileNode.createSheet.comment.name=C
# {0} - occurenceCount # {0} - occurrenceCount
AbstractAbstractFileNode.createSheet.count.description=There were {0} datasource(s) found with occurences of the MD5 correlation value AbstractAbstractFileNode.createSheet.count.description=There were {0} datasource(s) found with occurrences of the MD5 correlation value
AbstractAbstractFileNode.createSheet.count.displayName=O AbstractAbstractFileNode.createSheet.count.displayName=O
AbstractAbstractFileNode.createSheet.count.hashLookupNotRun.description=Hash lookup had not been run on this file when the column was populated AbstractAbstractFileNode.createSheet.count.hashLookupNotRun.description=Hash lookup had not been run on this file when the column was populated
AbstractAbstractFileNode.createSheet.count.name=O AbstractAbstractFileNode.createSheet.count.name=O
@ -53,7 +53,7 @@ BlackboardArtifactNode.createSheet.artifactType.displayName=Result Type
BlackboardArtifactNode.createSheet.artifactType.name=Result Type BlackboardArtifactNode.createSheet.artifactType.name=Result Type
BlackboardArtifactNode.createSheet.comment.displayName=C BlackboardArtifactNode.createSheet.comment.displayName=C
BlackboardArtifactNode.createSheet.comment.name=C BlackboardArtifactNode.createSheet.comment.name=C
# {0} - occurenceCount # {0} - occurrenceCount
# {1} - attributeType # {1} - attributeType
BlackboardArtifactNode.createSheet.count.description=There were {0} datasource(s) found with occurrences of the correlation value of type {1} BlackboardArtifactNode.createSheet.count.description=There were {0} datasource(s) found with occurrences of the correlation value of type {1}
BlackboardArtifactNode.createSheet.count.displayName=O BlackboardArtifactNode.createSheet.count.displayName=O

View File

@ -72,7 +72,7 @@ class GetSCOTask implements Runnable {
scoData.setScoreAndDescription(contentNode.getScorePropertyAndDescription(tags)); scoData.setScoreAndDescription(contentNode.getScorePropertyAndDescription(tags));
scoData.setComment(contentNode.getCommentProperty(tags, fileAttribute)); scoData.setComment(contentNode.getCommentProperty(tags, fileAttribute));
if (EamDb.isEnabled() && !UserPreferences.hideCentralRepoCommentsAndOccurrences()) { if (EamDb.isEnabled() && !UserPreferences.getHideSCOColumns()) {
Type type = null; Type type = null;
String value = null; String value = null;
String description = Bundle.GetSCOTask_occurrences_defaultDescription(); String description = Bundle.GetSCOTask_occurrences_defaultDescription();

View File

@ -219,7 +219,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
case UserPreferences.TIME_ZONE_FOR_DISPLAYS: case UserPreferences.TIME_ZONE_FOR_DISPLAYS:
case UserPreferences.HIDE_KNOWN_FILES_IN_DATA_SRCS_TREE: case UserPreferences.HIDE_KNOWN_FILES_IN_DATA_SRCS_TREE:
case UserPreferences.HIDE_SLACK_FILES_IN_DATA_SRCS_TREE: case UserPreferences.HIDE_SLACK_FILES_IN_DATA_SRCS_TREE:
case UserPreferences.HIDE_CENTRAL_REPO_COMMENTS_AND_OCCURRENCES: case UserPreferences.HIDE_SCO_COLUMNS:
case UserPreferences.DISPLAY_TRANSLATED_NAMES: case UserPreferences.DISPLAY_TRANSLATED_NAMES:
case UserPreferences.KEEP_PREFERRED_VIEWER: case UserPreferences.KEEP_PREFERRED_VIEWER:
refreshContentTreeSafe(); refreshContentTreeSafe();

View File

@ -51,7 +51,7 @@ ConfigVisualPanel3.errorMsg.cannotFindLogicalImager=Cannot locate logical imager
ConfigVisualPanel3.failedToSaveConfigMsg=Failed to save configuration file: {0} ConfigVisualPanel3.failedToSaveConfigMsg=Failed to save configuration file: {0}
ConfigVisualPanel3.failedToSaveExeMsg=Failed to save tsk_logical_imager.exe file ConfigVisualPanel3.failedToSaveExeMsg=Failed to save tsk_logical_imager.exe file
# {0} - reason # {0} - reason
ConfigVisualPanel3.reason=\nReason: ConfigVisualPanel3.reason=\nReason: {0}
ConfigVisualPanel3.saveConfigurationFile=Save imager ConfigVisualPanel3.saveConfigurationFile=Save imager
CreateLogicalImagerAction.title=Create Logical Imager CreateLogicalImagerAction.title=Create Logical Imager
CTL_CreateLogicalImagerAction=Create Logical Imager CTL_CreateLogicalImagerAction=Create Logical Imager

View File

@ -91,7 +91,7 @@ class ConfigVisualPanel3 extends javax.swing.JPanel {
"# {0} - configFilename", "# {0} - configFilename",
"ConfigVisualPanel3.failedToSaveConfigMsg=Failed to save configuration file: {0}", "ConfigVisualPanel3.failedToSaveConfigMsg=Failed to save configuration file: {0}",
"# {0} - reason", "# {0} - reason",
"ConfigVisualPanel3.reason=\nReason: ", "ConfigVisualPanel3.reason=\nReason: {0}",
"ConfigVisualPanel3.failedToSaveExeMsg=Failed to save tsk_logical_imager.exe file" "ConfigVisualPanel3.failedToSaveExeMsg=Failed to save tsk_logical_imager.exe file"
}) })
void saveConfigFile() { void saveConfigFile() {
@ -112,8 +112,8 @@ class ConfigVisualPanel3 extends javax.swing.JPanel {
configStatusLabel.setText(Bundle.ConfigVisualPanel3_copyStatus_saved()); configStatusLabel.setText(Bundle.ConfigVisualPanel3_copyStatus_saved());
} catch (IOException ex) { } catch (IOException ex) {
saveSuccess = false; saveSuccess = false;
executableStatusLabel.setText(Bundle.ConfigVisualPanel3_copyStatus_error()); configStatusLabel.setText(Bundle.ConfigVisualPanel3_copyStatus_error());
executableStatusLabel.setForeground(Color.RED); configStatusLabel.setForeground(Color.RED);
JOptionPane.showMessageDialog(this, Bundle.ConfigVisualPanel3_failedToSaveConfigMsg(configFilename) JOptionPane.showMessageDialog(this, Bundle.ConfigVisualPanel3_failedToSaveConfigMsg(configFilename)
+ Bundle.ConfigVisualPanel3_reason(ex.getMessage())); + Bundle.ConfigVisualPanel3_reason(ex.getMessage()));
} catch (JsonIOException jioe) { } catch (JsonIOException jioe) {

View File

@ -258,11 +258,9 @@ CreatePortableCasePanel.outputFolderTextField.text=jTextField1
CreatePortableCasePanel.chooseOutputFolderButton.text=Choose folder CreatePortableCasePanel.chooseOutputFolderButton.text=Choose folder
CreatePortableCasePanel.jLabel1.text=Export files tagged as: CreatePortableCasePanel.jLabel1.text=Export files tagged as:
CreatePortableCasePanel.jLabel2.text=Select output folder: CreatePortableCasePanel.jLabel2.text=Select output folder:
CreatePortableCasePanel.compressCheckbox.text=Compress case
CreatePortableCasePanel.chunkSizeLabel.text=Split into chunks of size:
CreatePortableCasePanel.errorLabel.text_1=Windows only CreatePortableCasePanel.errorLabel.text_1=Windows only
ReportWizardPortableCaseOptionsVisualPanel.errorLabel.text=Windows only ReportWizardPortableCaseOptionsVisualPanel.errorLabel.text=Windows only
ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text=Package case into chunks of size: ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text=Package case into an archive:
PortableCaseTagsListPanel.deselectButton.text=Deselect All PortableCaseTagsListPanel.deselectButton.text=Deselect All
PortableCaseTagsListPanel.selectButton.text=Select All PortableCaseTagsListPanel.selectButton.text=Select All
PortableCaseInterestingItemsListPanel.selectButton.text=Select All PortableCaseInterestingItemsListPanel.selectButton.text=Select All
@ -271,3 +269,4 @@ ReportFileTextConfigurationPanel.tabDelimitedButton.text=Tab delimited
ReportFileTextConfigurationPanel.commaDelimitedButton.text=Comma delimited ReportFileTextConfigurationPanel.commaDelimitedButton.text=Comma delimited
PortableCaseTagsListPanel.descLabel.text=Include the following tags: PortableCaseTagsListPanel.descLabel.text=Include the following tags:
PortableCaseInterestingItemsListPanel.descLabel.text=Include Interesting Items from these sets: PortableCaseInterestingItemsListPanel.descLabel.text=Include Interesting Items from these sets:
ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.toolTipText=

View File

@ -318,11 +318,9 @@ CreatePortableCasePanel.outputFolderTextField.text=jTextField1
CreatePortableCasePanel.chooseOutputFolderButton.text=Choose folder CreatePortableCasePanel.chooseOutputFolderButton.text=Choose folder
CreatePortableCasePanel.jLabel1.text=Export files tagged as: CreatePortableCasePanel.jLabel1.text=Export files tagged as:
CreatePortableCasePanel.jLabel2.text=Select output folder: CreatePortableCasePanel.jLabel2.text=Select output folder:
CreatePortableCasePanel.compressCheckbox.text=Compress case
CreatePortableCasePanel.chunkSizeLabel.text=Split into chunks of size:
CreatePortableCasePanel.errorLabel.text_1=Windows only CreatePortableCasePanel.errorLabel.text_1=Windows only
ReportWizardPortableCaseOptionsVisualPanel.errorLabel.text=Windows only ReportWizardPortableCaseOptionsVisualPanel.errorLabel.text=Windows only
ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text=Package case into chunks of size: ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text=Package case into an archive:
PortableCaseTagsListPanel.deselectButton.text=Deselect All PortableCaseTagsListPanel.deselectButton.text=Deselect All
PortableCaseTagsListPanel.selectButton.text=Select All PortableCaseTagsListPanel.selectButton.text=Select All
PortableCaseInterestingItemsListPanel.selectButton.text=Select All PortableCaseInterestingItemsListPanel.selectButton.text=Select All
@ -331,5 +329,6 @@ ReportFileTextConfigurationPanel.tabDelimitedButton.text=Tab delimited
ReportFileTextConfigurationPanel.commaDelimitedButton.text=Comma delimited ReportFileTextConfigurationPanel.commaDelimitedButton.text=Comma delimited
PortableCaseTagsListPanel.descLabel.text=Include the following tags: PortableCaseTagsListPanel.descLabel.text=Include the following tags:
PortableCaseInterestingItemsListPanel.descLabel.text=Include Interesting Items from these sets: PortableCaseInterestingItemsListPanel.descLabel.text=Include Interesting Items from these sets:
ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.toolTipText=
ReportWizardPortableCaseOptionsVisualPanel.getName.title=Choose Portable Case settings ReportWizardPortableCaseOptionsVisualPanel.getName.title=Choose Portable Case settings
TableReportGenerator.StatusColumn.Header=Review Status TableReportGenerator.StatusColumn.Header=Review Status

View File

@ -983,7 +983,7 @@ class PortableCaseReportModule implements ReportModule {
enum ChunkSize { enum ChunkSize {
NONE("Do not split", ""), // NON-NLS NONE("Do not split", ""), // NON-NLS
DVD("4.5 GB (DVD)", "4500m"); // NON-NLS DVD("Split into 4.5 GB chunks (DVD)", "4500m"); // NON-NLS
private final String displayName; private final String displayName;
private final String sevenZipParam; private final String sevenZipParam;

View File

@ -41,10 +41,10 @@
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="compressCheckbox" min="-2" max="-2" attributes="0"/> <Component id="compressCheckbox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="chunkSizeComboBox" min="-2" pref="99" max="-2" attributes="0"/> <Component id="chunkSizeComboBox" min="-2" pref="187" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="errorLabel" min="-2" max="-2" attributes="0"/> <Component id="errorLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="97" max="32767" attributes="0"/> <EmptySpace pref="41" max="32767" attributes="0"/>
</Group> </Group>
<Component id="listPanel" alignment="1" max="32767" attributes="0"/> <Component id="listPanel" alignment="1" max="32767" attributes="0"/>
</Group> </Group>
@ -78,6 +78,9 @@
<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">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="compressCheckboxActionPerformed"/> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="compressCheckboxActionPerformed"/>

View File

@ -119,6 +119,7 @@ class ReportWizardPortableCaseOptionsVisualPanel extends javax.swing.JPanel {
}); });
org.openide.awt.Mnemonics.setLocalizedText(compressCheckbox, org.openide.util.NbBundle.getMessage(ReportWizardPortableCaseOptionsVisualPanel.class, "ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(compressCheckbox, org.openide.util.NbBundle.getMessage(ReportWizardPortableCaseOptionsVisualPanel.class, "ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.text")); // NOI18N
compressCheckbox.setToolTipText(org.openide.util.NbBundle.getMessage(ReportWizardPortableCaseOptionsVisualPanel.class, "ReportWizardPortableCaseOptionsVisualPanel.compressCheckbox.toolTipText")); // NOI18N
compressCheckbox.addActionListener(new java.awt.event.ActionListener() { compressCheckbox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
compressCheckboxActionPerformed(evt); compressCheckboxActionPerformed(evt);
@ -147,10 +148,10 @@ class ReportWizardPortableCaseOptionsVisualPanel extends javax.swing.JPanel {
.addContainerGap() .addContainerGap()
.addComponent(compressCheckbox) .addComponent(compressCheckbox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(chunkSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(chunkSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(errorLabel) .addComponent(errorLabel)
.addContainerGap(97, Short.MAX_VALUE)) .addContainerGap(41, Short.MAX_VALUE))
.addComponent(listPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(listPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
); );
jPanel1Layout.setVerticalGroup( jPanel1Layout.setVerticalGroup(

View File

@ -1,7 +1,7 @@
/* /*
* Autopsy Forensic Browser * Autopsy Forensic Browser
* *
* Copyright 2018 Basis Technology Corp. * Copyright 2018-2019 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org * Contact: carrier <at> sleuthkit <dot> org
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
@ -18,35 +18,44 @@
*/ */
package org.sleuthkit.autopsy.corelibs; package org.sleuthkit.autopsy.corelibs;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.opencv.core.Core; import org.opencv.core.Core;
public final class OpenCvLoader { public final class OpenCvLoader {
private static final boolean OPEN_CV_LOADED; private static final Logger LOGGER = Logger.getLogger(OpenCvLoader.class.getName());
private static boolean openCvLoaded;
private static UnsatisfiedLinkError exception = null; private static UnsatisfiedLinkError exception = null;
static { static {
boolean tempOpenCvLoaded = false;
try { try {
System.loadLibrary(Core.NATIVE_LIBRARY_NAME); System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
tempOpenCvLoaded = true; openCvLoaded = true;
} catch (UnsatisfiedLinkError e) { } catch (UnsatisfiedLinkError ex) {
tempOpenCvLoaded = false; LOGGER.log(Level.WARNING, "Unable to load OpenCV", ex);
exception = e; //save relevant error for throwing at appropriate time exception = ex; //save relevant error for throwing at appropriate time
openCvLoaded = false;
} catch (SecurityException ex) {
LOGGER.log(Level.WARNING, "Unable to load OpenCV", ex);
openCvLoaded = false;
} }
OPEN_CV_LOADED = tempOpenCvLoaded;
} }
/** /**
* Return whether or not the OpenCV library has been loaded. * Return whether or not the OpenCV library has been loaded.
* *
* @return - true if the opencv library is loaded or false if it is not * @return - true if the opencv library is loaded or false if it is not
* @throws UnsatisfiedLinkError - A COPY of the exception that prevented OpenCV from loading. * @throws UnsatisfiedLinkError - A COPY of the exception that prevented
* Note that the stack trace in the exception can be confusing because it refers to a * OpenCV from loading. Note that the stack trace in the exception can be
* past invocation. * confusing because it refers to a past invocation.
*
* @deprecated Use hasOpenCvLoaded instead.
*/ */
@Deprecated
public static boolean isOpenCvLoaded() throws UnsatisfiedLinkError { public static boolean isOpenCvLoaded() throws UnsatisfiedLinkError {
if (!OPEN_CV_LOADED) { if (!openCvLoaded) {
//exception should never be null if the open cv isn't loaded but just in case //exception should never be null if the open cv isn't loaded but just in case
if (exception != null) { if (exception != null) {
throw exception; throw exception;
@ -55,6 +64,15 @@ public final class OpenCvLoader {
} }
} }
return OPEN_CV_LOADED; return openCvLoaded;
}
/**
* Return whether OpenCV library has been loaded.
*
* @return true if OpenCV library was loaded, false if not.
*/
public static boolean hasOpenCvLoaded() {
return openCvLoaded;
} }
} }

View File

@ -52,8 +52,8 @@ AutoIngestSettingsPanel.lbTestMultiUserText.text=Test Multi-User Case Creation a
AutoIngestSettingsPanel.lbMultiUserResult.text= AutoIngestSettingsPanel.lbMultiUserResult.text=
AutoIngestSettingsPanel.lbTestResultText.text= AutoIngestSettingsPanel.lbTestResultText.text=
AutoIngestSettingsPanel.validationErrMsg.outputPathNotSpecified=Output folder must be set AutoIngestSettingsPanel.validationErrMsg.outputPathNotSpecified=Output folder must be set
AutoIngestSettingsPanel.PathInvalid=Case output directory path is not valid AutoIngestSettingsPanel.PathInvalid=Path is not valid
AutoIngestSettingsPanel.CheckPermissions=Ensure that the user account {0} has write permissions in this folder AutoIngestSettingsPanel.CheckPermissions=Check permissions.
AutoIngestSettingsPanel.Success=Success AutoIngestSettingsPanel.Success=Success
AutoIngestSettingsPanel.TestRunning=Test in progress... AutoIngestSettingsPanel.TestRunning=Test in progress...
AutoIngestSettingsPanel.servicesDown=Some of the Multi User services are down AutoIngestSettingsPanel.servicesDown=Some of the Multi User services are down

View File

@ -3,5 +3,7 @@ ObjectDetectionFileIngestModule.classifierDetection.text=Classifier detected {0}
# {0} - classifierDir # {0} - classifierDir
ObjectDetectionFileIngestModule.noClassifiersFound.message=No classifiers were found in {0}, object detection will not be executed. ObjectDetectionFileIngestModule.noClassifiersFound.message=No classifiers were found in {0}, object detection will not be executed.
ObjectDetectionFileIngestModule.noClassifiersFound.subject=No classifiers found. ObjectDetectionFileIngestModule.noClassifiersFound.subject=No classifiers found.
ObjectDetectionFileIngestModule.notWindowsError=This module is only available on Windows.
ObjectDetectionFileIngestModule.openCVNotLoaded=OpenCV was not loaded, but is required to run.
ObjectDetectionModuleFactory.moduleDescription.text=Use object classifiers to identify objects in pictures. ObjectDetectionModuleFactory.moduleDescription.text=Use object classifiers to identify objects in pictures.
ObjectDetectionModuleFactory.moduleName.text=Object Detection ObjectDetectionModuleFactory.moduleName.text=Object Detection

View File

@ -65,14 +65,32 @@ public class ObjectDetectectionFileIngestModule extends FileIngestModuleAdapter
private Blackboard blackboard; private Blackboard blackboard;
@Messages({"ObjectDetectionFileIngestModule.noClassifiersFound.subject=No classifiers found.", @Messages({"ObjectDetectionFileIngestModule.noClassifiersFound.subject=No classifiers found.",
"# {0} - classifierDir", "ObjectDetectionFileIngestModule.noClassifiersFound.message=No classifiers were found in {0}, object detection will not be executed."}) "# {0} - classifierDir", "ObjectDetectionFileIngestModule.noClassifiersFound.message=No classifiers were found in {0}, object detection will not be executed.",
"ObjectDetectionFileIngestModule.openCVNotLoaded=OpenCV was not loaded, but is required to run.",
"ObjectDetectionFileIngestModule.notWindowsError=This module is only available on Windows."
})
@Override @Override
public void startUp(IngestJobContext context) throws IngestModule.IngestModuleException { public void startUp(IngestJobContext context) throws IngestModule.IngestModuleException {
jobId = context.getJobId(); jobId = context.getJobId();
File classifierDir = new File(PlatformUtil.getObjectDetectionClassifierPath()); File classifierDir = new File(PlatformUtil.getObjectDetectionClassifierPath());
classifiers = new HashMap<>(); classifiers = new HashMap<>();
if(!PlatformUtil.isWindowsOS()) {
//Pop-up that catches IngestModuleException will automatically indicate
//the name of the module before the message.
String errorMsg = Bundle.ObjectDetectionFileIngestModule_notWindowsError();
logger.log(Level.SEVERE, errorMsg);
throw new IngestModule.IngestModuleException(errorMsg);
}
if(!OpenCvLoader.hasOpenCvLoaded()) {
String errorMsg = Bundle.ObjectDetectionFileIngestModule_openCVNotLoaded();
logger.log(Level.SEVERE, errorMsg);
throw new IngestModule.IngestModuleException(errorMsg);
}
//Load all classifiers found in PlatformUtil.getObjectDetectionClassifierPath() //Load all classifiers found in PlatformUtil.getObjectDetectionClassifierPath()
if (OpenCvLoader.isOpenCvLoaded() && classifierDir.exists() && classifierDir.isDirectory()) { if (classifierDir.exists() && classifierDir.isDirectory()) {
for (File classifier : classifierDir.listFiles()) { for (File classifier : classifierDir.listFiles()) {
if (classifier.isFile() && FilenameUtils.getExtension(classifier.getName()).equalsIgnoreCase("xml")) { if (classifier.isFile() && FilenameUtils.getExtension(classifier.getName()).equalsIgnoreCase("xml")) {
classifiers.put(classifier.getName(), new CascadeClassifier(classifier.getAbsolutePath())); classifiers.put(classifier.getName(), new CascadeClassifier(classifier.getAbsolutePath()));

View File

@ -24,6 +24,7 @@ import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.function.Function; import java.util.function.Function;
import java.util.logging.Level;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javafx.beans.property.ReadOnlyStringWrapper; import javafx.beans.property.ReadOnlyStringWrapper;
import javafx.beans.property.StringProperty; import javafx.beans.property.StringProperty;
@ -32,6 +33,7 @@ import javafx.scene.image.Image;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.datamodel.ContentUtils; import org.sleuthkit.autopsy.datamodel.ContentUtils;
import org.sleuthkit.datamodel.TagName; import org.sleuthkit.datamodel.TagName;
@ -59,20 +61,22 @@ import org.sleuthkit.datamodel.TagName;
"DrawableAttribute.mimeType=MIME type"}) "DrawableAttribute.mimeType=MIME type"})
public class DrawableAttribute<T extends Comparable<T>> { public class DrawableAttribute<T extends Comparable<T>> {
public final static DrawableAttribute<String> MD5_HASH = private static final Logger logger = Logger.getLogger(DrawableAttribute.class.getName());
new DrawableAttribute<>(AttributeName.MD5_HASH, Bundle.DrawableAttribute_md5hash(),
public final static DrawableAttribute<String> MD5_HASH
= new DrawableAttribute<>(AttributeName.MD5_HASH, Bundle.DrawableAttribute_md5hash(),
false, false,
"icon-hashtag.png", // NON-NLS "icon-hashtag.png", // NON-NLS
f -> Collections.singleton(f.getMd5Hash())); f -> Collections.singleton(f.getMd5Hash()));
public final static DrawableAttribute<String> NAME = public final static DrawableAttribute<String> NAME
new DrawableAttribute<>(AttributeName.NAME, Bundle.DrawableAttribute_name(), = new DrawableAttribute<>(AttributeName.NAME, Bundle.DrawableAttribute_name(),
true, true,
"folder-rename.png", //NON-NLS "folder-rename.png", //NON-NLS
f -> Collections.singleton(f.getName())); f -> Collections.singleton(f.getName()));
public final static DrawableAttribute<Boolean> ANALYZED = public final static DrawableAttribute<Boolean> ANALYZED
new DrawableAttribute<>(AttributeName.ANALYZED, Bundle.DrawableAttribute_analyzed(), = new DrawableAttribute<>(AttributeName.ANALYZED, Bundle.DrawableAttribute_analyzed(),
true, true,
"", "",
f -> Collections.singleton(f.isAnalyzed())); f -> Collections.singleton(f.isAnalyzed()));
@ -85,8 +89,8 @@ public class DrawableAttribute<T extends Comparable<T>> {
* //TODO: this has lead to awkward hard to maintain code, and little * //TODO: this has lead to awkward hard to maintain code, and little
* advantage. move categories into DrawableDB? * advantage. move categories into DrawableDB?
*/ */
public final static DrawableAttribute<DhsImageCategory> CATEGORY = public final static DrawableAttribute<DhsImageCategory> CATEGORY
new DrawableAttribute<DhsImageCategory>(AttributeName.CATEGORY, Bundle.DrawableAttribute_category(), = new DrawableAttribute<DhsImageCategory>(AttributeName.CATEGORY, Bundle.DrawableAttribute_category(),
false, false,
"category-icon.png", //NON-NLS "category-icon.png", //NON-NLS
f -> Collections.singleton(f.getCategory())) { f -> Collections.singleton(f.getCategory())) {
@ -97,77 +101,77 @@ public class DrawableAttribute<T extends Comparable<T>> {
} }
}; };
public final static DrawableAttribute<TagName> TAGS = public final static DrawableAttribute<TagName> TAGS
new DrawableAttribute<>(AttributeName.TAGS, Bundle.DrawableAttribute_tags(), = new DrawableAttribute<>(AttributeName.TAGS, Bundle.DrawableAttribute_tags(),
false, false,
"tag_red.png", //NON-NLS "tag_red.png", //NON-NLS
DrawableFile::getTagNames); DrawableFile::getTagNames);
public final static DrawableAttribute<String> PATH = public final static DrawableAttribute<String> PATH
new DrawableAttribute<>(AttributeName.PATH, Bundle.DrawableAttribute_path(), = new DrawableAttribute<>(AttributeName.PATH, Bundle.DrawableAttribute_path(),
true, true,
"folder_picture.png", //NON-NLS "folder_picture.png", //NON-NLS
f -> Collections.singleton(f.getDrawablePath())); f -> Collections.singleton(f.getDrawablePath()));
public final static DrawableAttribute<String> CREATED_TIME = public final static DrawableAttribute<String> CREATED_TIME
new DrawableAttribute<>(AttributeName.CREATED_TIME, Bundle.DrawableAttribute_createdTime(), = new DrawableAttribute<>(AttributeName.CREATED_TIME, Bundle.DrawableAttribute_createdTime(),
true, true,
"clock--plus.png", //NON-NLS "clock--plus.png", //NON-NLS
f -> Collections.singleton(ContentUtils.getStringTime(f.getCrtime(), f.getAbstractFile()))); f -> Collections.singleton(ContentUtils.getStringTime(f.getCrtime(), f.getAbstractFile())));
public final static DrawableAttribute<String> MODIFIED_TIME = public final static DrawableAttribute<String> MODIFIED_TIME
new DrawableAttribute<>(AttributeName.MODIFIED_TIME, Bundle.DrawableAttribute_modifiedTime(), = new DrawableAttribute<>(AttributeName.MODIFIED_TIME, Bundle.DrawableAttribute_modifiedTime(),
true, true,
"clock--pencil.png", //NON-NLS "clock--pencil.png", //NON-NLS
f -> Collections.singleton(ContentUtils.getStringTime(f.getMtime(), f.getAbstractFile()))); f -> Collections.singleton(ContentUtils.getStringTime(f.getMtime(), f.getAbstractFile())));
public final static DrawableAttribute<String> MAKE = public final static DrawableAttribute<String> MAKE
new DrawableAttribute<>(AttributeName.MAKE, Bundle.DrawableAttribute_cameraMake(), = new DrawableAttribute<>(AttributeName.MAKE, Bundle.DrawableAttribute_cameraMake(),
true, true,
"camera.png", //NON-NLS "camera.png", //NON-NLS
f -> Collections.singleton(f.getMake())); f -> Collections.singleton(f.getMake()));
public final static DrawableAttribute<String> MODEL = public final static DrawableAttribute<String> MODEL
new DrawableAttribute<>(AttributeName.MODEL, Bundle.DrawableAttribute_cameraModel(), = new DrawableAttribute<>(AttributeName.MODEL, Bundle.DrawableAttribute_cameraModel(),
true, true,
"camera.png", //NON-NLS "camera.png", //NON-NLS
f -> Collections.singleton(f.getModel())); f -> Collections.singleton(f.getModel()));
public final static DrawableAttribute<String> HASHSET = public final static DrawableAttribute<String> HASHSET
new DrawableAttribute<>(AttributeName.HASHSET, Bundle.DrawableAttribute_hashSet(), = new DrawableAttribute<>(AttributeName.HASHSET, Bundle.DrawableAttribute_hashSet(),
true, true,
"hashset_hits.png", //NON-NLS "hashset_hits.png", //NON-NLS
DrawableFile::getHashSetNamesUnchecked); DrawableFile::getHashSetNamesUnchecked);
public final static DrawableAttribute<Long> OBJ_ID = public final static DrawableAttribute<Long> OBJ_ID
new DrawableAttribute<>(AttributeName.OBJ_ID, Bundle.DrawableAttribute_intObjID(), = new DrawableAttribute<>(AttributeName.OBJ_ID, Bundle.DrawableAttribute_intObjID(),
true, true,
"", "",
f -> Collections.singleton(f.getId())); f -> Collections.singleton(f.getId()));
public final static DrawableAttribute<Double> WIDTH = public final static DrawableAttribute<Double> WIDTH
new DrawableAttribute<>(AttributeName.WIDTH, Bundle.DrawableAttribute_width(), = new DrawableAttribute<>(AttributeName.WIDTH, Bundle.DrawableAttribute_width(),
false, false,
"arrow-resize.png", //NON-NLS "arrow-resize.png", //NON-NLS
f -> Collections.singleton(f.getWidth())); f -> Collections.singleton(f.getWidth()));
public final static DrawableAttribute<Double> HEIGHT = public final static DrawableAttribute<Double> HEIGHT
new DrawableAttribute<>(AttributeName.HEIGHT, Bundle.DrawableAttribute_height(), = new DrawableAttribute<>(AttributeName.HEIGHT, Bundle.DrawableAttribute_height(),
false, false,
"arrow-resize-090.png", //NON-NLS "arrow-resize-090.png", //NON-NLS
f -> Collections.singleton(f.getHeight())); f -> Collections.singleton(f.getHeight()));
public final static DrawableAttribute<String> MIME_TYPE = public final static DrawableAttribute<String> MIME_TYPE
new DrawableAttribute<>(AttributeName.MIME_TYPE, Bundle.DrawableAttribute_mimeType(), = new DrawableAttribute<>(AttributeName.MIME_TYPE, Bundle.DrawableAttribute_mimeType(),
false, false,
"mime_types.png", //NON-NLS "mime_types.png", //NON-NLS
f -> Collections.singleton(f.getMIMEType())); f -> Collections.singleton(f.getMIMEType()));
final private static List< DrawableAttribute<?>> groupables = final private static List< DrawableAttribute<?>> groupables
Arrays.asList(PATH, HASHSET, CATEGORY, TAGS, MAKE, MODEL, MIME_TYPE); = Arrays.asList(PATH, HASHSET, CATEGORY, TAGS, MAKE, MODEL, MIME_TYPE);
final private static List<DrawableAttribute<?>> values = final private static List<DrawableAttribute<?>> values
Arrays.asList(NAME, ANALYZED, CATEGORY, TAGS, PATH, CREATED_TIME, = Arrays.asList(NAME, ANALYZED, CATEGORY, TAGS, PATH, CREATED_TIME,
MODIFIED_TIME, MD5_HASH, HASHSET, MAKE, MODEL, OBJ_ID, WIDTH, HEIGHT, MIME_TYPE); MODIFIED_TIME, MD5_HASH, HASHSET, MAKE, MODEL, OBJ_ID, WIDTH, HEIGHT, MIME_TYPE);
private final Function<DrawableFile, Collection<T>> extractor; private final Function<DrawableFile, Collection<T>> extractor;
@ -226,9 +230,17 @@ public class DrawableAttribute<T extends Comparable<T>> {
} }
public Collection<T> getValue(DrawableFile f) { public Collection<T> getValue(DrawableFile f) {
try {
return extractor.apply(f).stream() return extractor.apply(f).stream()
.filter(value -> (value != null && value.toString().isEmpty()== false) ) .filter(value -> (value != null && value.toString().isEmpty() == false))
.collect(Collectors.toSet()); .collect(Collectors.toSet());
} catch (Exception ex) {
/* There is a catch-all here because the code in the try block executes third-party
library calls that throw unchecked exceptions. See JIRA-5144, where an IllegalStateException
was thrown because a file's MIME type was incorrectly identified as a picture type. */
logger.log(Level.WARNING, "Exception while getting image attributes", ex); //NON-NLS
return Collections.EMPTY_SET;
}
} }
public static enum AttributeName { public static enum AttributeName {