mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-08 22:29:33 +00:00
Update Project Vic tag names to latest - fixes bug with latest LE Bundle Module
This commit is contained in:
parent
cd078d9ac2
commit
eb25cba6f3
@ -96,7 +96,6 @@ public final class ImageGalleryController {
|
|||||||
private static final Set<IngestManager.IngestJobEvent> INGEST_JOB_EVENTS_OF_INTEREST = EnumSet.of(IngestManager.IngestJobEvent.DATA_SOURCE_ANALYSIS_STARTED, IngestManager.IngestJobEvent.DATA_SOURCE_ANALYSIS_COMPLETED);
|
private static final Set<IngestManager.IngestJobEvent> INGEST_JOB_EVENTS_OF_INTEREST = EnumSet.of(IngestManager.IngestJobEvent.DATA_SOURCE_ANALYSIS_STARTED, IngestManager.IngestJobEvent.DATA_SOURCE_ANALYSIS_COMPLETED);
|
||||||
private static final Set<IngestManager.IngestModuleEvent> INGEST_MODULE_EVENTS_OF_INTEREST = EnumSet.of(IngestManager.IngestModuleEvent.DATA_ADDED, IngestManager.IngestModuleEvent.FILE_DONE);
|
private static final Set<IngestManager.IngestModuleEvent> INGEST_MODULE_EVENTS_OF_INTEREST = EnumSet.of(IngestManager.IngestModuleEvent.DATA_ADDED, IngestManager.IngestModuleEvent.FILE_DONE);
|
||||||
|
|
||||||
private static String DEFAULT_TAG_SET_NAME = "Project VIC";
|
|
||||||
/*
|
/*
|
||||||
* The file limit for image gallery. If the selected data source (or all
|
* The file limit for image gallery. If the selected data source (or all
|
||||||
* data sources, if that option is selected) has more than this many files
|
* data sources, if that option is selected) has more than this many files
|
||||||
@ -738,7 +737,7 @@ public final class ImageGalleryController {
|
|||||||
List<TagSet> tagSetList = getCaseDatabase().getTaggingManager().getTagSets();
|
List<TagSet> tagSetList = getCaseDatabase().getTaggingManager().getTagSets();
|
||||||
if (tagSetList != null && !tagSetList.isEmpty()) {
|
if (tagSetList != null && !tagSetList.isEmpty()) {
|
||||||
for (TagSet set : tagSetList) {
|
for (TagSet set : tagSetList) {
|
||||||
if (set.getName().equals(getCategoryTagSetName())) {
|
if (set.getName().equals(ImageGalleryService.PROJECT_VIC_TAG_SET_NAME)) {
|
||||||
return set;
|
return set;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -749,14 +748,6 @@ public final class ImageGalleryController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the name of the category tag set.
|
|
||||||
*
|
|
||||||
* @return Tagset name
|
|
||||||
*/
|
|
||||||
static String getCategoryTagSetName() {
|
|
||||||
return DEFAULT_TAG_SET_NAME;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A listener for ingest module application events.
|
* A listener for ingest module application events.
|
||||||
|
@ -44,20 +44,32 @@ import org.sleuthkit.datamodel.TskData;
|
|||||||
})
|
})
|
||||||
public class ImageGalleryService implements AutopsyService {
|
public class ImageGalleryService implements AutopsyService {
|
||||||
|
|
||||||
private static final String CATEGORY_ONE_NAME = "Child Exploitation (Illegal)";
|
/* Image Gallery has its own definition of Project VIC tag names because
|
||||||
private static final String CATEGORY_TWO_NAME = "Child Exploitation (Non-Illegal/Age Difficult)";
|
* these will be used if the Project Vic module is not installed. These will
|
||||||
private static final String CATEGORY_THREE_NAME = "CGI/Animation (Child Exploitive)";
|
* get added when a case is opened if the tag set is not already defined.
|
||||||
private static final String CATEGORY_FOUR_NAME = "Exemplar/Comparison (Internal Use Only)";
|
*
|
||||||
private static final String CATEGORY_FIVE_NAME = "Non-pertinent";
|
* The following list of names must be kept in sync with the CountryManager
|
||||||
|
* code in the ProjectVic module.
|
||||||
|
*
|
||||||
|
* Autopsy Core Tag code and TSK DataModel upgrade code also have a
|
||||||
|
* references to the "Projet VIC" set name. Be careful changing any of these names.
|
||||||
|
*/
|
||||||
|
static String PROJECT_VIC_TAG_SET_NAME = "Project VIC";
|
||||||
|
private static final String PV_US_CAT0 = "Non-Pertinent";
|
||||||
|
private static final String PV_US_CAT1 = "Child Abuse Material - (CAM)";
|
||||||
|
private static final String PV_US_CAT2 = "Child Exploitive (Non-CAM) Age Difficult";
|
||||||
|
private static final String PV_US_CAT3 = "CGI/Animation - Child Exploitive";
|
||||||
|
private static final String PV_US_CAT4 = "Comparison Images";
|
||||||
|
|
||||||
private static final List<TagNameDefinition> DEFAULT_CATEGORY_DEFINITION = new ArrayList<>();
|
private static final List<TagNameDefinition> PROJECT_VIC_US_CATEGORIES = new ArrayList<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
DEFAULT_CATEGORY_DEFINITION.add(new TagNameDefinition(CATEGORY_ONE_NAME, "", TagName.HTML_COLOR.RED, TskData.FileKnown.BAD));
|
// NOTE: The colors here are what will be shown in the border
|
||||||
DEFAULT_CATEGORY_DEFINITION.add(new TagNameDefinition(CATEGORY_TWO_NAME, "", TagName.HTML_COLOR.LIME, TskData.FileKnown.BAD));
|
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT0, "", TagName.HTML_COLOR.GREEN, TskData.FileKnown.UNKNOWN));
|
||||||
DEFAULT_CATEGORY_DEFINITION.add(new TagNameDefinition(CATEGORY_THREE_NAME, "", TagName.HTML_COLOR.YELLOW, TskData.FileKnown.BAD));
|
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT1, "", TagName.HTML_COLOR.RED, TskData.FileKnown.BAD));
|
||||||
DEFAULT_CATEGORY_DEFINITION.add(new TagNameDefinition(CATEGORY_FOUR_NAME, "", TagName.HTML_COLOR.PURPLE, TskData.FileKnown.UNKNOWN));
|
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT2, "", TagName.HTML_COLOR.YELLOW, TskData.FileKnown.BAD));
|
||||||
DEFAULT_CATEGORY_DEFINITION.add(new TagNameDefinition(CATEGORY_FIVE_NAME, "", TagName.HTML_COLOR.FUCHSIA, TskData.FileKnown.UNKNOWN));
|
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT3, "", TagName.HTML_COLOR.FUCHSIA, TskData.FileKnown.BAD));
|
||||||
|
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT4, "", TagName.HTML_COLOR.BLUE, TskData.FileKnown.UNKNOWN));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -91,17 +103,17 @@ public class ImageGalleryService implements AutopsyService {
|
|||||||
|
|
||||||
// Check to see if the Project VIC tag set exists, if not create a
|
// Check to see if the Project VIC tag set exists, if not create a
|
||||||
// tag set using the default tags.
|
// tag set using the default tags.
|
||||||
boolean addDefaultTagSet = true;
|
boolean addProjVicTagSet = true;
|
||||||
List<TagSet> tagSets = context.getCase().getServices().getTagsManager().getAllTagSets();
|
List<TagSet> tagSets = context.getCase().getServices().getTagsManager().getAllTagSets();
|
||||||
for (TagSet set : tagSets) {
|
for (TagSet set : tagSets) {
|
||||||
if (set.getName().equals(ImageGalleryController.getCategoryTagSetName())) {
|
if (set.getName().equals(PROJECT_VIC_TAG_SET_NAME)) {
|
||||||
addDefaultTagSet = false;
|
addProjVicTagSet = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addDefaultTagSet) {
|
if (addProjVicTagSet) {
|
||||||
addDefaultTagSet(context.getCase());
|
addProjetVicTagSet(context.getCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageGalleryController.createController(context.getCase());
|
ImageGalleryController.createController(context.getCase());
|
||||||
@ -134,13 +146,11 @@ public class ImageGalleryService implements AutopsyService {
|
|||||||
*
|
*
|
||||||
* @throws TskCoreException
|
* @throws TskCoreException
|
||||||
*/
|
*/
|
||||||
private void addDefaultTagSet(Case currentCase) throws TskCoreException {
|
private void addProjetVicTagSet(Case currentCase) throws TskCoreException {
|
||||||
List<TagName> tagNames = new ArrayList<>();
|
List<TagName> tagNames = new ArrayList<>();
|
||||||
for (TagNameDefinition def : DEFAULT_CATEGORY_DEFINITION) {
|
for (TagNameDefinition def : PROJECT_VIC_US_CATEGORIES) {
|
||||||
tagNames.add(currentCase.getSleuthkitCase().addOrUpdateTagName(def.getDisplayName(), def.getDescription(), def.getColor(), def.getKnownStatus()));
|
tagNames.add(currentCase.getSleuthkitCase().addOrUpdateTagName(def.getDisplayName(), def.getDescription(), def.getColor(), def.getKnownStatus()));
|
||||||
}
|
}
|
||||||
|
currentCase.getServices().getTagsManager().addTagSet(PROJECT_VIC_TAG_SET_NAME, tagNames);
|
||||||
currentCase.getServices().getTagsManager().addTagSet(ImageGalleryController.getCategoryTagSetName(), tagNames);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,10 @@ public final class OpenAction extends CallableSystemAction {
|
|||||||
}
|
}
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
ImageGalleryController controller;
|
ImageGalleryController controller;
|
||||||
|
// @@@ This call gets a lock. We shouldn't do this in the UI....
|
||||||
controller = ImageGalleryController.getController(currentCase);
|
controller = ImageGalleryController.getController(currentCase);
|
||||||
|
|
||||||
|
// Display an error if we could not get the controller and return
|
||||||
if (controller == null) {
|
if (controller == null) {
|
||||||
Alert errorDIalog = new Alert(Alert.AlertType.ERROR);
|
Alert errorDIalog = new Alert(Alert.AlertType.ERROR);
|
||||||
errorDIalog.initModality(Modality.APPLICATION_MODAL);
|
errorDIalog.initModality(Modality.APPLICATION_MODAL);
|
||||||
@ -174,6 +177,7 @@ public final class OpenAction extends CallableSystemAction {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure the user is aware of Single vs Multi-user behaviors
|
||||||
if (currentCase.getCaseType() == Case.CaseType.MULTI_USER_CASE
|
if (currentCase.getCaseType() == Case.CaseType.MULTI_USER_CASE
|
||||||
&& ImageGalleryPreferences.isMultiUserCaseInfoDialogDisabled() == false) {
|
&& ImageGalleryPreferences.isMultiUserCaseInfoDialogDisabled() == false) {
|
||||||
Alert dialog = new Alert(Alert.AlertType.INFORMATION);
|
Alert dialog = new Alert(Alert.AlertType.INFORMATION);
|
||||||
|
@ -99,9 +99,9 @@ public class CategoryManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the number of file with the given {@link DhsImageCategory}
|
* get the number of file with the given tag
|
||||||
*
|
*
|
||||||
* @param cat get the number of files with Category = cat
|
* @param tagName get the number of files with Category = tagName
|
||||||
*
|
*
|
||||||
* @return the number of files with the given Category
|
* @return the number of files with the given Category
|
||||||
*/
|
*/
|
||||||
@ -110,20 +110,18 @@ public class CategoryManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* increment the cached value for the number of files with the given
|
* increment the cached value for the number of files with the given tag
|
||||||
* {@link DhsImageCategory}
|
|
||||||
*
|
*
|
||||||
* @param cat the Category to increment
|
* @param tagName the Category to increment
|
||||||
*/
|
*/
|
||||||
synchronized public void incrementCategoryCount(TagName tagName) {
|
synchronized public void incrementCategoryCount(TagName tagName) {
|
||||||
categoryCounts.getUnchecked(tagName).increment();
|
categoryCounts.getUnchecked(tagName).increment();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* decrement the cached value for the number of files with the given
|
* decrement the cached value for the number of files with the given tag
|
||||||
* DhsImageCategory
|
|
||||||
*
|
*
|
||||||
* @param cat the Category to decrement
|
* @param tagName the Category to decrement
|
||||||
*/
|
*/
|
||||||
synchronized public void decrementCategoryCount(TagName tagName) {
|
synchronized public void decrementCategoryCount(TagName tagName) {
|
||||||
categoryCounts.getUnchecked(tagName).decrement();
|
categoryCounts.getUnchecked(tagName).decrement();
|
||||||
|
@ -207,19 +207,19 @@ public final class DrawableDB {
|
|||||||
*/
|
*/
|
||||||
UNKNOWN,
|
UNKNOWN,
|
||||||
/**
|
/**
|
||||||
* Analyis (an ingest job or image gallery database rebuild) for the
|
* Analysis (an ingest job or image gallery database rebuild) for the
|
||||||
* data source is in progress.
|
* data source is in progress.
|
||||||
*/
|
*/
|
||||||
IN_PROGRESS,
|
IN_PROGRESS,
|
||||||
/**
|
/**
|
||||||
* Analyis (an ingest job or image gallery database rebuild) for the
|
* Analysis (an ingest job or image gallery database rebuild) for the
|
||||||
* data source has been completed and at least one file in the data
|
* data source has been completed and at least one file in the data
|
||||||
* source has a MIME type (ingest filters may have been applied, so some
|
* source has a MIME type (ingest filters may have been applied, so some
|
||||||
* files may not have been typed).
|
* files may not have been typed).
|
||||||
*/
|
*/
|
||||||
COMPLETE,
|
COMPLETE,
|
||||||
/**
|
/**
|
||||||
* Analyis (an ingest job or image gallery database rebuild) for the
|
* Analysis (an ingest job or image gallery database rebuild) for the
|
||||||
* data source has been completed, but the files for the data source
|
* data source has been completed, but the files for the data source
|
||||||
* were not assigned a MIME type (file typing was not enabled).
|
* were not assigned a MIME type (file typing was not enabled).
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user