Examples of PropertiesHelper


Examples of cn.org.rapid_framework.generator.util.PropertiesHelper

  private GeneratorProperties(){}
 
  private static void loadProperties() {
    try {
      System.out.println("Load [generator.properties] from classpath");
      props = new PropertiesHelper(loadAllPropertiesByClassLoader(PROPERTIES_FILE_NAME));
     
      String basepackage = getRequiredProperty("basepackage");
      String basepackage_dir = basepackage.replace('.', '/');
      props.setProperty("basepackage_dir", basepackage_dir);
      props.setProperty("createDate", format.format(new Date()));
View Full Code Here

Examples of cn.org.rapid_framework.generator.util.PropertiesHelper

  public static void setProperty(String key,String value) {
    getHelper().setProperty(key, value);
  }
 
  public static void setProperties(Properties v) {
    props = new PropertiesHelper(v);
  }
View Full Code Here

Examples of cn.org.rapid_framework.generator.util.PropertiesHelper

  }
 
  private static PropertiesHelper getHelper() {
    Properties fromContext = GeneratorContext.getGeneratorProperties();
    if(fromContext != null) {
      return new PropertiesHelper(fromContext,true);
    }
    return propertiesHelper;
  }
View Full Code Here

Examples of cn.org.rapid_framework.generator.util.PropertiesHelper

    GLogger.debug("[setProperty()] "+key+"="+value);
    getHelper().setProperty(key, value);
  }

  public static void setProperties(Properties inputProps) {
    propertiesHelper = new PropertiesHelper(inputProps,true);
        for(Iterator it = propertiesHelper.entrySet().iterator();it.hasNext();) {
            Map.Entry entry = (Map.Entry)it.next();
//            assertPropertyKey(entry.getKey().toString());
            GLogger.debug("[Property] "+entry.getKey()+"="+entry.getValue());
        }
View Full Code Here

Examples of cn.org.rapid_framework.generator.util.PropertiesHelper

    PropertyPlaceholderConfigurerResolver propertyPlaceholderConfigurerResolver = new PropertyPlaceholderConfigurerResolver(props);
    return helper.replacePlaceholders(v, propertyPlaceholderConfigurerResolver);
  }
 
  public static void setProperties(Properties inputProps) {
    props = new PropertiesHelper(resolveProperties(inputProps),true);
        for(Iterator it = props.entrySet().iterator();it.hasNext();) {
            Map.Entry entry = (Map.Entry)it.next();
            GLogger.println("[Property] "+entry.getKey()+"="+entry.getValue());
        }
        GLogger.println("");
View Full Code Here

Examples of cn.org.rapid_framework.util.PropertiesHelper

  public Object plugin(Object target) {
    return Plugin.wrap(target, this);
  }

  public void setProperties(Properties properties) {
    String dialectClass = new PropertiesHelper(properties).getRequiredString("dialectClass");
    try {
      dialect = (Dialect)Class.forName(dialectClass).newInstance();
    } catch (Exception e) {
      throw new RuntimeException("cannot create dialect instance by dialectClass:"+dialectClass,e);
    }
View Full Code Here

Examples of cn.org.rapid_framework.util.PropertiesHelper

  public Object plugin(Object target) {
    return Plugin.wrap(target, this);
  }

  public void setProperties(Properties properties) {
    String dialectClass = new PropertiesHelper(properties).getRequiredString("dialectClass");
    try {
      dialect = (Dialect)Class.forName(dialectClass).newInstance();
    } catch (Exception e) {
      throw new RuntimeException("cannot create dialect instance by dialectClass:"+dialectClass,e);
    }
View Full Code Here

Examples of com.bj58.spat.gaea.server.util.config.PropertiesHelper

 
  private static Map<String,Object> mapConfig = null;
 
  private UnityFactory(String configPath) {
    try {
      PropertiesHelper ph = new PropertiesHelper(configPath);
      mapConfig = ph.getAllKeyValue();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of com.bsb.common.vaadin.embed.util.PropertiesHelper

     * Creates a new instance using the configuration in the given {@link Properties}
     *
     * @param properties configuration properties
     */
    public EmbedVaadinConfig(Properties properties) {
        final PropertiesHelper helper = new PropertiesHelper(properties);
        port = helper.getIntProperty(KEY_PORT, DEFAULT_PORT);
        setContextPath(properties.getProperty(KEY_CONTEXT_PATH, DEFAULT_CONTEXT_PATH));
        final String contextBase = properties.getProperty(KEY_CONTEXT_ROOT_DIR);
        if (contextBase == null) {
            contextRootDirectory = Files.createTempDir();
        } else {
            contextRootDirectory = new File(contextBase);
        }
        waiting = helper.getBooleanProperty(KEY_WAITING, DEFAULT_WAITING);

        widgetSet = properties.getProperty(KEY_WIDGET_SET);
        productionMode = helper.getBooleanProperty(KEY_PRODUCTION_MODE, DEFAULT_PRODUCTION_MODE);

        openBrowser = helper.getBooleanProperty(KEY_OPEN_BROWSER, DEFAULT_OPEN_BROWSER);
        customBrowserUrl = properties.getProperty(KEY_CUSTOM_BROWSER_URL);

        logger.debug("Using " + this);

        // Validate
View Full Code Here

Examples of com.bsb.common.vaadin.embed.util.PropertiesHelper

     * Creates a new instance using the configuration in the given {@link Properties}
     *
     * @param properties configuration properties
     */
    public EmbedVaadinConfig(Properties properties) {
        final PropertiesHelper helper = new PropertiesHelper(properties);
        port = helper.getIntProperty(KEY_PORT, DEFAULT_PORT);
        setContextPath(properties.getProperty(KEY_CONTEXT_PATH, DEFAULT_CONTEXT_PATH));
        final String contextBase = properties.getProperty(KEY_CONTEXT_ROOT_DIR);
        if (contextBase == null) {
            contextRootDirectory = Files.createTempDir();
        } else {
            contextRootDirectory = new File(contextBase);
        }
        waiting = helper.getBooleanProperty(KEY_WAITING, DEFAULT_WAITING);

        widgetSet = properties.getProperty(KEY_WIDGET_SET);
        productionMode = helper.getBooleanProperty(KEY_PRODUCTION_MODE, DEFAULT_PRODUCTION_MODE);

        openBrowser = helper.getBooleanProperty(KEY_OPEN_BROWSER, DEFAULT_OPEN_BROWSER);

        logger.debug("Using " + this);

        // Validate
        validate();
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.