Examples of PropertyLoader


Examples of com.asakusafw.thundergate.runtime.property.PropertyLoader

        assertThat(provider.getExportCommand(context).size(), is(1));
        assertThat(provider.getFinalizeCommand(context).size(), is(1));
    }

    private BulkLoaderScript loadScript(JobflowInfo info) throws IOException {
        PropertyLoader loader = new PropertyLoader(info.getPackageFile(), "default");
        BulkLoaderScript script;
        try {
            List<ImportTable> importers = ImportTable.fromProperties(
                    loader.loadImporterProperties(),
                    getClass().getClassLoader());
            List<ExportTable> exporters = ExportTable.fromProperties(
                    loader.loadExporterProperties(),
                    getClass().getClassLoader());
            script = new BulkLoaderScript(importers, exporters);
        } finally {
            loader.close();
        }
        return script;
    }
View Full Code Here

Examples of com.asakusafw.thundergate.runtime.property.PropertyLoader

     * @param targetName ターゲット名
     * @return プロパティオブジェクト
     * @throws IOException プロパティの取得に失敗した場合
     */
    protected Properties getImportProp(File file, String targetName) throws IOException {
        PropertyLoader loader = new PropertyLoader(file, targetName);
        try {
            return loader.loadImporterProperties();
        } finally {
            loader.close();
        }
    }
View Full Code Here

Examples of com.asakusafw.thundergate.runtime.property.PropertyLoader

     * @param targetName ターゲット名
     * @return プロパティオブジェクト
     * @throws IOException プロパティの取得に失敗した場合
     */
    protected Properties getExportProp(File file, String targetName) throws IOException {
        PropertyLoader loader = new PropertyLoader(file, targetName);
        try {
            return loader.loadExporterProperties();
        } finally {
            loader.close();
        }
    }
View Full Code Here

Examples of com.betfair.cougar.util.configuration.PropertyLoader

    public void runLogInitialisation(Class logBootstrapClass) {

        try {
            //Construct a set of resources to attempt to load initial log config from
            Resource defaultConfig = new ClassPathResource(configDir + "/cougar-core-defaults.properties");
            PropertyLoader pl = new PropertyLoader(defaultConfig, "overrides.properties");
            //Build a merged properties file that contains the above as well as System properties
            Properties properties = pl.buildConsolidatedProperties();

            LogBootstrap logBootstrap = (LogBootstrap)logBootstrapClass.newInstance();
            //fire it up with the full set of merged properties
            logBootstrap.init(properties);
        } catch (Exception ex) {
View Full Code Here

Examples of com.codingcrayons.aspectfaces.properties.PropertyLoader

  private String namePattern;
  private String profilesDelimiter;
  private String userRolesDelimiter;

  public SavingPlugin() throws ConfigurationFileNotFoundException, ConfigurationParsingException {
    PropertyLoader loader = new PropertyLoader(PROPERTIES_FILE);
    outputDirectory = loader.getProperty("output", DEFAULT_OUTPUT_DIRECTORY);
    namePattern = loader.getProperty("name-pattern", DEFAULT_NAME_PATTERN);
    profilesDelimiter = loader.getProperty("profiles-delimiter", DEFAULT_PROFILE_DELIMITER);
    userRolesDelimiter = loader.getProperty("user-roles-delimiter", DEFAULT_USER_ROLES_DELIMITER);
  }
View Full Code Here

Examples of com.codingcrayons.aspectfaces.properties.PropertyLoader

   *
   * @throws ConfigurationFileNotFoundException, ConfigurationParsingException
   */
  public static void init() throws ConfigurationFileNotFoundException, ConfigurationParsingException {
    LOGGER.trace("Loading properties from {}.", PROPERTIES_FILE);
    PropertyLoader loader = new PropertyLoader(PROPERTIES_FILE);
    AFWeaver.init(loader);
  }
View Full Code Here

Examples of com.codingcrayons.aspectfaces.properties.PropertyLoader

   * @param input - input stream of properties file
   * @throws ConfigurationFileNotFoundException, ConfigurationParsingException
   */
  public static void init(InputStream input) throws ConfigurationFileNotFoundException, ConfigurationParsingException {
    LOGGER.trace("Loading properties from input stream");
    PropertyLoader loader = new PropertyLoader(input);
    AFWeaver.init(loader);
  }
View Full Code Here

Examples of com.codingcrayons.aspectfaces.properties.PropertyLoader

    assertEquals(test, "true");
  }

  @Test
  public void testGettingPropertyNotNull() throws IOException {
    PropertyLoader loader = new PropertyLoader(new StringReader("test=true"));
    String test = loader.getProperty("test");
    assertNotNull(test);
  }
View Full Code Here

Examples of com.codingcrayons.aspectfaces.properties.PropertyLoader

    assertNotNull(test);
  }

  @Test
  public void testGettingPropertyNull() throws IOException {
    PropertyLoader loader = new PropertyLoader(new StringReader("test=true"));
    String test = loader.getProperty("true");
    assertNull(test);
  }
View Full Code Here

Examples of com.codingcrayons.aspectfaces.properties.PropertyLoader

    assertNull(test);
  }

  @Test
  public void testNotUsingDefaultValue() throws IOException {
    PropertyLoader loader = new PropertyLoader(new StringReader("test=true"));
    String test = loader.getProperty("test", "false");
    assertEquals(test, "true");
  }
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.