Package org.jboss.virtual.plugins.context

Examples of org.jboss.virtual.plugins.context.AbstractVirtualFileHandler


      JarHandler jar =  new JarHandler(this, parent, url, jarName);
      if (entryPath == null)
         return jar;
     
      // todo This is a hack until we can fix http://jira.jboss.com/jira/browse/JBMICROCONT-164
      AbstractVirtualFileHandler result = (AbstractVirtualFileHandler)jar.getChild(removeQuery(entryPath));
      if (result == null)
         throw new IllegalArgumentException("Null child, entryPath: " + entryPath);

      result.setPathName("");
      return result;
   }
View Full Code Here


            {
               ei = entries.get(parentPath);
               if (ei == null)
                  ei = makeDummyParent(parentPath);
            }
            AbstractVirtualFileHandler parent = ei != null ? ei.getHandler() : null;

            // it's a nested jar
            if (ent.isDirectory() == false && JarUtils.isArchive(ent.getName()))
            {
               boolean useCopyMode = forceCopy;
View Full Code Here

         throw new IllegalArgumentException("Null parent");

      checkIfModified();
      if(parent instanceof AbstractVirtualFileHandler)
      {
         AbstractVirtualFileHandler parentHandler  = (AbstractVirtualFileHandler) parent;
         ZipEntryContextInfo parentEntry = entries.get(parentHandler.getLocalPathName());
         if (parentEntry != null)
         {
            if (parentEntry.getHandler() instanceof DelegatingHandler)
               return parentEntry.getHandler().getChildren(ignoreErrors);
View Full Code Here

      JarHandler jar =  new JarHandler(this, parent, url, jarName);
      if (entryPath == null)
         return jar;
     
      // todo This is a hack until we can fix http://jira.jboss.com/jira/browse/JBMICROCONT-164
      AbstractVirtualFileHandler result = (AbstractVirtualFileHandler)jar.getChild(entryPath);
      if (result == null)
         throw new IllegalArgumentException("Null child, entryPath: " + entryPath);

      result.setPathName("");
      return result;
   }
View Full Code Here

         return new URL("jar:file:" + ctx.getRootURI().getPath() + "!" + lpath);
      }

      if (peer instanceof AbstractVirtualFileHandler)
      {
         AbstractVirtualFileHandler aPeer =(AbstractVirtualFileHandler) peer;
         URL realUrl = aPeer.getLocalVFSContext().getRoot().getRealURL();
         String urlStr = realUrl.toExternalForm();
         if (urlStr.endsWith("!/"))
            return new URL(urlStr + aPeer.getLocalPathName());
         else
            return realUrl;
      }
      
      throw new RuntimeException("Operation not supported for handler: " + this);
View Full Code Here

      JarHandler jar =  new JarHandler(this, parent, url, jarName);
      if (entryPath == null)
         return jar;
     
      // todo This is a hack until we can fix http://jira.jboss.com/jira/browse/JBMICROCONT-164
      AbstractVirtualFileHandler result = (AbstractVirtualFileHandler)jar.getChild(entryPath);
      if (result == null)
         throw new IllegalArgumentException("Null child, entryPath: " + entryPath);

      result.setPathName("");
      return result;
   }
View Full Code Here

            EntryInfo ei = entries.get(parentPath);
            if(ei == null)
               ei = makeDummyParent(parentPath);

            AbstractVirtualFileHandler parent = ei != null ? ei.handler : null;

            if(ent.isDirectory() == false && JarUtils.isArchive(ent.getName()))
            {
               boolean useCopyMode = forceCopy;
               if (useCopyMode == false)
View Full Code Here

         throw new IllegalArgumentException("Null parent");

      checkIfModified();
      if(parent instanceof AbstractVirtualFileHandler)
      {
         AbstractVirtualFileHandler parentHandler  = (AbstractVirtualFileHandler) parent;
         EntryInfo parentEntry = entries.get(parentHandler.getLocalPathName());
         if (parentEntry != null)
         {
            if (parentEntry.handler instanceof DelegatingHandler)
               return parentEntry.handler.getChildren(ignoreErrors);
           
View Full Code Here

         {
            int i = 0;
            Iterator<AbstractVirtualFileHandler> it = children.iterator();
            while(it.hasNext())
            {
               AbstractVirtualFileHandler child = it.next();
               if (child.getName().equals(original.getName()))
               {
                  children.set(i, replacement);
                  break;
               }
               i++;
View Full Code Here

         {
            // if a child exists with this name already, remove it
            Iterator<AbstractVirtualFileHandler> it = children.iterator();
            while (it.hasNext())
            {
               AbstractVirtualFileHandler handler = it.next();
               if (handler.getName().equals(child.getName()))
               {
                  it.remove();
                  break;
               }
            }
View Full Code Here

TOP

Related Classes of org.jboss.virtual.plugins.context.AbstractVirtualFileHandler

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.