cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scherler....@juntadeandalucia.es>
Subject Re: Input module to return absolute file location of a block
Date Wed, 07 Nov 2007 07:45:16 GMT
On Tue, 2007-11-06 at 21:08 +0100, Grzegorz Kossakowski wrote:
> Thorsten Scherler pisze:
> > Hi all,
> > 
> > I found BlockPathModule.java and BlockCompletePathModule to return the
> > servlet path for a block.
> > 
> > However I need an input module which returns me the full file path
> > location of the base dir of a block.
> > 
> > Like {block-filepath:blockName} e.g. {block-filepath:myBlock1} would
> > return /home/me/myCocoon/blocks/myblock1.
> > 
> > Not sure whether I have not found the module or whether there is not yet
> > such a module.
> > 
> > TIA for any information.
> 
> There is a block-context: module AFAIR but it's meant for internal use only.
> 
> My question is: why do you need such module?

I am porting ATM the dispatcher (forrest plugin) to a cocoon block. This
forrest plugin makes use of different contracts. 

This contracts can be stored in different locations and the dispatcher
makes use of the locationmap to resolve the contract we are going to
use.

Till now forrest projects have been very open to be overridden via our
properties system and we offer a elaborated fallback mechanism via the
locationmap to the user.

The idea is to allow the user to override certain properties and
locations via the project locationmap. There is one principal property
(in the dispatcher) which points to the full uri (most likely in the
file system). 

<!-- Base location of the builded dispatcher plugin-->
    <match pattern="dispatcher.home">
      <location src="{global:dispatcher.home}"/>
    </match>

...but I thought about it and I think I can solve the problem a wee bit
different since it is caused by a slight overkill of customization. 

Will keep you informant which route I finally took.

Thanks for the pointer.

salu2


> 
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message