forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Unico Hommes <un...@apache.org>
Subject Re: Locationmap API and java
Date Fri, 15 Jul 2005 12:58:40 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Thorsten,

Thorsten Scherler wrote:
> Hi devs,
> 
> I 'promoted' the locationmap over in lenya and some questions caught me
> red handed:
> 
> 
>>><map:read src="{lm:resources/shared/css/{3}.css}"
>>
>>How would that be used from Java classes?
>>
>>Like I would use sourceResolver.resolveURI("fallback://..."),
>>is there a Java API for LocationMaps, or is it accessible as an
>>InputModule only?

No LocationMap API no, the functionality is only available as an
InputModule, wich is in fact an API itself so should be no problem there.


InputModule lmm = (InputModule) m_manager.lookup(InputModule.ROLE +
"/locationmap");

String location = lmm.getVariable(moduleString, null, objectModel);

> 
> 
> Maybe somebody can help me out here. I am still only looking at the
> classes and not into them. ;-)
> 
> ...and 
> 
>>Another point: How would loops be implemented?
>>You have a chain of parents. Is it possible to use recursion?

If you implement a locationmap source protocol you get recursion for
free. Continuing with the example code above:

Source s = sourceResolver.resolveURI(location);

s of course could be a LocationMapSource itself.


- --
Unico
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFC17MAcuec8tVNKAwRAoNxAJ4mGyHTSP8x6TqDvsb1biVKKzjNPgCghkZM
d3nL6HCuJsOUjeTxf+ocHYo=
=hH+5
-----END PGP SIGNATURE-----


Mime
View raw message