Project

General

Profile

Actions

Feature #33530

closed

add attribute @last-modified on element <view>

Added by Reynaud Sylvain almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Engine
Target version:
-
Start date:
06/06/2018
Due date:
% Done:

100%

Estimated time:

Description

This attribute will expect a XPath expression that returns a timestamp.

When this optional attribute is missing, default value will depend on the view:
  • if the view is cached, then the default timestamp will be the last refresh date of the cache.
  • else the default timestamp will be current date.

This timestamp will be used by the service layer to fill the Last-Modified HTTP header, using the date format described on this page: [[https://developer.mozilla.org/fr/docs/Web/HTTP/Headers/Last-Modified]].

Example usage for CMDB use-case:
  • <view name="query" xmlns:date="http://exslt.org/dates-and-times" last-modified="date:seconds(date:parse-date(view_path('status', &quot;/jmx/domain/group/mbean[@name='neo4j-populate']/attribute[@name='LastBuildDate']/value/text()&quot;), 'EEE MMM dd HH:mm:ss z yyyy'))*1000"/>
Actions #1

Updated by Reynaud Sylvain almost 3 years ago

CORRECTION:

Application developer should not have to care about this !

Instead of adding a new attribute @last-modified, Lavoisier will support a new optional plugin interface LastModifiedConnector. When this interface is not implemented, or when the view contains a section <processors/>, the default timestamp will be the current date.

Example implementation of this new interface:
  • FileConnector will return the date of the last modification of the referenced file.
  • Neo4jQueryConnector will return the date of the last update of the database.
Actions #2

Updated by Reynaud Sylvain almost 3 years ago

  • Category set to Engine
  • Status changed from New to Resolved
  • Assigned To set to Reynaud Sylvain
  • % Done changed from 0 to 100
Actions #3

Updated by Wernli Fabien almost 3 years ago

ca marche parfaitement merci !

Actions

Also available in: Atom PDF