Package com.caucho.vfs

Examples of com.caucho.vfs.Depend


    if (_path == null)
      return;
   
    try {
      Alarm.getCurrentTime();
      new Depend(_path);

      if (log.isLoggable(Level.FINE))
        log.fine(this + " loading users from " + _path);
     
      _roleMap = new Hashtable<String,Role>();
View Full Code Here


   * Adds a jar where none of the classes have a scanned match.
   */
 
  private void addNullScanPath(Path path)
  {
    _nullScanPathMap.put(path, new Depend(path));
  }
View Full Code Here

  /**
   * Returns true if the jar is known to have no scanned classes.
   */
  private boolean isNullScanPath(Path path)
  {
    Depend depend = _nullScanPathMap.get(path);
   
    return depend != null && ! depend.isModified();
  }
View Full Code Here

      ArrayList<Depend> styleDepends = null;
      if (ss != null)
        styleDepends = (ArrayList) ss.getProperty(StylesheetImpl.DEPENDS);
      for (int i = 0; styleDepends != null && i < styleDepends.size(); i++) {
        Depend depend = styleDepends.get(i);

        Depend jspDepend = new Depend(depend.getPath(),
                                      depend.getLastModified(),
                                      depend.getLength());
        jspDepend.setRequireSource(true);

        if (! depends.contains(jspDepend))
          depends.add(jspDepend);
      }

      // Fill the page dependency information from the document into
      // the jsp page.
      ArrayList<Path> docDepends;
      docDepends = (ArrayList) doc.getProperty(CauchoDocument.DEPENDS);
      for (int i = 0; docDepends != null && i < docDepends.size(); i++) {
        Path depend = docDepends.get(i);

        Depend jspDepend = new Depend(depend);
        if (! depends.contains(jspDepend))
          depends.add(jspDepend);
      }

      // stylesheet cache dependencies are normal dependencies for JSP
      ArrayList<Path> cacheDepends = null;
      TransformerImpl xform = null;
      if (transformer instanceof TransformerImpl)
        xform = (TransformerImpl) transformer;
      if (xform != null)
        cacheDepends = (ArrayList) xform.getProperty(TransformerImpl.CACHE_DEPENDS);
      for (int i = 0; cacheDepends != null && i < cacheDepends.size(); i++) {
        Path depend = cacheDepends.get(i);
        Depend jspDepend = new Depend(depend);
        if (! depends.contains(jspDepend))
          depends.add(jspDepend);
      }

      ServletConfig config = null;
View Full Code Here

    try {
      for (int i = 0; i < dependList.size(); i++) {
        PersistentDependency dependency = dependList.get(i);

        if (dependency instanceof Depend) {
          Depend depend = (Depend) dependency;

          os.print('"');
          os.print(depend.getPath().getNativePath());
          os.print("\" \"");
          os.print(depend.getDigest());
          os.println("\"");
        }
      }
    } finally {
      os.close();
View Full Code Here

      String name;

      while ((name = parseName(is)) != null) {
        long digest = Long.parseLong(parseName(is));

        Depend depend = new Depend(dependPath.lookup(name), digest);

        dependList.add(depend);
      }

      return dependList;
View Full Code Here

   * Adds a dependent file.
   */
  public void addDepend(Path depend)
  {
    if (! _dependList.contains(depend))
      _dependList.add(new Depend(depend));
  }
View Full Code Here

    Path appDir = getAppDir();
    for (int i = 0; i < depends.size(); i++) {
      PersistentDependency dependency = depends.get(i);

      if (dependency instanceof Depend) {
        Depend depend = (Depend) dependency;

        if (depend.getPath().isDirectory())
          continue;

        out.print("depend = new com.caucho.vfs.Depend(");
        printPathDir(out, depend, depend.getPath().getFullPath(),
                     appDir, classPath);
        out.println(", " + depend.getDigest() + "L, " +
                    _requireSource + ");");
        // out.println("com.caucho.jsp.JavaPage.addDepend(_caucho_depends, depend);");
        out.println("_caucho_depends.add(depend);");
      }
      else {
        /*
        out.print("com.caucho.jsp.JavaPage.addDepend(_caucho_depends, ");
        out.print(dependency.getJavaCreateString());
        out.println(");");
        */
        out.print("_caucho_depends.add(");
        out.print(dependency.getJavaCreateString());
        out.println(");");
      }
    }

    if (_isCacheable && ! _isUncacheable) {
      for (int i = 0; i < _cacheDepends.size(); i++) {
        Depend depend = _cacheDepends.get(i);

        if (depend.getPath().isDirectory())
          continue;

        out.print("depend = new com.caucho.vfs.Depend(");
        printPathDir(out, depend, depend.getPath().getFullPath(),
                     appDir, classPath);
        out.println(", \"" + depend.getDigest() + "\", " +
                    _requireSource + ");");
        out.println("_caucho_cacheDepends.add((Object) depend);");
      }
    }
    out.popDepth();
View Full Code Here

   */
  protected void _caucho_addDepend(Path path,
                                   long lastModified,
                                   long length)
  {
    Depend depend = new Depend(path, lastModified, length);
    depend.setRequireSource(getRequireSource());

    _caucho_addDepend(depend);
  }
View Full Code Here

                                        long length)
  {
    if (_cacheDepends == null)
      _cacheDepends = new ArrayList<Depend>();

    Depend depend = new Depend(path, lastModified, length);

    if (! _cacheDepends.contains(depend))
      _cacheDepends.add(depend);
  }
View Full Code Here

TOP

Related Classes of com.caucho.vfs.Depend

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.