Examples of PropertiesLocator


Examples of org.dmlite.util.config.PropertiesLocator

  {
    String jettyConfigPath = null;
    final Class referenceClass = Start.class;
    try
    {
      final PropertiesLocator propertiesLocator = new PropertiesLocator(
          referenceClass, Start.START_PROPERTIES_FILE_NAME);
      final String classesDirName = propertiesLocator
          .getProperty(Start.CLASSES_DIRECTORY_KEY);
      final String configDirName = propertiesLocator
          .getProperty(Start.CONFIG_DIRECTORY_KEY);
      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
View Full Code Here

Examples of org.dmlite.util.config.PropertiesLocator

   */
  private static String findJettyConfigPath() {
    String jettyConfigPath = null;
    Class referenceClass = Start.class;
    try {
      PropertiesLocator propertiesLocator = new PropertiesLocator(
          referenceClass, START_PROPERTIES_FILE_NAME);
      String classesDirName = propertiesLocator
          .getProperty(CLASS_DIRECTORY_KEY);
      String configDirName = propertiesLocator
          .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);
View Full Code Here

Examples of org.dmlite.util.config.PropertiesLocator

   * Configures log.
   */
  private void configureLog() {
    Class referenceClass = this.getClass();
    try {
      PropertiesLocator propertiesLocator = new PropertiesLocator(
          referenceClass, DM_CONFIG_PROPERTIES_FILE_NAME);
      String classDirName = propertiesLocator
          .getProperty(CLASS_DIRECTORY_KEY);
      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
View Full Code Here

Examples of org.dmlite.util.config.PropertiesLocator

   */
  protected String findConfigFilePath(String key) {
    String filePath = null;
    Class referenceClass = this.getClass();
    try {
      PropertiesLocator propertiesLocator = new PropertiesLocator(
          referenceClass, DM_CONFIG_PROPERTIES_FILE_NAME);
      String classDirName = propertiesLocator
          .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);
View Full Code Here

Examples of org.dmlite.util.config.PropertiesLocator

   */
  protected String findDataPath(String dataRelativePath) {
    String dataPath = null;
    Class referenceClass = this.getClass();
    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);

View Full Code Here

Examples of org.dmlite.util.config.PropertiesLocator

   */
  private EmailConfig findEmailConfig() {
    EmailConfig config = null;
    Class referenceClass = this.getClass();
    try {
      PropertiesLocator propertiesLocator = new PropertiesLocator(
          referenceClass, DM_CONFIG_PROPERTIES_FILE_NAME);
      String classDirName = propertiesLocator
          .getProperty(CLASS_DIRECTORY_KEY);
      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
View Full Code Here

Examples of org.dmlite.util.config.PropertiesLocator

  private static String findJettyConfigPath() {
    String jettyConfigPath = null;
    Class referenceClass = Start.class;
    try {
      PropertiesLocator propertiesLocator = new PropertiesLocator(
          referenceClass, START_PROPERTIES_FILE_NAME);
      String classesDirName = propertiesLocator
          .getProperty(CLASS_DIRECTORY_KEY);
      String configDirName = propertiesLocator
          .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);
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.