Search in sources :

Example 6 with DMSFile

use of com.axelor.dms.db.DMSFile in project axelor-open-suite by axelor.

the class DMSController method sendEmail.

public void sendEmail(ActionRequest request, ActionResponse response) {
    try {
        DMSFile dmsFile = request.getContext().asType(DMSFile.class);
        dmsFile = Beans.get(DMSFileRepository.class).find(dmsFile.getId());
        Beans.get(DMSFileService.class).sendEmail(dmsFile);
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : DMSFile(com.axelor.dms.db.DMSFile) DMSFileService(com.axelor.apps.projectdms.service.DMSFileService)

Aggregations

DMSFile (com.axelor.dms.db.DMSFile)6 MetaFile (com.axelor.meta.db.MetaFile)5 FileInputStream (java.io.FileInputStream)3 InputStream (java.io.InputStream)3 Transactional (com.google.inject.persist.Transactional)2 File (java.io.File)2 UnitCostCalcLine (com.axelor.apps.production.db.UnitCostCalcLine)1 DMSFileService (com.axelor.apps.projectdms.service.DMSFileService)1 MetaFiles (com.axelor.meta.MetaFiles)1 IOException (java.io.IOException)1 UncheckedIOException (java.io.UncheckedIOException)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 ZipEntry (java.util.zip.ZipEntry)1 ZipFile (java.util.zip.ZipFile)1 ZipInputStream (java.util.zip.ZipInputStream)1