Examples of CaoApplication


Examples of de.mhus.lib.cao.CaoApplication

      throws CaoException {
    try {
      MActivator a = activator;
      if (a==null) a = MSingleton.instance().getActivator();
      String appClass = config.getExtracted("application_class");
      CaoApplication app = (CaoApplication) a.createObject(appClass,new Class[] {CaoConnection.class,IConfig.class}, new Object[] {con,config2});
      return app;
    } catch(Throwable t) {
      throw new CaoException(t);
    }
  }
View Full Code Here

Examples of de.mhus.lib.cao.CaoApplication

    try {
      LinkedList<String> names = new LinkedList<String>();
      LinkedList<String> uniq = new LinkedList<String>();
     
      JackElement first = (JackElement) sources.getElements().next();
      CaoApplication app = first.getApplication();

      services.clear();
      IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(SERVICE_CREATE_NODE);
      for (IConfigurationElement e : config) {
        String title = e.getAttribute("title");
        String appClass = e.getAttribute("application_class");
        boolean ok = true;
        if (!MString.isEmptyTrim(appClass)) {
          ok = false;
//          if (!ok) {
            for (Class<?> c = app.getClass(); c != null; c = c.getSuperclass())
              if (c.getName().equals(appClass)) {
                ok = true;
                break;
              }

//          }
         
          if (!ok) {
            for (Class<?> i : app.getClass().getInterfaces()) {
              if (i.getName().equals(appClass)) {
                ok = true;
                break;
              }
            }
View Full Code Here

Examples of de.mhus.lib.cao.CaoApplication

    DbDriver driver = new DbDriver();
    driver.initialize("db", new HashConfig(), MSingleton.instance().getActivator());
    CaoForm dbconf = driver.createConfiguration();
    dbconf.setConfig(config);
    CaoConnection con = driver.createConnection(dbconf);
    CaoApplication app = con.getApplication("content");
    CaoElement r = app.queryElement("root");
    printOut(2,r);
  }
View Full Code Here

Examples of de.mhus.lib.cao.CaoApplication

    DbDriver driver = new DbDriver();
    driver.initialize("db", new HashConfig(), MSingleton.instance().getActivator());
    CaoForm dbconf = driver.createConfiguration();
    dbconf.setConfig(config);
    CaoConnection con = driver.createConnection(dbconf);
    CaoApplication app = con.getApplication("content");
    CaoElement r = app.queryElement("root");
    printOut(2,r);
  }
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.