Examples of IDirectory


Examples of org.apache.aries.util.filesystem.IDirectory

    return name;
  }

  public IDirectory getParent()
  {
    IDirectory parent = new DirectoryImpl(file.getParentFile(), rootDirFile);
    return parent;
  }
View Full Code Here

Examples of org.apache.aries.util.filesystem.IDirectory

    return is;
  }

  public IDirectory getRoot()
  {
    IDirectory root = new DirectoryImpl(rootDirFile, rootDirFile);
    return root;
  }
View Full Code Here

Examples of org.apache.aries.util.filesystem.IDirectory

   * @param fs the zip file.
   * @return   the root of the virtual FS.
   */
  public static IDirectory getFSRoot(File fs, IDirectory parent)
  {
    IDirectory dir = null;

    if (fs.exists()) {
      if (fs.isDirectory()) {
        dir = new DirectoryImpl(fs, fs);
      } else if (fs.isFile() && isValidZip(fs)) {
View Full Code Here

Examples of org.apache.aries.util.filesystem.IDirectory

      return null;
    } finally {
      IOUtils.close(fos);
    }
   
    IDirectory dir = getFSRoot(tempFile, null);
   
    if(dir == null)
      return null;
    else
      return new InputStreamClosableDirectory(dir, tempFile);
View Full Code Here

Examples of org.apache.aries.util.filesystem.IDirectory

    return name;
  }

  public IDirectory getParent()
  {
    IDirectory parent = new DirectoryImpl(file.getParentFile(), rootDirFile);
    return parent;
  }
View Full Code Here

Examples of org.apache.aries.util.filesystem.IDirectory

    return is;
  }

  public IDirectory getRoot()
  {
    IDirectory root = new DirectoryImpl(rootDirFile, rootDirFile);
    return root;
  }
View Full Code Here

Examples of org.apache.aries.util.filesystem.IDirectory

   * the application version.
   * @param zip Content to use for application.
   * @return true if manifest modified, false otherwise.
   */
  public static boolean updateManifest(Manifest mf, String appName, File zip){
    IDirectory appPathIDir = FileSystem.getFSRoot(zip);
    boolean result = updateManifest(mf, appName, appPathIDir);
    return result;
  }
View Full Code Here

Examples of org.apache.aries.util.filesystem.IDirectory

  private final BundleManifest manifest;
  private final List<Requirement> requirements = new ArrayList<Requirement>();
 
  public BundleResource(IFile content) throws ModellerException {
    this.content = content;
    IDirectory dir = content.isDirectory() ? content.convert() : content.convertNested();
    manifest = computeManifest(dir);
    // TODO Could use ModelledResourceManager.getServiceElements instead.
    // Only the service dependency info is being used right now.
    ModelledResource resource = getModelledResourceManager().getModelledResource(dir);
    computeRequirements(resource);
View Full Code Here

Examples of org.apache.aries.util.filesystem.IDirectory

   * left to call.
   */
  private IDirectory retrieveIDirectory() throws IOException {
    Collection<IDirectoryFinder> iDirectoryFinders = Activator.getInstance().getIDirectoryFinders();
    for(IDirectoryFinder iDirectoryFinder : iDirectoryFinders) {
      IDirectory directory = iDirectoryFinder.retrieveIDirectory(uri);
      if (directory!=null)
        return directory;
    }
    throw new IOException("cannot find IDirectory corresponding to id " + uri);
  }
View Full Code Here

Examples of org.apache.aries.util.filesystem.IDirectory

    FileOutputStream fout = new FileOutputStream("repository.xml");
    RepositoryGenerator repositoryGenerator = context().getService(RepositoryGenerator.class);
    ModelledResourceManager modelledResourceManager = context().getService(ModelledResourceManager.class);
    for (String fileName : bundleFiles) {
      File bundleFile = new File(fileName);
      IDirectory jarDir = FileSystem.getFSRoot(bundleFile);
      mrs.add(modelledResourceManager.getModelledResource(bundleFile.toURI().toString(), jarDir));
    }
    repositoryGenerator.generateRepository("Test repo description", mrs, fout);
    fout.close();
    }
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.