Examples of RepositoryAdmin


Examples of org.apache.felix.bundlerepository.RepositoryAdmin

        ServiceReference reference = null;
        String name = null;
       
        try {
            reference = bundleContext.getServiceReference(RepositoryAdmin.class.getName());
            RepositoryAdmin repositoryAdmin = (RepositoryAdmin) bundleContext.getService(reference);

            // add repository and persist
            Repository repository = repositoryAdmin.addRepository(new URI(obrUrl).toURL());
            persistRepositoryList(repositoryAdmin, PortletManager.getCurrentServer(actionRequest).getServerInfo());                  
           
            name = getName(repository.getName(), obrUrl);
           
        } finally {
View Full Code Here

Examples of org.apache.felix.bundlerepository.RepositoryAdmin

                logger.error("Exception", e);
            }
           
            BundleContext bundleContext = getBundleContext(renderRequest);
            ServiceReference reference = bundleContext.getServiceReference(RepositoryAdmin.class.getName());
            RepositoryAdmin repositoryAdmin = (RepositoryAdmin) bundleContext.getService(reference);

            //get All OBR
            Repository[] repos = repositoryAdmin.listRepositories();
            renderRequest.setAttribute("repos", repos);

            try {
                String searchType = renderRequest.getParameter("searchType");
                if (searchType != null && !"".equals(searchType)) {
View Full Code Here

Examples of org.apache.felix.bundlerepository.RepositoryAdmin

        BundleContext bundleContext = getBundleContext(request);
        ServiceReference reference = null;
           
        try {
            reference = bundleContext.getServiceReference(RepositoryAdmin.class.getName());
            RepositoryAdmin repositoryAdmin = (RepositoryAdmin) bundleContext.getService(reference);
       
            Map<String, Resource> resourceMap = new HashMap<String, Resource>();
            Resource[] resources = getAllResources(repositoryAdmin);
            for (Resource resource : resources) {
                resourceMap.put(resource.getSymbolicName() + "/" + resource.getVersion(), resource);
            }
                   
            Resolver resolver = repositoryAdmin.resolver();
                   
            for (String resourceName : selectedResources) {
                Resource resource = resourceMap.get(resourceName);
                if (resource == null) {
                    throw new IllegalArgumentException("Resource not found: " + resourceName);
View Full Code Here

Examples of org.apache.felix.bundlerepository.RepositoryAdmin

    fout.close();
  }

  @After
  public void clearRepository() {
    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
    Repository[] repos = repositoryAdmin.listRepositories();
    if ((repos != null) && (repos.length >0)) {
      for (Repository repo : repos) {
        repositoryAdmin.removeRepository(repo.getURI());
      }
    }
  }
View Full Code Here

Examples of org.apache.felix.bundlerepository.RepositoryAdmin

  {
    //  provision against the local runtime
    System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "false");
    generateOBRRepoXML(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + "_0.0.0.jar");
   
    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
   
    Repository[] repos = repositoryAdmin.listRepositories();
    for (Repository repo : repos) {
      repositoryAdmin.removeRepository(repo.getURI());
    }
   
    repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());

    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.eba")));
    //installing requires a valid url for the bundle in repository.xml.
   
View Full Code Here

Examples of org.apache.felix.bundlerepository.RepositoryAdmin

  public void testProvisionExcludeLocalRepo() throws Exception {
    // do not provision against the local runtime
    System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "true");
    generateOBRRepoXML(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + ".jar");
   
    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
   
    Repository[] repos = repositoryAdmin.listRepositories();
    for (Repository repo : repos) {
      repositoryAdmin.removeRepository(repo.getURI());
    }
   
    repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());

    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.eba")));
    //installing requires a valid url for the bundle in repository.xml.
   
View Full Code Here

Examples of org.apache.felix.bundlerepository.RepositoryAdmin

  {
    //  provision against the local runtime
    System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "false");
    generateOBRRepoXML(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + ".jar");
   
    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
   
    Repository[] repos = repositoryAdmin.listRepositories();
    for (Repository repo : repos) {
      repositoryAdmin.removeRepository(repo.getURI());
    }
   
    repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());

    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.eba")));
    //installing requires a valid url for the bundle in repository.xml.
   
View Full Code Here

Examples of org.apache.felix.bundlerepository.RepositoryAdmin

    }

    @Test
    public void testAppWithApplicationManifest() throws Exception {
     
      RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
     
      repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());

      Repository[] repos = repositoryAdmin.listRepositories();
     
      for (Repository repo : repos) {
        Resource[] resources = repo.getResources();
       
        for (Resource r : resources) {
View Full Code Here

Examples of org.apache.felix.bundlerepository.RepositoryAdmin

  {
    // do not provision against the local runtime
    System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "true");
    generateOBRRepoXML(false, TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + "_0.0.0.jar",  USE_BUNDLE_BY_REFERENCE+".jar");
   
    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
   
    Repository[] repos = repositoryAdmin.listRepositories();
    for (Repository repo : repos) {
      repositoryAdmin.removeRepository(repo.getURI());
    }
   
    repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());

    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("demo.eba")));
   
    app = manager.resolve(app);
View Full Code Here

Examples of org.apache.felix.bundlerepository.RepositoryAdmin

  {
    // do not provision against the local runtime
    System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "true");
    generateOBRRepoXML(false, TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + ".jar", USE_BUNDLE_BY_REFERENCE+".jar");
   
    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
   
    Repository[] repos = repositoryAdmin.listRepositories();
    for (Repository repo : repos) {
      repositoryAdmin.removeRepository(repo.getURI());
    }
   
    repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());

    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("demo.eba")));
    //installing requires a valid url for the bundle in repository.xml.
   
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.