You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Nils Kaiser (JIRA)" <ji...@apache.org> on 2007/07/31 14:42:52 UTC

[jira] Created: (COCOON-2100) Retrieving mimeType returned by pipeline executed from Flow

Retrieving mimeType returned by pipeline executed from Flow
-----------------------------------------------------------

                 Key: COCOON-2100
                 URL: https://issues.apache.org/jira/browse/COCOON-2100
             Project: Cocoon
          Issue Type: Improvement
          Components: - Flowscript, Blocks: Java Flow
    Affects Versions: 2.1.10
            Reporter: Nils Kaiser
            Priority: Minor


It is impossible to access the mimetype when executing a pipeline using PipelineUtil.processToStream. Inside this method, the mimetype should be accessible via the method Source.getMimeType().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COCOON-2100) Retrieving mimeType returned by pipeline executed from Flow

Posted by "Nils Kaiser (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COCOON-2100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nils Kaiser updated COCOON-2100:
--------------------------------

    Other Info: [Patch available]

> Retrieving mimeType returned by pipeline executed from Flow
> -----------------------------------------------------------
>
>                 Key: COCOON-2100
>                 URL: https://issues.apache.org/jira/browse/COCOON-2100
>             Project: Cocoon
>          Issue Type: Improvement
>          Components: - Flowscript, Blocks: Java Flow
>    Affects Versions: 2.1.10
>            Reporter: Nils Kaiser
>            Priority: Minor
>         Attachments: SitemapSource-PipelineUtil.patch
>
>
> It is impossible to access the mimetype when executing a pipeline using PipelineUtil.processToStream. Inside this method, the mimetype should be accessible via the method Source.getMimeType().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COCOON-2100) Retrieving mimeType returned by pipeline executed from Flow

Posted by "Nils Kaiser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COCOON-2100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516687 ] 

Nils Kaiser commented on COCOON-2100:
-------------------------------------

I could fix this issue as we have built a work-around here. But it is not a clean solution, and I could need some help on how to solve it. Here is what I could imagine: 

1)
- Create a class PipelineResult, with methods byte[] getContent() and String getMimeType().
- Add a method to PipelineUtil:
  public PipelineResult processToResult(String uri, Object viewData)

2) 
- Add a method to PipelineUtil with a different name, allowing to retrieve the mimetype:
  public String processToStreamEx(String uri, Object viewData, OutputStream output)


I had to patch SitemapSource in order to access the mimetype as the member was not set. Patch submitted.

> Retrieving mimeType returned by pipeline executed from Flow
> -----------------------------------------------------------
>
>                 Key: COCOON-2100
>                 URL: https://issues.apache.org/jira/browse/COCOON-2100
>             Project: Cocoon
>          Issue Type: Improvement
>          Components: - Flowscript, Blocks: Java Flow
>    Affects Versions: 2.1.10
>            Reporter: Nils Kaiser
>            Priority: Minor
>
> It is impossible to access the mimetype when executing a pipeline using PipelineUtil.processToStream. Inside this method, the mimetype should be accessible via the method Source.getMimeType().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COCOON-2100) Retrieving mimeType returned by pipeline executed from Flow

Posted by "Nils Kaiser (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COCOON-2100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nils Kaiser updated COCOON-2100:
--------------------------------

    Attachment: SitemapSource-PipelineUtil.patch

Added patch for the second solution. Includes patch to SitemapSource.

> Retrieving mimeType returned by pipeline executed from Flow
> -----------------------------------------------------------
>
>                 Key: COCOON-2100
>                 URL: https://issues.apache.org/jira/browse/COCOON-2100
>             Project: Cocoon
>          Issue Type: Improvement
>          Components: - Flowscript, Blocks: Java Flow
>    Affects Versions: 2.1.10
>            Reporter: Nils Kaiser
>            Priority: Minor
>         Attachments: SitemapSource-PipelineUtil.patch
>
>
> It is impossible to access the mimetype when executing a pipeline using PipelineUtil.processToStream. Inside this method, the mimetype should be accessible via the method Source.getMimeType().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.