Examples of DocumentData


Examples of org.jboss.seam.document.DocumentData

      }

      String viewId = Pages.getViewId(context);
      String baseName = Pages.getCurrentBaseName();

      DocumentData documentData = new ByteArrayDocumentData(baseName, documentType, bytes);
      String dispositionValue = (String) valueBinding(context, "disposition", disposition);
      if (dispositionValue != null)
      {
         documentData.setDisposition(dispositionValue);
      }

      String fileNameValue = (String) valueBinding(context, "fileName", fileName);
      if (fileNameValue != null)
      {
         documentData.setFilename(fileNameValue);
      }

      if (sendRedirect)
      {
         DocumentStore store = DocumentStore.instance();
View Full Code Here

Examples of org.jboss.seam.document.DocumentData

    */
   private void redirectExport()
   {
      String viewId = Pages.getViewId(FacesContext.getCurrentInstance());
      String baseName = Pages.getCurrentBaseName();
      DocumentData documentData = new ByteArrayDocumentData(baseName, excelWorkbook.getDocumentType(), excelWorkbook.getBytes());
      String id = DocumentStore.instance().newId();
      String url = DocumentStore.instance().preferredUrlForContent(baseName, excelWorkbook.getDocumentType().getExtension(), id);
      url = Manager.instance().encodeConversationId(url, viewId);
      DocumentStore.instance().saveData(id, documentData);
      try
View Full Code Here

Examples of org.jboss.seam.document.DocumentData

      DocumentType type = excelWorkbook.getDocumentType();

      String viewId = Pages.getViewId(context);
      String baseName = Pages.getCurrentBaseName();

      DocumentData documentData = new ByteArrayDocumentData(baseName, type, bytes);
      documentData.setFilename(getFilename());

      if (getExportKey() != null)
      {
         Contexts.getEventContext().set(getExportKey(), documentData);
         return;
View Full Code Here

Examples of org.jboss.seam.document.DocumentData

      }

      String viewId = Pages.getViewId(context);
      String baseName = baseNameForViewId(viewId);

      DocumentData documentData = new DocumentData(baseName, documentType, bytes);
      String dispositionValue = (String) valueBinding(context, "disposition", disposition);
      if (dispositionValue != null)
      {
         documentData.setDisposition(dispositionValue);
      }

      String fileNameValue = (String) valueBinding(context, "fileName", fileName);
      if (fileNameValue != null)
      {
         documentData.setFilename(fileNameValue);
      }

      if (sendRedirect)
      {
         DocumentStore store = DocumentStore.instance();
View Full Code Here

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

Examples of org.jboss.seam.document.DocumentData

        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

Examples of org.jboss.seam.pdf.DocumentData

        if (signatureField != null)
        {
            bytes = signatureField.sign(bytes);
        }

        DocumentData documentData = new DocumentData(baseName, docType, bytes);

        if (sendRedirect) {
            DocumentStore.instance().saveData(id,documentData);

            ResponseWriter response = context.getResponseWriter();
View Full Code Here

Examples of org.jboss.seam.pdf.DocumentData

        if (signatureField != null)
        {
            bytes = signatureField.sign(bytes);
        }
       
        DocumentData documentData = new DocumentData(baseName, docType, bytes);
       
        if (sendRedirect) {
            DocumentStore.instance().saveData(id,documentData);

            ResponseWriter response = context.getResponseWriter();
View Full Code Here

Examples of org.jboss.seam.pdf.DocumentData

            InputStream is = (InputStream) getValue();
            ds = new ByteArrayDataSource(is, getContentType());
         }
         else if (getValue() instanceof DocumentData)
         {
            DocumentData documentData = (DocumentData) getValue();
            ds = new ByteArrayDataSource(documentData.getData(), documentData.getDocType().getMimeType());
         }
         else if (getValue() != null && getValue().getClass().isArray())
         {
            if (getValue().getClass().getComponentType().isAssignableFrom(Byte.TYPE))
            {
View Full Code Here

Examples of org.mifosplatform.infrastructure.documentmanagement.data.DocumentData

    @Override
    public FileData retrieveFileData(final String entityType, final Long entityId, final Long documentId) {
        try {
            final DocumentMapper mapper = new DocumentMapper(false, false);
            final DocumentData documentData = fetchDocumentDetails(entityType, entityId, documentId, mapper);
            final ContentRepository contentRepository = this.contentRepositoryFactory.getRepository(documentData.storageType());
            return contentRepository.fetchFile(documentData);
        } catch (final EmptyResultDataAccessException e) {
            throw new DocumentNotFoundException(entityType, entityId, documentId);
        }
    }
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.