Package org.internna.iwebmvc.repository

Examples of org.internna.iwebmvc.repository.FileRepository


            @Override
            protected EntityManager getEntityManager() {
                return UploadMonitorImplTest.entityManager;
            }
        };
        FileRepository repository = new FileRepository();
        repository.setDocumentRoot(root);
        monitor.documentRepository = repository;
        File upload = new File("web/images/i18n/globe.gif");
        FileInputStream stream = new FileInputStream(upload);
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        FileCopyUtils.copy(stream, out);
View Full Code Here


    public void setup() throws Exception {
        controller = new RemoteRepositoryAccessController();
        crypto = new DES3CiphererDecipherer();
        crypto.init();
        controller.decipherer = crypto;
        FileRepository repository = new FileRepository();
        repository.setDocumentRoot(root);
        controller.documentRepository = repository;
        DocumentHolder doc = new DocumentHolder();
        doc.setIdentifier("web/images/i18n/globe.gif");
        doc.setStream(new FileInputStream(new File(doc.getIdentifier())));
        doc.setMimeType("image/jpg");
        repository.store(doc);
        uri = crypto.encrypt(doc.getUri());
    }
View Full Code Here

TOP

Related Classes of org.internna.iwebmvc.repository.FileRepository

Copyright © 2018 www.massapicom. 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.