Class LuteceRunAfterComparator

java.lang.Object
fr.paris.lutece.plugins.liquibase.filters.LuteceRunAfterComparator
All Implemented Interfaces:
Comparator<String>

public class LuteceRunAfterComparator extends Object implements Comparator<String>
Comparator for use in the liquibase changelog config (resourceComparator attribute of includeAll). Orders the core scripts first, then every other SQL file in alphabetical path order, so that plugin scripts always run against an upgraded core schema. Plugins may also declare an explicit ordering directive in the leading comment block of any of their scripts :
 --liquibase formatted sql
 --lutece runAfter:genericattributes
 --changeset author:id
 
The rules (plugin-scoped relocation after the target, chained directives, invalid directives ignored with an ERROR log : conflicts, unknown or script-less target, self reference, core, cycles) live in RunAfterOrdering of library-sql-utils, shared with the Ant database initialization of build-config so that both mechanisms produce the same order. This class is the liquibase adapter : it scans the SQL resources of the classpath, checks the targets against the declared plugins (PluginMeta) and routes the ordering decisions to AppLogService. Like the rest of this plugin, this class is deliberately not thread-safe : liquibase runs in the single startup thread. Instantiated by liquibase itself (no-arg constructor), outside any DI.
  • Constructor Details

    • LuteceRunAfterComparator

      public LuteceRunAfterComparator()
  • Method Details