[ 
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.

Reply via email to