mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 08:26:15 +00:00
4014-more clean up of comments and logging for has comment column code
This commit is contained in:
parent
d07326a342
commit
17e56c19ef
@ -375,6 +375,10 @@ public class Case {
|
|||||||
*/
|
*/
|
||||||
TAG_DEFINITION_CHANGED,
|
TAG_DEFINITION_CHANGED,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An item in the central repository has had its comment modified. The
|
||||||
|
* old value is null, the new value is string for current comment.
|
||||||
|
*/
|
||||||
CR_COMMENT_CHANGED;
|
CR_COMMENT_CHANGED;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -12,8 +12,8 @@ public class CommentChangedEvent extends AutopsyEvent implements Serializable {
|
|||||||
|
|
||||||
private final long contentID;
|
private final long contentID;
|
||||||
|
|
||||||
public CommentChangedEvent(long id) {
|
public CommentChangedEvent(long id, String newComment) {
|
||||||
super(Case.Events.CR_COMMENT_CHANGED.toString(), true, false);
|
super(Case.Events.CR_COMMENT_CHANGED.toString(), null, newComment);
|
||||||
contentID = id;
|
contentID = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,8 +23,6 @@ import java.util.logging.Level;
|
|||||||
import javax.swing.AbstractAction;
|
import javax.swing.AbstractAction;
|
||||||
import org.openide.DialogDisplayer;
|
import org.openide.DialogDisplayer;
|
||||||
import org.openide.NotifyDescriptor;
|
import org.openide.NotifyDescriptor;
|
||||||
import org.openide.util.Exceptions;
|
|
||||||
import org.openide.util.NbBundle;
|
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||||
@ -43,6 +41,7 @@ import org.sleuthkit.datamodel.AbstractFile;
|
|||||||
public final class AddEditCentralRepoCommentAction extends AbstractAction {
|
public final class AddEditCentralRepoCommentAction extends AbstractAction {
|
||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(AddEditCentralRepoCommentAction.class.getName());
|
private static final Logger logger = Logger.getLogger(AddEditCentralRepoCommentAction.class.getName());
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private boolean addToDatabase;
|
private boolean addToDatabase;
|
||||||
private CorrelationAttribute correlationAttribute;
|
private CorrelationAttribute correlationAttribute;
|
||||||
@ -110,9 +109,9 @@ public final class AddEditCentralRepoCommentAction extends AbstractAction {
|
|||||||
comment = centralRepoCommentDialog.getComment();
|
comment = centralRepoCommentDialog.getComment();
|
||||||
if (fileId != null) {
|
if (fileId != null) {
|
||||||
try {
|
try {
|
||||||
Case.getCurrentCaseThrows().notifyCentralRepoCommentChanged(fileId);
|
Case.getCurrentCaseThrows().notifyCentralRepoCommentChanged(fileId, comment);
|
||||||
} catch (NoCurrentCaseException ignored) {
|
} catch (NoCurrentCaseException ex) {
|
||||||
//WJS should this be ignored or is it an issue in multi-user instances
|
logger.log(Level.WARNING, "Case not open after changing central repository comment", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (EamDbException ex) {
|
} catch (EamDbException ex) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user