19 package org.turro.attach.search;
22 import java.io.IOException;
23 import java.util.ArrayList;
24 import java.util.Collection;
25 import java.util.Date;
26 import java.util.logging.Level;
27 import java.util.logging.Logger;
28 import org.amic.util.date.CheckDate;
29 import org.turro.action.MailAttachment;
30 import org.turro.attach.db.AttachPU;
31 import org.turro.attach.entity.Attachment;
32 import org.turro.elephant.context.ElephantContext;
33 import org.turro.wd.entities.AttachWd;
41 private final ArrayList<MailAttachment> attachments =
new ArrayList<>();
57 if(from !=
null &&
new CheckDate(attach.getModification()).addMinutes(10).getDate().before(from)) {
64 ma.attachment = File.createTempFile(
"attach_",
"_mail");
66 }
catch (IOException ex) {
74 ma.attachment.delete();
78 public Collection<Attachment>
getAttachmentList(String path,
boolean publicOnly, Date from) {
79 ArrayList<Attachment> attlist =
new ArrayList<>();
85 if(from !=
null &&
new CheckDate(attach.getModification()).addMinutes(10).getDate().before(from)) {
static String getObjectPath(Object object)
void loadAttachments(String path, boolean publicOnly)
Collection< Attachment > getAttachmentList(String path, boolean publicOnly, Date from)
Collection< MailAttachment > getAttachments()
void loadAttachments(String path, boolean publicOnly, Date from)
void setCkExactPath(boolean ckExactPath)
void setPublicOnly(boolean publicOnly)
java.util.List< Attachment > getAttachmentList()
void setAttachPath(String attachPath)
static String logMsg(String msg)
static void writeToFile(Attachment attachment, File file)