Package org.impalaframework.module.definition

Examples of org.impalaframework.module.definition.SimpleBeansetModuleDefinition


    Map<String, Set<String>> map2 = new HashMap<String, Set<String>>();
    map2.put("key1", set2);
    map2.put("key2", set4);

    SimpleBeansetModuleDefinition p1a = new SimpleBeansetModuleDefinition("p1", map1);
    SimpleBeansetModuleDefinition p1b = new SimpleBeansetModuleDefinition("p1", map2);

    assertEquals(p1a, p1b);
  }
View Full Code Here


    assertEquals(p1a, p1b);
  }

  public void testStringDefinition() {
    assertEquals(new SimpleBeansetModuleDefinition("p1", "key1: set1, set2; key2: set3, set4"),
        new SimpleBeansetModuleDefinition("p1", "key2: set4, set3; key1: set1, set2"));
   
    //no override specified for key 3, but result is still the same
    assertEquals(new SimpleBeansetModuleDefinition("p1", "key1: set1, set2; key2: set3, set4"),
        new SimpleBeansetModuleDefinition("p1", "key2: set4, set3; key1: set1, set2; key3: "));
  }
View Full Code Here

    if (StringUtils.hasText(contextLocations)) {
      contextLocationsArray = StringUtils.tokenizeToStringArray(contextLocations, ", ", true, true);
    }
   
    String overrides = properties.getProperty(ModuleElementNames.OVERRIDES_ELEMENT);
    return new SimpleBeansetModuleDefinition(parent, moduleName, contextLocationsArray, overrides);
  }
View Full Code Here

      String moduleName, Element definitionElement) {
    List<String> contextLocations = TypeReaderUtils.readContextLocations(definitionElement);
   
    String[] locationsArray = contextLocations.toArray(new String[contextLocations.size()]);
    String overrides = XmlDomUtils.readOptionalElementText(definitionElement, ModuleElementNames.OVERRIDES_ELEMENT);
    return new SimpleBeansetModuleDefinition(parent, moduleName, locationsArray, overrides);
  }
View Full Code Here

    if (StringUtils.hasText(contextLocations)) {
      contextLocationsArray = StringUtils.tokenizeToStringArray(contextLocations, ", ", true, true);
    }
   
    String overrides = properties.getProperty(ModuleElementNames.OVERRIDES_ELEMENT);
    return new SimpleBeansetModuleDefinition(parent, moduleName, contextLocationsArray, overrides);
  }
View Full Code Here

      String moduleName, Element definitionElement) {
    List<String> contextLocations = TypeReaderUtils.readContextLocations(definitionElement);
   
    String[] locationsArray = contextLocations.toArray(new String[contextLocations.size()]);
    String overrides = XmlDomUtils.readOptionalElementText(definitionElement, ModuleElementNames.OVERRIDES_ELEMENT);
    return new SimpleBeansetModuleDefinition(parent, moduleName, locationsArray, overrides);
  }
View Full Code Here

    if (StringUtils.hasText(configLocations)) {
      configLocationsArray = StringUtils.tokenizeToStringArray(configLocations, ", ", true, true);
    }
   
    String overrides = properties.getProperty(OVERRIDES_ELEMENT);
    return new SimpleBeansetModuleDefinition(parent, moduleName, configLocationsArray, overrides);
  }
View Full Code Here

      String moduleName, Element definitionElement) {
    List<String> configLocations = TypeReaderUtils.readContextLocations(definitionElement);
   
    String[] locationsArray = configLocations.toArray(new String[configLocations.size()]);
    String overrides = XMLDomUtils.readOptionalElementText(definitionElement, OVERRIDES_ELEMENT);
    return new SimpleBeansetModuleDefinition(parent, moduleName, locationsArray, overrides);
  }
View Full Code Here

          // doDefinitionSplit() will check this, but just to make sure
          Assert.isTrue(closeBracketIndex > openBracketIndex);
          String name = moduleName.substring(0, openBracketIndex);
          String beanSetString = moduleName.substring(openBracketIndex + 1, closeBracketIndex);
          if (StringUtils.hasText(beanSetString))
            new SimpleBeansetModuleDefinition(moduleDefinition, name.trim(), beanSetString.trim());
          else
            new SimpleBeansetModuleDefinition(moduleDefinition, name.trim());
        }
      }
    }
    return moduleDefinition;
  }
View Full Code Here

TOP

Related Classes of org.impalaframework.module.definition.SimpleBeansetModuleDefinition

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.