Advertisement
Guest User

Untitled

a guest
Jul 6th, 2018
69
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None
  1. public void started() {
  2. log.info("Started Dermatology");
  3. GlobalProperty installedVersion = Context.getAdministrationService().getGlobalPropertyObject(
  4. DermatologyConstants.INSTALLED_VERSION_GP);
  5. if (installedVersion == null) {
  6. installedVersion = new GlobalProperty(DermatologyConstants.INSTALLED_VERSION_GP, "0");
  7. }
  8. if (Integer.valueOf(installedVersion.getPropertyValue()) < DermatologyConstants.METADATA_VERSION) {
  9. //Context.flushSession(); //Flush so that purges are not deferred until after data import
  10. DataImporter dataImporter = Context.getRegisteredComponent("dataImporter", DataImporter.class);
  11. dataImporter.importData("metadata-concepts.xml");
  12. installedVersion.setPropertyValue(DermatologyConstants.METADATA_VERSION.toString());
  13. }
  14. Context.getAdministrationService().saveGlobalProperty(installedVersion);
  15. }
Advertisement
RAW Paste Data Copied
Advertisement