Package de.mhus.lib.config

Examples of de.mhus.lib.config.IConfig


   * @param config
   * @throws MException
   */
  public static void fillColumns(CaoMetadata meta, IConfig config) throws MException {
    for (CaoMetaDefinition m : meta) {
      IConfig cM = config.createConfig("column");

      cM.setProperty("name", m.getName());
      cM.setProperty("type", m.getType().toString() );
      if (m.getNls() != null)
        cM.setProperty("nls", m.getNls());
      if (m.getSize() > 0)
        cM.setProperty("size", String.valueOf(m.getSize()) );
      if(m.getCategories() != null)
        cM.setProperty("categories", MString.join(m.getCategories(),',') );
    }
  }
View Full Code Here


       
      }
    }
   
   
    IConfig cRules = config.getConfig("rules");
    if (cRules != null) {
     
      String def = cRules.getExtracted("default","OWN").toUpperCase();
      log.d("default rule",this,def);
      setDefaultRule(RESULT.valueOf(def));
     
      LinkedList<Rule> r = new LinkedList<DynamicClassLoader.Rule>();
      for (IConfig sub : cRules.getConfigBundle("rule")) {
        log.d("add rule",this,sub.getExtracted("pattern"),sub.getExtracted("result","FORWARD"));
        r.add(new Rule(sub.getExtracted("pattern"), RESULT.valueOf(sub.getExtracted("result","FORWARD").toUpperCase()) ));
      }
      setRules(r);
    }
View Full Code Here

     return f.exists() ? f.getAbsolutePath() : null;
  }
 
  @JmxManaged
  public String dumpPersistentConfig(String name) {
    IConfig p = getPersistence(name);
    if (p == null) return null;
   
    Element e = ((XmlConfigFile)p).getXmlElement();
   
    try {
View Full Code Here

  public JpaProperties(IConfig config) {
    super();
    this.config = config;
    // fill from config
    IConfig cproperties = config.getConfig("properties");
    if (cproperties != null) {
      for (IConfig prop : cproperties.getConfigBundle("property")) {
        setProperty(prop.getExtracted("name"), prop.getExtracted("value"));
      }
    }
   
  }
View Full Code Here

    HttpUnitOptions.setScriptingEnabled(false);

    JackConfiguration c = ((JackConnection)app.getConnection()).getConfiguration();
    setAuthorization(c.getUser(), c.getPassword());
    setUserAgent("cao");
    IConfig proxy = app.getConfig().getConfig("proxy");
    if (proxy != null) {
      setProxyServer(proxy.getExtracted("host"), MCast.toint(proxy.getExtracted("port", "8080"),8080), proxy.getExtracted("user"), proxy.getExtracted("password"));
    }
  }
View Full Code Here

     WebRequest req = new GetMethodWebRequest( app.getUri(element) + suffix );
     WebResponse res = getResponse( req );
     if ( res.getResponseCode() != 200 )
       return null;
     String content = res.getText();
     IConfig config = MConfigFactory.getInstance().toConfig(content);
     return config;
  }
View Full Code Here

     }
     WebResponse res = getResponse( req );
     if ( res.getResponseCode() != 200 )
       return null;
     String content = res.getText();
     IConfig config = MConfigFactory.getInstance().toConfig(content);
     return config;
  }
View Full Code Here

     WebResponse res = getResponse( req );
     if ( res.getResponseCode() != 200 )
       return null;
     String content = res.getText();
     IConfig config = MConfigFactory.getInstance().toConfig(content);
     return config;
  }
View Full Code Here

     WebRequest req = new GetMethodWebRequest( app.getUri() + path );
     WebResponse res = getResponse( req );
     if ( res.getResponseCode() != 200 )
       return null;
     String content = res.getText();
     IConfig config = MConfigFactory.getInstance().toConfig(content);
     return config;
  }
View Full Code Here

   
    isFullWidth = config.getBoolean("fullwidth", false);
    isTitleInside = config.getBoolean("titleinside", false);
   
    try {
      IConfig cSource = config.getConfig("sources");
      if (cSource != null) {
        for ( IConfig srcConf : cSource.getConfigBundle()) {
          DataConnector con = getDataSource().createDataConnector(this,srcConf);
          if (con != null) {
            if (sources == null) sources = new HashMap<String,DataConnector>();
            sources.put(con.getTaskName(), con);
            con.addObserver(this);
View Full Code Here

TOP

Related Classes of de.mhus.lib.config.IConfig

Copyright © 2018 www.massapicom. 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.