Ingest adjustments

This commit is contained in:
adam-m 2012-01-25 10:58:38 -05:00
parent 977be67105
commit 8b72034284
5 changed files with 53 additions and 34 deletions

View File

@ -92,6 +92,11 @@ public class HashDbIngestService implements IngestServiceFsContent {
public String getName(){
return NAME;
}
@Override
public ServiceType getType() {
return ServiceType.FsContent;
}
@Override
public void process(FsContent fsContent){

View File

@ -23,6 +23,8 @@ package org.sleuthkit.autopsy.ingest;
* Base interface for ingest services
*/
public interface IngestServiceAbstract {
public enum ServiceType {Image, FsContent};
/**
* notification from manager that brand new processing should be initiated.
@ -48,4 +50,10 @@ public interface IngestServiceAbstract {
* should be unique across services, a user-friendly name of the service shown in GUI
*/
public String getName();
/**
*
* @return specialization of the service
*/
public ServiceType getType();
}

View File

@ -40,43 +40,38 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="topLable" min="-2" max="-2" attributes="1"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Component id="jProgressBar1" alignment="0" max="32767" attributes="0"/>
<Component id="imageProgressBar" alignment="0" max="32767" attributes="0"/>
<Component id="servicesPanel" alignment="0" max="32767" attributes="1"/>
<Component id="freqSlider" alignment="0" max="32767" attributes="1"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="topLable" alignment="0" min="-2" max="-2" attributes="1"/>
<Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0">
<Component id="jProgressBar1" alignment="0" max="32767" attributes="0"/>
<Component id="imageProgressBar" alignment="0" max="32767" attributes="0"/>
<Component id="servicesPanel" alignment="0" max="32767" attributes="1"/>
<Component id="freqSlider" alignment="0" max="32767" attributes="1"/>
</Group>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="startButton" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="81" max="-2" attributes="0"/>
<Component id="imageProgressLabel" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="74" max="-2" attributes="0"/>
<Component id="refreshFreqLabel" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="84" max="-2" attributes="0"/>
<Component id="fileProgressLabel" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="-2" pref="173" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="startButton" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="316" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="81" max="-2" attributes="0"/>
<Component id="imageProgressLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="227" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="74" max="-2" attributes="0"/>
<Component id="refreshFreqLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="219" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="84" max="-2" attributes="0"/>
<Component id="fileProgressLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="238" max="32767" attributes="0"/>
<EmptySpace pref="173" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>

View File

@ -103,18 +103,24 @@ public final class IngestTopComponent extends TopComponent implements DataExplor
Collection<IngestServiceImage> imageServices = IngestManager.enumerateImageServices();
for (IngestServiceImage service : imageServices) {
final String serviceName = service.getName();
services.add(service);
JCheckBox checkbox = new JCheckBox(service.getName(), true);
JCheckBox checkbox = new JCheckBox(serviceName, true);
checkbox.setName(serviceName);
checkbox.addActionListener(serviceSelListener);
servicesPanel.add(checkbox);
serviceStates.put(serviceName, true);
}
Collection<IngestServiceFsContent> fsServices = IngestManager.enumerateFsContentServices();
for (IngestServiceFsContent service : fsServices) {
final String serviceName = service.getName();
services.add(service);
JCheckBox checkbox = new JCheckBox(service.getName(), true);
JCheckBox checkbox = new JCheckBox(serviceName, true);
checkbox.setName(serviceName);
checkbox.addActionListener(serviceSelListener);
servicesPanel.add(checkbox);
serviceStates.put(serviceName, true);
}
}

View File

@ -61,4 +61,9 @@ public final class KeywordSearchIngestService implements IngestServiceFsContent
public void stop() {
logger.log(Level.INFO, "stop()");
}
@Override
public ServiceType getType() {
return ServiceType.FsContent;
}
}