Package org.jtalks.jcommune.plugin.api.filters

Examples of org.jtalks.jcommune.plugin.api.filters.NameFilter


        component.setId(componentId);
        List<Plugin> pluginList = Arrays.asList((Plugin) new DummyPlugin());

        when(componentService.getComponentOfForum()).thenReturn(component);
        when(pluginService.getPluginConfiguration(configuredPluginName, componentId)).thenReturn(expectedConfiguration);
        when(pluginLoader.getPlugins(new NameFilter(configuredPluginName))).thenReturn(pluginList);

        ModelAndView pluginConfigModelAndView = pluginController.startConfiguringPlugin(configuredPluginName);

        assertViewName(pluginConfigModelAndView, "plugin/pluginConfiguration");
        assertModelAttributeAvailable(pluginConfigModelAndView, "pluginConfiguration");
View Full Code Here


     * @param configuration current plugin configuration
     * @return ModelAndView
     */
    private ModelAndView getModel(PluginConfiguration configuration) {
        Map<String, String> labels = new HashMap<>();
        List<Plugin> plugins = pluginLoader.getPlugins(new NameFilter(configuration.getName()));
        if (!plugins.isEmpty()) {
            Plugin plugin = plugins.get(0);
            if (plugin != null) {
                labels = translatePropertiesLabels(configuration.getProperties(), plugin);
            }
View Full Code Here

        PluginConfiguration configuration = pluginConfigurationDao.get(pluginName);
        boolean isActivated = updatedPlugin.isActivated();
        LOGGER.debug("Plugin activation for {} will be changed to {}.", pluginName, isActivated);
        configuration.setActive(isActivated);
        pluginConfigurationDao.saveOrUpdate(configuration);
        pLuginLoader.reloadPlugins(new NameFilter(updatedPlugin.getPluginName()));
    }
View Full Code Here

TOP

Related Classes of org.jtalks.jcommune.plugin.api.filters.NameFilter

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.