Package org.apache.aries.application.filesystem

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


    }
   
    @Override
    protected Object doExecute() throws Exception {
        File sourceApplication = new File(applicationPath);
        IDirectory in = FileSystem.getFSRoot(sourceApplication);
        if (in == null) {
            System.err.println("File not found: " + applicationPath);
            return in;
        }
        AriesApplicationManager manager = getAriesApplicationManager();
View Full Code Here


    public Artifact getConfigurationID(Object plan,
                                       JarFile jarFile,
                                       ModuleIDBuilder idBuilder)
        throws IOException, DeploymentException {
        ApplicationMetadataFactory factory = getApplicationMetadataFactory();
        IDirectory ebaFile = FileSystem.getFSRoot(new File(jarFile.getName()));
        IFile applicationManifestFile = ebaFile.getFile(AppConstants.APPLICATION_MF);
        Manifest applicationManifest;
        if (applicationManifestFile != null) {
            InputStream in = applicationManifestFile.open();
            try {
                applicationManifest = ManifestProcessor.parseManifest(in);
            } finally {
                try { in.close(); } catch (IOException ignore) {}
            }
        } else {
            applicationManifest = new Manifest();
        }
        ManifestDefaultsInjector.updateManifest(applicationManifest, ebaFile.getName(), ebaFile);
        ApplicationMetadata metadata = factory.createApplicationMetadata(applicationManifest);
        return ApplicationInstaller.getConfigId(metadata);
    }
View Full Code Here

  }

  @Override
  public IDirectory getParent()
  {
    IDirectory result = isRoot() ? null : super.getParent();
    return result;
  }
View Full Code Here

  }

  @Override
  public IDirectory getParent()
  {
    IDirectory result = isRoot() ? null : super.getParent();
    return result;
  }
View Full Code Here

     *  /my.business.logic.jar
     *  /META-INF/APPLICATION.MF
     *  /META-INF/DEPLOYMENT.MF
     */
   
    IDirectory storedEba = FileSystem.getFSRoot(dest);
    assertNotNull (storedEba);
    assertEquals (storedEba.listFiles().size(), 3);
    IFile ifile = storedEba.getFile("META-INF/APPLICATION.MF");
    assertNotNull (ifile);
    ifile = storedEba.getFile ("META-INF/DEPLOYMENT.MF");
    assertNotNull (ifile);
    ifile = storedEba.getFile ("foo.bar.widgets.jar");
    assertNotNull (ifile);
    ifile = storedEba.getFile ("my.business.logic.jar");
    assertNotNull (ifile);
   
    AriesApplication newApp = _appMgr.createApplication(storedEba);
    DeploymentMetadata dm = newApp.getDeploymentMetadata();
    assertEquals (2, dm.getApplicationDeploymentContents().size());
View Full Code Here

    v.setAccessible(true);
    v.set(resolvedPersistenceLibrary, new Version("1.1.0"));
    nextResolverResult.add(resolvedPersistenceLibrary);
    _resolver.setNextResult(nextResolverResult);
   
    IDirectory testEba = FileSystem.getFSRoot(new File(TEST_EBA));
    AriesApplication app = _appMgr.createApplication(testEba);
    app = _appMgr.resolve(app);
    return app;
  }
View Full Code Here

    try {
      File tempFile = _localPlatform.getTemporaryFile();
      InputStream is = url.openStream();
      os = new FileOutputStream (tempFile);
      IOUtils.copy(is, os);
      IDirectory downloadedSource = FileSystem.getFSRoot(tempFile);
      app = createApplication (downloadedSource);
    } catch (IOException iox) {
      throw new ManagementException (iox);
    }
      finally {
View Full Code Here

    return is;
  }
 
  public IDirectory getRoot()
  {
    IDirectory root = parent.getRoot();
    return root;
  }
View Full Code Here

  }

  @Override
  public IDirectory getParent()
  {
    IDirectory result = isRoot() ? null : super.getParent();
    return result;
  }
View Full Code Here

   * 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

TOP

Related Classes of org.apache.aries.application.filesystem.IDirectory

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.