Examples of PathLocator


Examples of org.dmlite.util.file.PathLocator

      final String jettyConfig = propertiesLocator
          .getProperty(Start.JETTY_CONFIG_KEY);
      final String log4jConfig = propertiesLocator
          .getProperty(Start.LOG_CONFIG_KEY);

      final PathLocator pathLocator = new PathLocator();
      final String log4jConfigPath = pathLocator.findAbsoluteEndPath(
          referenceClass, classesDirName, configDirName
              + File.separator + log4jConfig);
      final Log4jConfigurator log4jConfigurator = new Log4jConfigurator(
          log4jConfigPath);
      log4jConfigurator.configure();

      jettyConfigPath = pathLocator.findAbsoluteEndPath(referenceClass,
          classesDirName, configDirName + File.separator
              + jettyConfig);
    }
    catch (final Exception e)
    {
View Full Code Here

Examples of org.dmlite.util.file.PathLocator

    String classesDirName = configurator.getProperty("classes");
    String configDirName = configurator.getProperty("config");
    String emailConfigFileName = configurator.getProperty("email");
    String emailConfigRelativePath = configDirName + File.separator
        + emailConfigFileName;
    PathLocator fileLocator = new PathLocator();
    String emailConfigAbsolutePath = fileLocator.findAbsoluteEndPath(
        EmailsConfig.class, classesDirName, emailConfigRelativePath);
    return emailConfigAbsolutePath;
  }
View Full Code Here

Examples of org.dmlite.util.file.PathLocator

   * @param propertiesFileSimpleName
   *            properties file simple name
   */
  public void load(Class referenceClass, String propertiesFileSimpleName) {
    try {
      PathLocator fileLocater = new PathLocator();
      fileLocater.setClassBase(referenceClass);
      URL configUrl = fileLocater
          .getClassBasedUrl(propertiesFileSimpleName);
      InputStream inputStream = configUrl.openStream();
      clear();
      load(inputStream);
      inputStream.close();
View Full Code Here

Examples of org.dmlite.util.file.PathLocator

   * @param configDirName
   *            configuration directory name
   * @return path to the log4j config XML file
   */
  private String findConfigFilePath(String classDirName, String configDirName) {
    PathLocator fileLocator = new PathLocator();
    String log4jPath = fileLocator.findAbsoluteEndPath(
        Log4jConfigurator.class, classDirName, configDirName
            + File.separator + "log4j.xml");
    return log4jPath;
  }
View Full Code Here

Examples of org.dmlite.util.file.PathLocator

      String configDirName = propertiesLocator
          .getProperty(CONFIG_DIRECTORY_KEY);
      String log4jConfigFileName = propertiesLocator
          .getProperty(LOG_CONFIG_KEY);

      PathLocator pathLocator = new PathLocator();
      String log4jConfigFilePath = pathLocator.findAbsoluteEndPath(
          referenceClass, classDirName, configDirName
              + File.separator + log4jConfigFileName);
      Log4jConfigurator log4jConfigurator = new Log4jConfigurator(
          log4jConfigFilePath);
      log4jConfigurator.configure();
View Full Code Here

Examples of org.dmlite.util.file.PathLocator

          .getProperty(CLASS_DIRECTORY_KEY);
      String configDirName = propertiesLocator
          .getProperty(CONFIG_DIRECTORY_KEY);
      String configFileName = propertiesLocator.getProperty(key);

      PathLocator pathLocator = new PathLocator();
      filePath = pathLocator.findAbsoluteEndPath(referenceClass,
          classDirName, configDirName + File.separator
              + configFileName);

    } catch (Exception e) {
      log.error("Configuration file path error: " + e.getMessage());
View Full Code Here

Examples of org.dmlite.util.file.PathLocator

    try {
      PropertiesLocator propertiesLocator = new PropertiesLocator(
          referenceClass, DM_CONFIG_PROPERTIES_FILE_NAME);
      String classDirName = propertiesLocator
          .getProperty(CLASS_DIRECTORY_KEY);
      PathLocator pathLocator = new PathLocator();
      dataPath = pathLocator.findAbsoluteEndPath(referenceClass,
          classDirName, dataRelativePath);

    } catch (Exception e) {
      log.error("Data path error: " + e.getMessage());
    }
View Full Code Here

Examples of org.dmlite.util.file.PathLocator

      String configDirName = propertiesLocator
          .getProperty(CONFIG_DIRECTORY_KEY);
      String emailConfigFileName = propertiesLocator
          .getProperty(EMAIL_CONFIG_KEY);
      if (!emailConfigFileName.equals("????")) {
        PathLocator pathLocator = new PathLocator();
        String emailConfigFilePath = pathLocator.findAbsoluteEndPath(
            referenceClass, classDirName, configDirName
                + File.separator + emailConfigFileName);
        EmailsConfig emailsConfig = new EmailsConfig(
            emailConfigFilePath);
        config = (EmailConfig) emailsConfig.getLastEmailConfig();
View Full Code Here

Examples of org.dmlite.util.file.PathLocator

          .getProperty(CONFIG_DIRECTORY_KEY);
      String jettyConfig = propertiesLocator
          .getProperty(JETTY_CONFIG_KEY);
      String log4jConfig = propertiesLocator.getProperty(LOG_CONFIG_KEY);

      PathLocator pathLocator = new PathLocator();
      String log4jConfigPath = pathLocator.findAbsoluteEndPath(
          referenceClass, classesDirName, configDirName
              + File.separator + log4jConfig);
      Log4jConfigurator log4jConfigurator = new Log4jConfigurator(
          log4jConfigPath);
      log4jConfigurator.configure();

      jettyConfigPath = pathLocator.findAbsoluteEndPath(referenceClass,
          classesDirName, configDirName + File.separator
              + jettyConfig);
    } catch (Exception e) {
      log.error("Jetty server config load error: " + e.getMessage());
    }
View Full Code Here

Examples of org.dmlite.util.file.PathLocator

          .getProperty(CONFIG_DIRECTORY_KEY);
      String jettyConfig = propertiesLocator
          .getProperty(JETTY_CONFIG_KEY);
      String log4jConfig = propertiesLocator.getProperty(LOG_CONFIG_KEY);

      PathLocator pathLocator = new PathLocator();
      String log4jConfigPath = pathLocator.findAbsoluteEndPath(
          referenceClass, classesDirName, configDirName
              + File.separator + log4jConfig);
      Log4jConfigurator log4jConfigurator = new Log4jConfigurator(
          log4jConfigPath);
      log4jConfigurator.configure();

      jettyConfigPath = pathLocator.findAbsoluteEndPath(referenceClass,
          classesDirName, configDirName + File.separator
              + jettyConfig);
    } catch (Exception e) {
      log.error("Jetty server configuration load error: "
          + e.getMessage());
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.