Package org.apache.geronimo.kernel.repository

Examples of org.apache.geronimo.kernel.repository.Repository


        outputPath.mkdirs();
        new File(outputPath, "war").mkdir();
        File path = new File(BASEDIR, "src/test/resources/deployables/war4");
        UnpackedJarFile jarFile = new UnpackedJarFile(path);
        Module module = builder.createModule(null, jarFile, kernel.getNaming(), new ModuleIDBuilder());
        Repository repository = null;

        AbstractName moduleName = module.getModuleName();
        EARContext earContext = createEARContext(outputPath, defaultEnvironment, repository, configStore, moduleName);
        module.setEarContext(earContext);
        module.setRootEarContext(earContext);
View Full Code Here


        outputPath.mkdirs();
        new File(outputPath, "war").mkdir();
        File path = new File(BASEDIR, "src/test/resources/deployables/war-spaces-in-context");
        UnpackedJarFile jarFile = new UnpackedJarFile(path);
        Module module = builder.createModule(null, jarFile, kernel.getNaming(), new ModuleIDBuilder());
        Repository repository = null;

        AbstractName moduleName = module.getModuleName();
        EARContext earContext = createEARContext(outputPath, defaultEnvironment, repository, configStore, moduleName);
        module.setEarContext(earContext);
        module.setRootEarContext(earContext);
View Full Code Here

        //File dest = new File(BASEDIR, "target/test-resources/deployables/" + warName + "/war");
        File dest = new File(BASEDIR, "target/test-resources/deployables/" + warName );
        recursiveCopy(path, dest);
        UnpackedJarFile jarFile = new UnpackedJarFile(path);
        Module module = builder.createModule(null, jarFile, kernel.getNaming(), new ModuleIDBuilder());
        Repository repository = null;

        AbstractName moduleName = module.getModuleName();
        EARContext earContext = createEARContext(outputPath, defaultEnvironment, repository, configStore, moduleName);
        AbstractName jaccBeanName = kernel.getNaming().createChildName(moduleName, "foo", NameFactory.JACC_MANAGER);
        GBeanData jaccBeanData = new GBeanData(jaccBeanName, ApplicationPolicyConfigurationManager.GBEAN_INFO);
View Full Code Here

            } else {
                uri = all[all.length - 1];
            }
        }
        for (int i = 0; i < repos.length; i++) {
            Repository repo = repos[i];
            if (repo.contains(uri)) {
                return repo.getLocation(uri);
            }
        }
        return null;
    }
View Full Code Here

        }
        // Step 2: check if it's in a repository
        Set repos = kernel.listGBeans(new AbstractNameQuery(Repository.class.getName()));
        for (Iterator it = repos.iterator(); it.hasNext();) {
            AbstractName name = (AbstractName) it.next();
            Repository repo = (Repository) kernel.getProxyManager().createProxy(name, Repository.class);
            if(repo.contains(configId)) {
                File path = repo.getLocation(configId);
                if(!path.exists()) throw new IllegalStateException("Can't find file '"+path.getAbsolutePath()+"' though repository said there's an artifact there!");
                response.setContentType("application/zip");
                if(!reply) {
                    return true;
                }
View Full Code Here

            if (resource.isSetExternalRar()) {
                path = resource.getExternalRar().trim();
                Artifact artifact = Artifact.create(path);
                File file = null;
                for (Iterator iterator = repositories.iterator(); iterator.hasNext();) {
                    Repository repository = (Repository) iterator.next();
                    if (repository.contains(artifact)) {
                        file = repository.getLocation(artifact);
                        break;
                    }
                }
                if (file == null) {
                    throw new DeploymentException("Missing rar in repositories: " + path);
View Full Code Here

            } else {
                uri = all[all.length - 1];
            }
        }
        for (int i = 0; i < repos.length; i++) {
            Repository repo = repos[i];
            if (repo.contains(uri)) {
                return repo.getLocation(uri);
            }
        }
        return null;
    }
View Full Code Here

        }
        // Step 2: check if it's in a repository
        Set repos = kernel.listGBeans(new AbstractNameQuery(Repository.class.getName()));
        for (Iterator it = repos.iterator(); it.hasNext();) {
            AbstractName name = (AbstractName) it.next();
            Repository repo = (Repository) kernel.getProxyManager().createProxy(name, Repository.class);
            if(repo.contains(configId)) {
                File path = repo.getLocation(configId);
                if(!path.exists()) throw new IllegalStateException("Can't find file '"+path.getAbsolutePath()+"'");
                response.setContentType("application/zip");
                if(!reply) {
                    return true;
                }
View Full Code Here

            } else {
                uri = all[all.length - 1];
            }
        }
        for (int i = 0; i < repos.length; i++) {
            Repository repo = repos[i];
            if (repo.contains(uri)) {
                return repo.getLocation(uri);
            }
        }
        return null;
    }
View Full Code Here

                } else {
                    String path = gerExtModule.getExternalPath().trim();
                    Artifact artifact = Artifact.create(path);
                    File location = null;
                    for (Iterator iterator = repositories.iterator(); iterator.hasNext();) {
                        Repository repository = (Repository) iterator.next();
                        if (repository.contains(artifact)) {
                             location = repository.getLocation(artifact);
                            break;
                        }
                    }
                    if (location == null) {
                        throw new DeploymentException(moduleTypeName + " is missing in repositories: " + path);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.kernel.repository.Repository

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.