Package com.caucho.config

Examples of com.caucho.config.Config


    Document document = new Document(xtpFile, null);

    try {
      //org.w3c.dom.Node node = LooseToStrictHtml.looseToStrictHtml(xtpFile);

      Config config = new Config();
      config.setEL(false);

      config.configure(document, xtpFile);

      return document;
    } catch (Exception e) {
      System.err.println("Error configuring document (" + xtpFile + "): " + e);
View Full Code Here


      Path path = Vfs.lookup(realPath);

      Path toc = path.lookup("toc.xml");

      if (toc.canRead()) {
        Config config = new Config();
        config.setEL(false);

        Navigation navigation = new Navigation(this, uri, path, 0);

        navigation.setChild(child);

        try {
          config.configure(navigation, toc);

          navList.add(navigation);
        } catch (Exception e) {
          log.log(Level.FINE, e.toString(), e);
View Full Code Here

        Path pwd = path.getParent();
        Path toc = pwd.lookup("toc.xml");

        if (toc.canRead()) {
          Config config = new Config();
          config.setEL(false);

          int p = uri.lastIndexOf('/');
          if (p > 0)
            uri = uri.substring(0, p + 1);

          Navigation navigation = new Navigation(this, uri, pwd, 0);

          navigation.setChild(navItem);

          config.configure(navigation, toc);

          if (navigation.getRootItem() != null)
            navItem.addChildren(navigation.getRootItem().getChildren());
        }
      }
View Full Code Here

        Path path = Vfs.lookup(realPath);

        Path ref = path.lookup("reference.xtp");

        if (ref.canRead()) {
          Config config = new Config();
          config.setEL(false);

          try {
            _referenceDocument =
              new ReferenceDocument(_webApp, ref, _contextPath,
                                    uri + "/reference.xtp", _encoding);

            config.configure(_referenceDocument, ref);

            break;
          }
          catch (Exception e) {
            log.log(Level.FINE, e.toString(), e);
View Full Code Here

    if (_uri != null) {
      Path linkPath = _document.getRealPath(_uri);

      if (linkPath.exists() && linkPath.getPath().endsWith(".xtp")) {
        Config config = new Config();
        config.setEL(false);

        try {
          config.configure(_document, linkPath);

          if (_document.getHeader() != null)
            _fullDescription = _document.getHeader().getDescription();
          else
            _fullDescription = new Description(_document);
        } catch (NullPointerException e) {
          log.info("error configuring " + linkPath + ": " + e);
        } catch (Exception e) {
          log.info("error configuring " + linkPath + ": " + e);
        }

        if (_atocDescend) {
          Path linkRoot = linkPath.getParent();

          if (linkRoot.equals(_navigation.getRootPath().getParent()))
            return;

          Path subToc = linkPath.getParent().lookup("toc.xml");

          if (subToc.exists()) {
            _child = new Navigation(_navigation,
                                    _uri,
                                    linkRoot,
                                    _depth + 1);

            try {
              config.configure(_child, subToc);
            } catch (Exception e) {
              log.info("Failed to configure " + subToc + ": " + e);
            }
          } else {
            log.info(subToc + " does not exist!");
View Full Code Here

  InputStream is = path.lookup(name).openRead();
  try {
    ConnectorConfig conn = new ConnectorConfig();

    new Config().configure(conn, is, "com/caucho/jca/jca.rnc");

    _connList.add(conn);
  } finally {
    is.close();
  }
View Full Code Here

     
      InputStream is = conn.getInputStream();
      int ch;

      YadisXrd xrd = new YadisXrd();
      Config config = new Config();

      config.configure(xrd, is);

      return xrd;
    } catch (Exception e) {
      throw new RuntimeException(e);
    } finally {
View Full Code Here

      throw new ConfigException(L().l("Resin/{0} can't open configuration file '{1}'",
                                      VersionFactory.getVersion(),
                                      _args.getResinConf().getNativePath()));
    }

    Config config = new Config();
    BootResinConfig bootManager = new BootResinConfig(_args);

    ResinELContext elContext = _args.getELContext();

    /**
     * XXX: the following setVar calls should not be necessary, but the
     * EL.setEnviornment() call above is not effective:
     */
    InjectManager beanManager = InjectManager.create();

    Config.setProperty("resinHome", elContext.getResinHome());
    Config.setProperty("java", elContext.getJavaVar());
    Config.setProperty("resin", elContext.getResinVar());
    Config.setProperty("server", elContext.getServerVar());
    Config.setProperty("system", System.getProperties());
    Config.setProperty("getenv", System.getenv());

    ResinConfigLibrary.configure(beanManager);

    config.configure(bootManager, _args.getResinConf(),
                     "com/caucho/server/resin/resin.rnc");

    if (_args.isDynamicServer()) {
      _client = bootManager.addDynamicClient(_args);
    }
View Full Code Here

    try {
      is = persistenceXml.openRead();

      ConfigPersistence persistence = new ConfigPersistence(root);

      new Config().configure(persistence, is,
          "com/caucho/amber/cfg/persistence-31.rnc");

      for (ConfigPersistenceUnit unitConfig : persistence.getUnitList()) {
        ManagerPersistenceUnit pUnit
          = createPersistenceUnit(unitConfig.getName());
View Full Code Here

      InputStream is = xmlFile.openRead();

      entityMappings = new EntityMappingsConfig();
      entityMappings.setRoot(root);

      new Config().configure(entityMappings, is,
          "com/caucho/amber/cfg/mapping-30.rnc");
    }

    return entityMappings;
  }
View Full Code Here

TOP

Related Classes of com.caucho.config.Config

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.