cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Gallardo" <agalla...@agssa.net>
Subject Re: Flowscript and return to pipeline
Date Thu, 26 Feb 2004 09:46:36 GMT
Stephan Coboos dijo:
> is more easier to understand than this:
>
> <map:match pattern="first">
>    <map:call function="getValues"/>
> </map:match>
>
> <map:match pattern="second">
>    <map:generate type="jxt"/>
>    <map:serialize/>
> </map:match>
>


Did you already saw the advantage of this?:

<map:pipeline>
  <map:match pattern="first">
     <map:call function="getValues"/>
  </map:match>
</map:pipeline>

<map:pipeline internal-only="true">
  <map:match pattern="second">
     <map:generate type="jxt"/>
     <map:serialize/>
  </map:match>
</map:pipeline>

No matter how they will try to go to "second" they MUST go through
"first". I like this feature of flow. :-D

AFAIK, in a webapp you can also review the authentication and authorization:

<map:pipeline internal-only="true">
  <map:match pattern="fo-*.pdf">
    <map:generate src="docs/informes/fo-{1}"/>
    <map:transform src="stylesheets/fo-{1}2fo.xsl"/>
    <map:serialize type="fo2pdf"/>
  </map:match>
  ...
</map:pipeline>

<map:pipeline>
  <map:match pattern="*">
    <map:call function="protect">
      <map:parameter name="handler" value="authhandler"/>
      <map:parameter name="protected-internal" value="{1}"/>
      <map:parameter name="failure-redirect" value="/login?resource={1}"/>
    </map:call>
  </map:match>
</map:pipeline>

Instead of the old approach using actions:

<!-- PDF docs -->
<map:match pattern="*-*.pdf">
  <map:act type="auth-protect">
    <map:parameter name="handler" value="auth_handler"/>
    <map:act type="xsp-action"
              src="resources/xsp-actions/auth-control-access.xsp">
      <map:parameter name="handler" value="auth_handler"/>
      <map:parameter name="authorisation" value="pdf_docs"/>
      <!-- Output PDF docs -->
        <map:match pattern="fo-*.pdf">
          <map:generate src="docs/informes/fo-{1}"/>
          <map:transform src="stylesheets/fo-{1}2fo.xsl"/>
	  <map:serialize type="fo2pdf"/>
        </map:match>
    </map:act>
  </map:act>
</map:match>

What is easier? For sure using Flow. :-D

Best Regards,

Antonio Gallardo.

Mime
View raw message