Package org.projectforge.continuousdb

Examples of org.projectforge.continuousdb.UpdateEntry


    for (final AbstractPlugin plugin : PluginsRegistry.instance().getPlugins()) {
      if (plugin.isInitialized() == false) {
        // Plug-in not (yet) initialized, skip. this is normal on first start-up phase.
        continue;
      }
      final UpdateEntry updateEntry = plugin.getInitializationUpdateEntry();
      if (updateEntry != null) {
        result += updateEntry.createMissingIndices();
      }
    }
    return result;
  }
View Full Code Here


    final boolean missingDatabaseSchema = initDatabaseDao.isEmpty();
    if (missingDatabaseSchema == true) {
      try {
        PFUserContext.setUser(MyDatabaseUpdateDao.__internalGetSystemAdminPseudoUser());
        final UpdateEntry updateEntry = DatabaseCoreInitial.getInitializationUpdateEntry(myDatabaseUpdater);
        updateEntry.runUpdate();
      } finally {
        PFUserContext.setUser(null);
      }
    }

    daoRegistry.init();

    pluginsRegistry = PluginsRegistry.instance();
    pluginsRegistry.set(beanFactory);
    pluginsRegistry.set(myDatabaseUpdater.getSystemUpdater());
    pluginsRegistry.initialize();
    if (missingDatabaseSchema == true) {
      try {
        PFUserContext.setUser(MyDatabaseUpdateDao.__internalGetSystemAdminPseudoUser()); // Logon admin user.
        for (final AbstractPlugin plugin : pluginsRegistry.getPlugins()) {
          final UpdateEntry updateEntry = plugin.getInitializationUpdateEntry();
          if (updateEntry != null) {
            updateEntry.runUpdate();
          }
        }
      } finally {
        PFUserContext.setUser(null);
      }
View Full Code Here

  }

  public void set(final SystemUpdater systemUpdater)
  {
    for (final AbstractPlugin plugin : plugins) {
      final UpdateEntry updateEntry = plugin.getInitializationUpdateEntry();
      if (updateEntry != null) {
        if (updateEntry.isInitial() == false) {
          log.error("The given UpdateEntry returned by plugin.getInitializationUpdateEntry() is not initial! Please use constructor without parameter version: "
              + plugin.getClass());
        }
        systemUpdater.register(updateEntry);
      }
View Full Code Here

TOP

Related Classes of org.projectforge.continuousdb.UpdateEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.