Skip to content

Commit

Permalink
Apply code style
Browse files Browse the repository at this point in the history
  • Loading branch information
hauck-jvsh committed Feb 19, 2025
1 parent d53b2a9 commit e07c855
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void init(ConfigurationManager configurationManager) throws Exception {
if (zip == null) {
zip = new zipfile();
}

}

@Override
Expand All @@ -112,7 +112,6 @@ private void sendItemsToNextTask() throws Exception {
}
}


protected void sendToNextTask(IItem item) throws Exception {
if (!isEnabled()) {
super.sendToNextTask(item);
Expand All @@ -124,15 +123,13 @@ protected void sendToNextTask(IItem item) throws Exception {
zip = new zipfile();
sendItemsToNextTask();
}


if (!queue.containsValue(item) || item.isQueueEnd()) {
super.sendToNextTask(item);
}

}


private void sendZipFile(File zipFile) throws IOException {
System.out.println("Envia zip de tamanho" + zip.size());
try (CloseableHttpClient client = HttpClients.createDefault()) {
Expand Down Expand Up @@ -184,7 +181,7 @@ private void sendZipFile(File zipFile) throws IOException {
}
}

@Override
@Override
protected boolean processQueueEnd() {
// TODO Auto-generated method stub
return true;
Expand All @@ -194,16 +191,18 @@ protected boolean processQueueEnd() {
protected void process(IItem evidence) throws Exception {
if (evidence.isQueueEnd() && zip.size() > 0) {
sendZipFile(zip.closeAndGetZip());
zip = new zipfile();
zip = new zipfile();
sendItemsToNextTask();
return;
}
// TODO Auto-generated method stub
if (!isEnabled() || !evidence.isToAddToCase() || evidence.getHashValue() == null
|| evidence.getThumb() == null || evidence.isQueueEnd()) {
if (!isEnabled() || !evidence.isToAddToCase() || evidence.getHashValue() == null || evidence.getThumb() == null
|| evidence.isQueueEnd()) {
return;
}
String name = evidence.getExtraAttribute(IndexItem.TRACK_ID).toString() + ".jpg"; zip.addFileToZip(name, evidence.getThumb()); queue.put(name, evidence);
String name = evidence.getExtraAttribute(IndexItem.TRACK_ID).toString() + ".jpg";
zip.addFileToZip(name, evidence.getThumb());
queue.put(name, evidence);
}

}

0 comments on commit e07c855

Please sign in to comment.