Package org.jboss.virtual

Examples of org.jboss.virtual.VirtualFile.visit()


      if (modified == false && root != deploymentContext.getRoot())
      {
         // check for update or delete
         UpdateDeleteVisitor udVisitor = new UpdateDeleteVisitor(filter, tempAttributes, getCache(), synchAdapter, root);
         VirtualFile tempRoot = deploymentContext.getRoot();
         tempRoot.visit(udVisitor);
         // check for addition
         AddVisitor addVisitor = new AddVisitor(filter, originalAttributes, getCache(), synchAdapter, tempRoot, root.getPathName().length());
         root.visit(addVisitor);
      }
      return modified;
View Full Code Here


            }

         };

         FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, va);
         parent.visit(visitor);
         List<VirtualFile> files = visitor.getMatched();
         for (VirtualFile vf : files)
         {
            mkdirs(vf.getPathName()).addChild(vf);
         }
View Full Code Here

  private static class VfsResourceMatchingDelegate {

    public static Set<Resource> findMatchingResources(Resource rootResource, String locationPattern, PathMatcher pathMatcher) throws IOException {
      VirtualFile root = VFS.getRoot(rootResource.getURL());
      PatternVirtualFileVisitor visitor = new PatternVirtualFileVisitor(root.getPathName(), locationPattern, pathMatcher);
      root.visit(visitor);
      return visitor.getResources();
    }
  }

View Full Code Here

      if (context == null)
         throw new IllegalArgumentException("Null context");

      VirtualFile file = context.getFile();
      VirtualFileVisitor visitor = candidateStructureVisitorFactory.createVisitor(context, attributes);
      file.visit(visitor);
   }

   /**
    * Add all children as candidates
    *
 
View Full Code Here

      if (modified == false && root != deploymentContext.getRoot())
      {
         // check for update or delete
         UpdateDeleteVisitor udVisitor = new UpdateDeleteVisitor(tempAttributes, getCache(), synchAdapter, root);
         VirtualFile tempRoot = deploymentContext.getRoot();
         tempRoot.visit(udVisitor);
         // check for addition
         AddVisitor addVisitor = new AddVisitor(originalAttributes, getCache(), synchAdapter, tempRoot, root.getPathName().length());
         root.visit(addVisitor);
      }
      return modified;
View Full Code Here

    public static Set<Resource> getVFSResources(URL rootURL, String subPattern, PathMatcher pathMatcher) throws IOException
    {
        log.debug("Scanning url: " + rootURL + ", sub-pattern: " + subPattern);
        VirtualFile root = VFS.getRoot(rootURL);
        PatternVirtualFileVisitor visitor = new PatternVirtualFileVisitor(root.getPathName(), subPattern, pathMatcher);
        root.visit(visitor);
        if (log.isTraceEnabled())
            log.trace("Found resources: " + visitor);
        return visitor.getResources();
    }
View Full Code Here

            }

         };

         FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, va);
         parent.visit(visitor);
         List<VirtualFile> files = visitor.getMatched();
         for (VirtualFile vf : files)
         {
            mkdirs(vf.getPathName()).addChild(vf);
         }
View Full Code Here

/* 193 */     FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, va);
/*     */     try
/*     */     {
/* 197 */       VirtualFile root = getRootFile();
/* 198 */       if (!root.isLeaf())
/* 199 */         root.visit(visitor);
/*     */     }
/*     */     catch (IOException e)
/*     */     {
/* 203 */       throw new RuntimeException(e);
/*     */     }
View Full Code Here

/*     */           }
/* 227 */           return true;
/*     */         }
/*     */       };
/* 232 */       FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, va);
/* 233 */       parent.visit(visitor);
/* 234 */       List files = visitor.getMatched();
/* 235 */       for (VirtualFile vf : files)
/*     */       {
/* 237 */         mkdirs(vf.getPathName()).addChild(vf);
/*     */       }
View Full Code Here

      if (modified == false && root != deploymentContext.getRoot())
      {
         // check for update or delete
         UpdateDeleteVisitor udVisitor = new UpdateDeleteVisitor(filter, tempAttributes, getCache(), synchAdapter, root);
         VirtualFile tempRoot = deploymentContext.getRoot();
         tempRoot.visit(udVisitor);
         // check for addition
         AddVisitor addVisitor = new AddVisitor(filter, originalAttributes, getCache(), synchAdapter, tempRoot, root.getPathName().length());
         root.visit(addVisitor);
      }
      return modified;
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.