Package org.jboss.seam.document

Examples of org.jboss.seam.document.DocumentData


        String baseName = baseNameForViewId(viewId);

        DocumentStore store = DocumentStore.instance();
        DocumentType documentType = new DocumentData.DocumentType("pdf",
                "application/pdf");
        DocumentData documentData = new DocumentData(baseName, documentType,
                buffer.toByteArray());
        documentData.setFilename(getFilename());

        if (getExportKey() != null) {
            log.debug("Exporting PDF data to event key #0", getExportKey());
            Contexts.getEventContext().set(getExportKey(), documentData);
            return;
View Full Code Here


        DocumentStore store = DocumentStore.instance();
        String id = store.newId();

        DocumentType type = new DocumentType("", resource.getContentType());

        DocumentData documentData = new DownloadableDocumentData(baseName, type, resource.getData());
        documentData.setFilename(resource.getFileName());
        documentData.setDisposition(resource.getDisposition());

        String url = store.preferredUrlForContent(resource.getFileName(), type.getExtension(), id);
        url = Manager.instance().encodeConversationId(url, viewId);
        store.saveData(id, documentData);
        return url;
View Full Code Here

TOP

Related Classes of org.jboss.seam.document.DocumentData

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.