Ran searches. Tagged strings. Created empty Bundle_Ja.

This commit is contained in:
Nick Davis 2016-01-29 14:11:52 -05:00
parent 23a6618bb2
commit 00b4ca26ce
2 changed files with 12 additions and 10 deletions

View File

@ -42,8 +42,8 @@ public class UserArtifactIngestModule implements DataSourceIngestModule {
progressBar.switchToDeterminate(2); progressBar.switchToDeterminate(2);
try { try {
FileManager manager = Case.getCurrentCase().getServices().getFileManager(); FileManager manager = Case.getCurrentCase().getServices().getFileManager();
List<AbstractFile> file1 = manager.findFiles("Sunset.jpg"); List<AbstractFile> file1 = manager.findFiles("Sunset.jpg"); //NON-NLS
List<AbstractFile> file2 = manager.findFiles("Winter.jpg"); List<AbstractFile> file2 = manager.findFiles("Winter.jpg"); //NON-NLS
BlackboardArtifact art1; BlackboardArtifact art1;
BlackboardArtifact art2; BlackboardArtifact art2;
if (!file1.isEmpty()) { if (!file1.isEmpty()) {
@ -56,8 +56,8 @@ public class UserArtifactIngestModule implements DataSourceIngestModule {
} else { } else {
art2 = dataSource.newArtifact(type2.getTypeID()); art2 = dataSource.newArtifact(type2.getTypeID());
} }
BlackboardAttribute.Type attributeType = Case.getCurrentCase().getServices().getBlackboard().addAttributeType("Test", TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.LONG, "2"); BlackboardAttribute.Type attributeType = Case.getCurrentCase().getServices().getBlackboard().addAttributeType("Test", TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.LONG, "2"); //NON-NLS
BlackboardAttribute.Type attributeType2 = Case.getCurrentCase().getServices().getBlackboard().addAttributeType("Test2", TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE, "3"); BlackboardAttribute.Type attributeType2 = Case.getCurrentCase().getServices().getBlackboard().addAttributeType("Test2", TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE, "3"); //NON-NLS
art1.addAttribute(new BlackboardAttribute(attributeType, art1.addAttribute(new BlackboardAttribute(attributeType,
UserArtifactIngestModuleFactory.getModuleName(), -1L)); UserArtifactIngestModuleFactory.getModuleName(), -1L));
progressBar.progress(1); progressBar.progress(1);
@ -65,14 +65,16 @@ public class UserArtifactIngestModule implements DataSourceIngestModule {
UserArtifactIngestModuleFactory.getModuleName(), new byte[7])); UserArtifactIngestModuleFactory.getModuleName(), new byte[7]));
progressBar.progress(1); progressBar.progress(1);
IngestServices.getInstance().postMessage(IngestMessage.createDataMessage( IngestServices.getInstance().postMessage(IngestMessage.createDataMessage(
"name", "name", // NON-NLS
UserArtifactIngestModuleFactory.getModuleName(), UserArtifactIngestModuleFactory.getModuleName(),
"Test Results", "Test Results", //NON-NLS
"Test", "Test", //NON-NLS
art1)); art1));
return ProcessResult.OK; return ProcessResult.OK;
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
return ProcessResult.ERROR; return ProcessResult.ERROR;
} catch (TskDataException ex) {
return ProcessResult.ERROR;
} catch (BlackboardException ex) { } catch (BlackboardException ex) {
return ProcessResult.ERROR; return ProcessResult.ERROR;
} }
@ -82,10 +84,10 @@ public class UserArtifactIngestModule implements DataSourceIngestModule {
public void startUp(IngestJobContext context) throws IngestModuleException { public void startUp(IngestJobContext context) throws IngestModuleException {
this.context = context; this.context = context;
try { try {
type1 = Case.getCurrentCase().getServices().getBlackboard().addArtifactType("This is", "a test"); type1 = Case.getCurrentCase().getServices().getBlackboard().addArtifactType("This is", "a test"); //NON-NLS
type2 = Case.getCurrentCase().getServices().getBlackboard().addArtifactType("Another", "kinda test"); type2 = Case.getCurrentCase().getServices().getBlackboard().addArtifactType("Another", "kinda test"); //NON-NLS
} catch (BlackboardException ex) { } catch (BlackboardException ex) {
Logger.logMsg(Logger.ERROR, "Startup failed"); Logger.logMsg(Logger.ERROR, "Startup failed"); //NON-NLS
} }
} }
} }