Package com.caucho.vfs

Examples of com.caucho.vfs.MergePath


            gsBucket, true);
        setPwd(mergePwd);

        Path webInfDir = getWebInfDir();
        Path gsWebInfDir = mergePwd.getGooglePath().lookup("WEB-INF");
        MergePath mergeWebInf = new MergePath(gsWebInfDir, webInfDir);

        setWebInfDir(mergeWebInf);
      }
    }
View Full Code Here


  }
 
  public void init(FilterConfig config)
    throws ServletException
  {
    _stylePath = new MergePath();
    _stylePath.addMergePath(Vfs.lookup());
    DynamicClassLoader loader;
    loader = (DynamicClassLoader) Thread.currentThread().getContextClassLoader();
    String resourcePath = loader.getResourcePathSpecificFirst();
    _stylePath.addClassPath(resourcePath);
View Full Code Here

    _ejbContainer = EjbContainer.create();
    // _amberContainer = AmberContainer.create();
   
    _urlPrefix = _localURL.get();

    _mergePath = new MergePath();
    _mergePath.addMergePath(Vfs.lookup());
    _mergePath.addClassPath();
  }
View Full Code Here

      System.err.println("multiple sources require a destination directory");
      System.exit(1);
    }

    try {
      MergePath stylePath = new MergePath();
      stylePath.addMergePath(Vfs.lookup(xslName).getParent());
      stylePath.addMergePath(Vfs.lookup());
      stylePath.addMergePath(CauchoSystem.getResinHome().lookup("xsl"));

      ClassLoader loader = Thread.currentThread().getContextClassLoader();

      if (loader instanceof DynamicClassLoader) {
  DynamicClassLoader dynLoader
    = (DynamicClassLoader) loader;
  String resourcePath = dynLoader.getResourcePathSpecificFirst();
  stylePath.addClassPath(resourcePath);
      }

      // stylePath.addClassPath(

      /*
        Path []stylePath = new Path[] {
        Pwd.lookup(xslName).getParent(),
        Pwd.lookup(),
        CauchoSystem.getResinHome().lookup("xsl")};
      */
      Path []scriptPath = new Path[] {
        Vfs.lookup(),
        Vfs.lookup(xslName).getParent(),
        CauchoSystem.getResinHome().lookup("scripts")
      };

      Path xslPath = stylePath.lookup(xslName);
      if (xslPath == null) {
        System.out.println("can't find `" + xslName + "'");
        System.exit(1);
      }

View Full Code Here

    pwd = pwd.getParent();

    DynamicClassLoader loader;
    loader = (DynamicClassLoader) webApp.getClassLoader();
   
    MergePath stylePath = new MergePath();
    stylePath.addMergePath(pwd);
    stylePath.addMergePath(appDir);

    String resourcePath = loader.getResourcePathSpecificFirst();
    stylePath.addClassPath(resourcePath);
   
    Path hrefPath = stylePath.lookup(href);

    if (hrefPath.canRead()) {
      DynamicClassLoader owningLoader = getStylesheetLoader(href, hrefPath);

      if (owningLoader != null) {
  loader = owningLoader;
 
  stylePath = new MergePath();
  stylePath.addMergePath(pwd);
  stylePath.addMergePath(appDir);
  resourcePath = loader.getResourcePathSpecificFirst();
  stylePath.addClassPath(resourcePath);
      }
    }

    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();
View Full Code Here

      if (! (loader instanceof DynamicClassLoader))
  continue;

      DynamicClassLoader dynLoader = (DynamicClassLoader) loader;
     
      MergePath mp = new MergePath();
      String resourcePath = dynLoader.getResourcePathSpecificFirst();
      mp.addClassPath(resourcePath);

      Path loaderPath = mp.lookup(href);

      if (loaderPath.getNativePath().equals(sourcePath.getNativePath()))
  owningLoader = dynLoader;
    }
View Full Code Here

   * Parses the AFM
   */
  public Font parse(String name)
    throws IOException
  {
    MergePath mergePath = new MergePath();
    mergePath.addClassPath();

    Path path = mergePath.lookup("com/caucho/quercus/lib/pdf/font/" + name + ".afm");

    if (! path.canRead())
      throw new FileNotFoundException(L.l("Can't find font {0}", name));

    _is = path.openRead();
View Full Code Here

   */
  private Wrapper(Global resin, Class cl)
  {
    name = cl.getName().replace('/', '.');

    MergePath mergePath = new MergePath();
    mergePath.addClassPath(cl.getClassLoader());
    Path destClass = mergePath.lookup(name.replace('.', '/') + ".class");

    // technically, need to resort to dynamic.  This is a cheat.
    if (! destClass.exists() && cl.getInterfaces().length > 0) {
      cl = cl.getInterfaces()[0];
      name = cl.getName().replace('/', '.');
View Full Code Here

  /**
   * Returns the default merge path
   */
  public static Path getDefaultSearchPath()
  {
    MergePath mergePath = new MergePath();
   
    mergePath.addMergePath(Vfs.lookup());
    mergePath.addClassPath();

    return mergePath;
  }
View Full Code Here

        className = this.className;
      else
        className = "_js." + JavaCompiler.mangleName(name);
     
      if (scriptPath == null) {
        MergePath mergePath = new MergePath();
        mergePath.addMergePath(Vfs.lookup());
        ClassLoader parentLoader = this.parentLoader;
        if (parentLoader == null)
          parentLoader = Thread.currentThread().getContextClassLoader();
     
        mergePath.addClassPath(parentLoader);
        scriptPath = mergePath;
      }
     
      Script script = loadScript(className);
View Full Code Here

TOP

Related Classes of com.caucho.vfs.MergePath

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.