private ConfigGroup getGlobalConfiguration() {
   // Global Configurations used by many of Drools Workbench editors
   final ConfigGroup group =
       configurationFactory.newConfigGroup(ConfigType.GLOBAL, GLOBAL_SETTINGS, "");
   group.addConfigItem(configurationFactory.newConfigItem("build.enable-incremental", "true"));
   return group;
 }
Ejemplo n.º 2
0
  private ConfigGroup getGlobalConfiguration() {
    final ConfigGroup group =
        configurationFactory.newConfigGroup(ConfigType.GLOBAL, GLOBAL_SETTINGS, "");

    /*
    group.addConfigItem( configurationFactory.newConfigItem( "drools.dateformat",
            "dd-MMM-yyyy" ) );
    group.addConfigItem( configurationFactory.newConfigItem( "drools.datetimeformat",
            "dd-MMM-yyyy hh:mm:ss" ) );
    group.addConfigItem( configurationFactory.newConfigItem( "drools.defaultlanguage",
            "en" ) );
    group.addConfigItem( configurationFactory.newConfigItem( "drools.defaultcountry",
            "US" ) );
    */

    group.addConfigItem(configurationFactory.newConfigItem("build.enable-incremental", "true"));
    group.addConfigItem(configurationFactory.newConfigItem("support.runtime.deploy", "true"));

    /*
    group.addConfigItem( configurationFactory.newConfigItem( "rule-modeller-onlyShowDSLStatements",
            "false" ) );
    group.addConfigItem( configurationFactory.newConfigItem( "designer.url",
            "http://localhost:8080" ) );
    group.addConfigItem( configurationFactory.newConfigItem( "designer.context",
            "designer" ) );
    group.addConfigItem( configurationFactory.newConfigItem( "designer.profile",
            "jbpm" ) );
    */

    return group;
  }
Ejemplo n.º 3
0
 private ConfigGroup getGlobalConfiguration() {
   // Global Configurations used by many of Drools Workbench editors
   final ConfigGroup group =
       configurationFactory.newConfigGroup(ConfigType.GLOBAL, GLOBAL_SETTINGS, "");
   group.addConfigItem(configurationFactory.newConfigItem("drools.dateformat", "dd-MMM-yyyy"));
   group.addConfigItem(
       configurationFactory.newConfigItem("drools.datetimeformat", "dd-MMM-yyyy hh:mm:ss"));
   group.addConfigItem(configurationFactory.newConfigItem("drools.defaultlanguage", "en"));
   group.addConfigItem(configurationFactory.newConfigItem("drools.defaultcountry", "US"));
   group.addConfigItem(configurationFactory.newConfigItem("build.enable-incremental", "true"));
   group.addConfigItem(
       configurationFactory.newConfigItem("rule-modeller-onlyShowDSLStatements", "false"));
   return group;
 }
Ejemplo n.º 4
0
  @Override
  public Repository createRepository(
      final String scheme,
      final String alias,
      final RepositoryEnvironmentConfigurations repositoryEnvironmentConfigurations) {

    if (configuredRepositories.containsAlias(alias)) {
      throw new RepositoryAlreadyExistsException(alias);
    }

    Repository repo = null;
    try {
      configurationService.startBatch();
      final ConfigGroup repositoryConfig =
          configurationFactory.newConfigGroup(REPOSITORY, alias, "");
      repositoryConfig.addConfigItem(
          configurationFactory.newConfigItem("security:groups", new ArrayList<String>()));

      if (!repositoryEnvironmentConfigurations.containsConfiguration(SCHEME)) {
        repositoryConfig.addConfigItem(configurationFactory.newConfigItem(SCHEME, scheme));
      }

      for (final RepositoryEnvironmentConfiguration configuration :
          repositoryEnvironmentConfigurations.getConfigurationList()) {
        repositoryConfig.addConfigItem(getRepositoryConfigItem(configuration));
      }

      repo = createRepository(repositoryConfig);
      return repo;
    } catch (final Exception e) {
      logger.error("Error during create repository", e);
      throw new RuntimeException(e);
    } finally {
      configurationService.endBatch();
      if (repo != null) {
        event.fire(new NewRepositoryEvent(repo));
      }
    }
  }