Package org.apache.geronimo.kernel.repository

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


        //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


* @version $Rev: 356034 $ $Date: 2005-12-11 13:41:23 -0800 (Sun, 11 Dec 2005) $
*/
public class RepoConfigInstaller extends BaseConfigInstaller {

    public void execute() throws Exception {
        Repository sourceRepo = new InnerRepository();
        URI rootURI = targetRoot.toURI().resolve(targetRepository);
        FileSystemRepository targetRepo = new FileSystemRepository(rootURI, null);
        InstallAdapter installAdapter = new CopyConfigStore(targetRepo);
        targetRepo.doStart();

View Full Code Here

            public boolean containsConfiguration(URI configID) {
                return store.containsConfiguration(configID);
            }
        };
        Repository sourceRepo = new InnerRepository();
        URI rootURI = targetRoot.toURI().resolve(targetRepository);
        FileSystemRepository targetRepo = new FileSystemRepository(rootURI, null);
        targetRepo.doStart();

        try {
View Full Code Here

        int idx = 0;
        for (Iterator i = dependencies.iterator(); i.hasNext();) {
            URI uri = (URI) i.next();
            URL url = null;
            for (Iterator j = repositories.iterator(); j.hasNext();) {
                Repository repository = (Repository) j.next();
                if (repository.hasURI(uri)) {
                    url = repository.getURL(uri);
                    break;
                }
            }
            if (url == null) {
                throw new MissingDependencyException("Unable to resolve dependency " + uri);
View Full Code Here

            fail("could not create temp dir");
        }
        try {
            DeploymentContext context = new DeploymentContext(outFile, URI.create("foo/bar"), ConfigurationModuleType.SERVICE, parentId, "domain", "server", null);
            J2eeContext j2eeContext = new J2eeContextImpl("domain", "server", "null", "test", "configtest", "foo", NameFactory.J2EE_MODULE);
            ServiceConfigBuilder.addDependencies(context, plan.getDependencyArray(), new Repository() {

                public boolean hasURI(URI uri) {
                    return true;
                }
View Full Code Here

    private static URL getRAR(PortletRequest request, String rarPath) {
        try {
            URI uri = new URI(rarPath);
            Repository[] repos = PortletManager.getRepositories(request);
            for (int i = 0; i < repos.length; i++) {
                Repository repo = repos[i];
                URL url = repo.getURL(uri);
                if(url != null && url.getProtocol().equals("file")) {
                    File file = new File(url.getPath());
                    if(file.exists() && file.canRead() && !file.isDirectory()) {
                        return url;
                    }
View Full Code Here

    public static ListableRepository[] getListableRepositories(PortletRequest request) {
        ManagementHelper helper = getManagementHelper(request);
        Repository[] list = helper.getRepositories(getCurrentServer(request));
        List result = new ArrayList();
        for (int i = 0; i < list.length; i++) {
            Repository repository = list[i];
            if(repository instanceof ListableRepository) {
                result.add(repository);
            }
        }
        return (ListableRepository[]) result.toArray(new ListableRepository[result.size()]);
View Full Code Here

    public static WriteableRepository[] getWritableRepositories(PortletRequest request) {
        ManagementHelper helper = getManagementHelper(request);
        Repository[] list = helper.getRepositories(getCurrentServer(request));
        List result = new ArrayList();
        for (int i = 0; i < list.length; i++) {
            Repository repository = list[i];
            if(repository instanceof WriteableRepository) {
                result.add(repository);
            }
        }
        return (WriteableRepository[]) result.toArray(new WriteableRepository[result.size()]);
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

        //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", SecurityNames.JACC_MANAGER);
        GBeanData jaccBeanData = new GBeanData(jaccBeanName, ApplicationPolicyConfigurationManager.GBEAN_INFO);
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.