Package org.projectforge.plugins.core

Examples of org.projectforge.plugins.core.PluginsRegistry


    }
    for (final Class< ? > entityClass : HibernateEntities.HISTORY_ENTITIES) {
      log.debug("Adding class " + entityClass.getName());
      config.addAnnotatedClass(entityClass);
    }
    final PluginsRegistry pluginsRegistry = PluginsRegistry.instance();
    pluginsRegistry.loadPlugins();
    for (final AbstractPlugin plugin : pluginsRegistry.getPlugins()) {
      final Class< ? >[] persistentEntities = plugin.getPersistentEntities();
      if (persistentEntities != null) {
        for (final Class< ? > entity : persistentEntities) {
          log.debug("Adding class " + entity.getName());
          config.addAnnotatedClass(entity);
View Full Code Here


        .getWebApplicationContext(getServletContext());
    final ConfigurableListableBeanFactory beanFactory = webApplicationContext.getBeanFactory();
    beanFactory.autowireBeanProperties(this, AutowireCapableBeanFactory.AUTOWIRE_BY_NAME, false);
    final LocalSessionFactoryBean localSessionFactoryBean = (LocalSessionFactoryBean) beanFactory.getBean("&sessionFactory");
    final org.hibernate.cfg.Configuration hibernateConfiguration = localSessionFactoryBean.getConfiguration();
    final PluginsRegistry pluginsRegistry = PluginsRegistry.instance();
    pluginsRegistry.set(getResourceSettings());
    projectForgeApp = ProjectForgeApp.init(beanFactory, hibernateConfiguration);
    // Own error page for deployment mode and UserException and AccessException.
    getRequestCycleListeners().add(new AbstractRequestCycleListener() {
      /**
       * Log only non ProjectForge exceptions.
View Full Code Here

  }

  public static void init(final String[] additionalContextFiles, final boolean createTestData, final AbstractPlugin... plugins) throws BeansException, IOException
  {
    final List<String> persistentEntries = new ArrayList<String>();
    final PluginsRegistry pluginsRegistry = PluginsRegistry.instance();
    for (final AbstractPlugin plugin : plugins) {
      pluginsRegistry.register(plugin);
      for (final Class< ? > persistentEntry : plugin.getPersistentEntities()) {
        persistentEntries.add(persistentEntry.getName());
      }
    }
    preInit(additionalContextFiles);
    final MyDatabaseUpdater myDatabaseUpdater = getTestConfiguration().getBean("myDatabaseUpdater", MyDatabaseUpdater.class);
    pluginsRegistry.set(myDatabaseUpdater.getSystemUpdater());
    pluginsRegistry.set(getTestConfiguration().getBeanFactory());
    pluginsRegistry.set(Mockito.mock(IResourceSettings.class));
    pluginsRegistry.initialize();
    init(createTestData);
  }
View Full Code Here

TOP

Related Classes of org.projectforge.plugins.core.PluginsRegistry

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.