Example #1
0
  protected Document loadConfiguration(String configLocation) {
    logger.debug("[IMPORT] loading " + configLocation);
    InputStream in = null;
    try {
      in = new FileInputStream(configLocation);
      if (in != null) {
        return ContentUtils.convertStreamToXml(in);
      }
    } catch (FileNotFoundException e) {
      logger.error("[IMPORT] failed to load configuration.", e);

    } catch (DocumentException e) {
      logger.error("[IMPORT] failed to load configuration.", e);

    } finally {
      ContentUtils.release(in);
    }
    return null;
  }