Examples of VirtualFile


Examples of org.jboss.vfs.VirtualFile

         {
            RepositoryRootMetadata rmd = new RepositoryRootMetadata();
            rmd.setName(entry.getKey());
            RepositoryRootMetadata existingRmd = official == null ? null : official.getRepositoryRootMetadata(entry.getKey());
           
            VirtualFile root = entry.getValue();        
            if (isDirectory(root))
            {
               for(VirtualFile child: root.getChildren())
               {
                  createItemMetadataFromScan(rmd, existingRmd, child, root);
               }
            }
            else
View Full Code Here

Examples of org.jboss.vfs.VirtualFile

      {
         // Use the first root that can accept children
         for (RepositoryRootMetadata rmd : roots)
         {
           
            VirtualFile vf = vfCache.get(rmd.getName());
            if (isDirectory(vf))
            {
               rootName = rmd.getName();
               break;              
            }
View Full Code Here

Examples of org.jboss.vfs.VirtualFile

      return result;
   }

   public VirtualFile getVirtualFileForItem(RepositoryItemMetadata item) throws IOException
   {
      VirtualFile vf = vfCache.get(item.getRootName());
      VirtualFile parent = null;
      List<String> path = item.getRelativePathElements();
      for (String element : path)
      {
         parent = vf;
         vf = parent.getChild(element);
         if (vf == null)
         {
            throw new IllegalStateException("No child " + element + " under " + parent);
         }
      }
View Full Code Here

Examples of org.jboss.vfs.VirtualFile

  
   private static List<String> getRelativePath(VirtualFile file, VirtualFile root)
      throws IOException
   {
      List<String> reversed = new ArrayList<String>();
      VirtualFile now = file;
      while(now != null && now.equals(root) == false)
      {
         reversed.add(now.getName());
         now = now.getParent();
      }
     
      if (now == null)
      {
         throw new IllegalArgumentException(file + " is not a child of " + root);
View Full Code Here

Examples of org.jboss.vfs.VirtualFile

         clusteringHandler.synchronizeContent(true);
        
         // Load applications
         for(URI uri : getRepositoryURIs())
         {
            VirtualFile root = getCachedVirtualFile(uri);
            loadApplications(root);
         }
        
         updateLastModfied();
        
View Full Code Here

Examples of org.jboss.vfs.VirtualFile

      {     
         RepositoryContentMetadata existingRCMD = new RepositoryContentMetadata(this.localContentManager.getOfficialContentMetadata());        
         RepositoryItemMetadata newRIMD = this.clusteringHandler.addDeploymentContent(vfsPath, contentIS);
         RepositoryRootMetadata existingRRMD = existingRCMD.getRepositoryRootMetadata(newRIMD.getRootName());
         boolean exists = existingRRMD != null && existingRRMD.getItemMetadata(newRIMD.getRelativePathElements()) != null;
         VirtualFile root = getCachedVirtualFile(namedURIMap.get(newRIMD.getRootName()));
         VirtualFile contentVF = root.getChild(newRIMD.getRelativePath());

         try
         {
            // Add the new virtual file to the cache
            repositoryName = addVirtualFileCache(contentVF);
View Full Code Here

Examples of org.jboss.vfs.VirtualFile

      try
      {
         ProfileDeployment deployment = getDeployment(vfsPath);
         if (deployment != null)
         {
            VirtualFile vf = VFS.getChild(vfsPath);
            for (Map.Entry<String, URI> entry : namedURIMap.entrySet())
            {
               String relativePath = null;
               VirtualFile root = VFS.getChild(entry.getValue());
               try
               {
                  relativePath = vf.getPathNameRelativeTo(root);
               }
               catch (IllegalArgumentException notParent)
View Full Code Here

Examples of org.jboss.vfs.VirtualFile

      Map<String, URI> map = new HashMap<String, URI>();
      if (uris != null)
      {
         for (URI uri : uris)
         {
            VirtualFile vf = getCachedVirtualFile(uri);
            map.put(vf.getName(), uri);
         }
      }
     
      return map;
   }
View Full Code Here

Examples of org.jboss.vfs.VirtualFile

   /** The filter. */
   private static VirtualFileFilter filter = new SuffixMatchFilter(".xml");

   public static boolean hasBeenModified(VFSDeploymentUnit unit, long lastModified) throws Exception
   {
      VirtualFile root = unit.getRoot();
      if (root.isFile())
      {
         if(root.getLastModified() > lastModified)
            return true;
      }

      StructureMetaData structureMetaData = unit.getAttachment(StructureMetaData.class);
      if(structureMetaData == null)
View Full Code Here

Examples of org.jboss.vfs.VirtualFile

      List<MetaDataEntry> metadataPaths = contextInfo.getMetaDataPath();
      if (metadataPaths != null && metadataPaths.isEmpty() == false)
      {
         for (MetaDataEntry metaDataPath : metadataPaths)
         {
            VirtualFile mdpVF = root.getChild(metaDataPath.getPath());
            if (mdpVF.exists())
            {
               List<VirtualFile> children = mdpVF.getChildren(filter);
               if (children != null && children.isEmpty() == false)
               {
                  for (VirtualFile child : children)
                  {
                     if (child.getLastModified() > lastModified)
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.