Examples of PiecePack


Examples of com.music.model.persistent.PiecePack

        return dao.getByIds(PiecePack.class, ids);
    }

    @Transactional
    public void download(long packId, OutputStream out) throws IOException {
        PiecePack pack = getPack(packId);
        pack.setDownloads(pack.getDownloads() + 1);
        dao.persist(pack);
        pieceService.downloadPieces(out, pack.getPieces());
    }
View Full Code Here

Examples of com.music.model.persistent.PiecePack

        return "stockpacks";
    }

    @RequestMapping("/pack/download")
    public void downloadPack(@RequestParam long id, HttpServletResponse response) throws IOException {
        PiecePack pack = packService.getPack(id);
        if (pack != null) {
            response.setContentType("application/zip");
            response.setHeader("Content-Disposition", "attachment; filename=" + pack.getName().replace(' ', '_').replace('/', '_') + ".zip;");
            packService.download(id, response.getOutputStream());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.