cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: Sources, Components and cocoon.xmap
Date Tue, 07 May 2002 20:55:36 GMT
> From: Stephan Michels [mailto:stephan@vern.chem.tu-berlin.de]
> 
> Hi,
> 
> It is possible for components in the cocoon.xmap to get source over
> the SourceResolver from the sitemap.
> 
> cocoon.xconf:
>  <component role=".." class=".." logger="..">
>   <entry source="cocoon://..."/>
>  </component>
> 
> My second question is about the validity of sources. Is this
> the correct way to test if a file has changed?
> 
> resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
  validity = resolver.resolveURI("file://...").getValidity();

 
> [...after a time delay..]
 
  newValidity = resolver.resolveURI("file://...").getValidity();
  if (!validity.isValid(newValidity))
> {
>   // For a new source, if the file has changed
>   source = resolver.resolveURI(reference);
>   [ do something ]
> }
> 
> Tanks, Stephan Michels.

But usually, this is not required because cacheable objects which
dependent on other cacheable objects just create appropriate compound
validity for themselves and do not check validity of objects they depend
upon.

Vadim



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message