Examples of PluginConfiguration


Examples of org.jtalks.jcommune.model.entity.PluginConfiguration

    }

    @Test
    public void saveOrUpdateShouldUpdatePluginConfiguration() {
        String newPluginName = "Poulpe pluginConfiguration";
        PluginConfiguration pluginConfiguration = PersistedObjectsFactory.getDefaultPluginConfiguration();
        pluginConfiguration.setName(newPluginName);

        pluginConfigurationDao.saveOrUpdate(pluginConfiguration);
        session.flush();
        session.clear();
        PluginConfiguration updatedPluginConfiguration = (PluginConfiguration) session.get(PluginConfiguration.class, pluginConfiguration.getId());

        assertEquals(updatedPluginConfiguration.getName(), newPluginName, "After update pluginConfiguration properties must be updated.");
    }
View Full Code Here

Examples of org.jtalks.jcommune.model.entity.PluginConfiguration

        assertEquals(updatedPluginConfiguration.getName(), newPluginName, "After update pluginConfiguration properties must be updated.");
    }

    @Test
    public void saveOrUpdateShouldSaveNewPluginConfiguration() {
        PluginConfiguration newPluginConfiguration = new PluginConfiguration("New PluginConfiguration", true, Collections.<PluginProperty>emptyList());

        pluginConfigurationDao.saveOrUpdate(newPluginConfiguration);
        session.evict(newPluginConfiguration);
        PluginConfiguration savedPluginConfiguration = (PluginConfiguration) session.get(PluginConfiguration.class, newPluginConfiguration.getId());

        assertReflectionEquals(newPluginConfiguration, savedPluginConfiguration);
    }
View Full Code Here

Examples of org.jtalks.jcommune.model.entity.PluginConfiguration

        assertReflectionEquals(newPluginConfiguration, savedPluginConfiguration);
    }

    @Test
    public void saveOrUpdateShouldSavePluginConfigurationProperties() {
        PluginConfiguration pluginConfiguration = PersistedObjectsFactory.getDefaultPluginConfiguration();
        PluginProperty property = new PluginProperty("Property", PluginProperty.Type.BOOLEAN, "true");
        List<PluginProperty> properties = Arrays.asList(property);
        pluginConfiguration.setProperties(properties);

        pluginConfigurationDao.saveOrUpdate(pluginConfiguration);
        session.flush();
        session.evict(pluginConfiguration);
        PluginConfiguration updatedPluginConfiguration = (PluginConfiguration) session.get(PluginConfiguration.class, pluginConfiguration.getId());

        assertEquals(updatedPluginConfiguration.getProperties(), properties, "Plugin configuration properties should be saved.");
    }
View Full Code Here

Examples of org.jtalks.jcommune.model.entity.PluginConfiguration

        assertEquals(updatedPluginConfiguration.getProperties(), properties, "Plugin configuration properties should be saved.");
    }

    @Test(expectedExceptions = org.hibernate.exception.ConstraintViolationException.class)
    public void saveOrUpdateWithNullValuesShouldNotSavePlugin() {
        PluginConfiguration pluginConfiguration = PersistedObjectsFactory.getDefaultPluginConfiguration();

        pluginConfiguration.setName(null);
        pluginConfigurationDao.saveOrUpdate(pluginConfiguration);
        session.flush();
    }
View Full Code Here

Examples of org.jtalks.jcommune.model.entity.PluginConfiguration

        session.flush();
    }

    @Test
    public void getByNameShouldReturnOnePluginConfiguration() throws NotFoundException {
        PluginConfiguration pluginConfiguration = PersistedObjectsFactory.getDefaultPluginConfiguration();

        PluginConfiguration actual = pluginConfigurationDao.get(pluginConfiguration.getName());

        assertEquals(actual, pluginConfiguration);
    }
View Full Code Here

Examples of org.mybatis.generator.config.PluginConfiguration

      }
    }
  }

  private void parseIbatorPlugin(Context context, Node node) {
    PluginConfiguration pluginConfiguration = new PluginConfiguration();

    context.addPluginConfiguration(pluginConfiguration);

    Properties attributes = parseAttributes(node);
    String type = attributes.getProperty("type"); //$NON-NLS-1$

    pluginConfiguration.setConfigurationType(type);

    NodeList nodeList = node.getChildNodes();
    for (int i = 0; i < nodeList.getLength(); i++) {
      Node childNode = nodeList.item(i);
View Full Code Here

Examples of org.mybatis.generator.config.PluginConfiguration

  public List<GeneratedJavaFile> getGeneratedJavaFiles() {
    List<GeneratedJavaFile> answer = new ArrayList<GeneratedJavaFile>();
    boolean isExample = true;
    List<PluginConfiguration> list = context.getPluginConfigurations();
    for (int i = 0; i < list.size(); i++) {
      PluginConfiguration p = list.get(i);
      if (p.toXmlElement().getFormattedContent(0).contains("CriteriaPlugin")) {
        isExample = false;
      }
    }
    for (AbstractJavaGenerator javaGenerator : javaModelGenerators) {
      List<CompilationUnit> compilationUnits = javaGenerator.getCompilationUnits();
View Full Code Here

Examples of org.mybatis.generator.config.PluginConfiguration

      }
    }
  }

  private void parsePlugin(Context context, Node node) {
    PluginConfiguration pluginConfiguration = new PluginConfiguration();

    context.addPluginConfiguration(pluginConfiguration);

    Properties attributes = parseAttributes(node);
    String type = attributes.getProperty("type"); //$NON-NLS-1$

    pluginConfiguration.setConfigurationType(type);

    NodeList nodeList = node.getChildNodes();
    for (int i = 0; i < nodeList.getLength(); i++) {
      Node childNode = nodeList.item(i);
View Full Code Here

Examples of org.mybatis.generator.config.PluginConfiguration

    List<GeneratedJavaFile> answer = new ArrayList<GeneratedJavaFile>();

    boolean isExample = true;
    List<PluginConfiguration> list = context.getPluginConfigurations();
    for (int i = 0; i < list.size(); i++) {
      PluginConfiguration p = list.get(i);
      if (p.toXmlElement().getFormattedContent(0).contains("CriteriaPlugin")) {
        isExample = false;
      }
    }
    for (AbstractJavaGenerator javaGenerator : javaModelGenerators) {
      List<CompilationUnit> compilationUnits = javaGenerator.getCompilationUnits();
View Full Code Here

Examples of org.mybatis.generator.config.PluginConfiguration

            }
        }
    }

    private void parsePlugin(Context context, Node node) {
        PluginConfiguration pluginConfiguration = new PluginConfiguration();

        context.addPluginConfiguration(pluginConfiguration);

        Properties attributes = parseAttributes(node);
        String type = attributes.getProperty("type"); //$NON-NLS-1$

        pluginConfiguration.setConfigurationType(type);

        NodeList nodeList = node.getChildNodes();
        for (int i = 0; i < nodeList.getLength(); i++) {
            Node childNode = nodeList.item(i);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.