• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openmrs / openmrs-core / 20784346756

07 Jan 2026 02:13PM UTC coverage: 63.283%. First build
20784346756

push

github

web-flow
TRUNK-6418 Run liquibase checks and data imports only when version of core or modules changes (#5603)

* TRUNK-6418: Run liquibase checks and data imports only when version of core or modules changes

(cherry picked from commit 4723e71c3)

* TRUNK-6418: Follow up adjustments

---------

Co-authored-by: IamMujuziMoses <mujuzimoses@gmail.com>

49 of 112 new or added lines in 9 files covered. (43.75%)

23080 of 36471 relevant lines covered (63.28%)

0.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/api/src/main/java/org/openmrs/module/ModuleActivator.java
1
/**
2
 * This Source Code Form is subject to the terms of the Mozilla Public License,
3
 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
4
 * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
5
 * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
6
 *
7
 * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
8
 * graphic logo is a trademark of OpenMRS Inc.
9
 */
10
package org.openmrs.module;
11

12
/**
13
 * Contains methods that get called at different stages as the application is executing, you should
14
 * extend {@link BaseModuleActivator} instead of directly implementing this interface for forward
15
 * compatibility of subclasses.
16
 * 
17
 * @see BaseModuleActivator
18
 * @since 1.7
19
 */
20
public interface ModuleActivator {
21
        
22
        /**
23
         * Called just before spring's application context is refreshed, this method is called multiple
24
         * times i.e. whenever a new module gets started, at application startup or a developer chooses
25
         * to refresh the context.
26
         */
27
        public void willRefreshContext();
28
        
29
        /**
30
         * Called after spring's application context is refreshed , this method is called multiple times
31
         * i.e. whenever a new module gets started and at application startup.
32
         */
33
        public void contextRefreshed();
34
        
35
        /**
36
         * Called after a module has been loaded but before the application context is refreshed, at
37
         * this point the module's service methods aren't yet available so they can't be called. <br>
38
         * <br>
39
         * This method will be authenticated as the Daemon user and have all privileges.
40
         */
41
        public void willStart();
42
        
43
        /**
44
         * Called after a module is started, the application context has been refreshed and the module's
45
         * service methods are ready to be called.
46
         */
47
        public void started();
48
        
49
        /**
50
         * Called just before a module is stopped
51
         */
52
        public void willStop();
53
        
54
        /**
55
         * Called after a module is stopped
56
         */
57
        public void stopped();
58
        
59
        /**
60
         * Called before Liquibase runs, but only if core or this module version changed.
61
         * 
62
         * @param previousCoreVersion previous core version or <code>null</code> if first install
63
         * @param previousModuleVersion previous module version or <code>null</code> if first install   
64
         * @since 2.9.0
65
         */
NEW
66
        default void setupOnVersionChangeBeforeSchemaChanges(String previousCoreVersion, String previousModuleVersion) {}
×
67
        
68
        /**
69
         * Called after Liquibase runs, but only if core or this module version changed.
70
         * 
71
         * @param previousCoreVersion previous core version or <code>null</code> if first install
72
         * @param previousModuleVersion previous module version or <code>null</code> if first install   
73
         * @since 2.9.0
74
         */
75
        default void setupOnVersionChange(String previousCoreVersion, String previousModuleVersion) {}
1✔
76
        
77
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc