Package org.apache.geronimo.kernel.repository

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


    protected ConfigurationData buildMasterConfigurationData(ConfigurationData configurationData,
        Artifact slaveConfigId) {
        Environment environment = buildEnvironment(configurationData);

        Artifact configId = environment.getConfigId();
       
        List<GBeanData> gbeans = buildControllerGBeans(configId, slaveConfigId);
       
        File configurationDir = delegate.createNewConfigurationDir(configId);
       
View Full Code Here


            return new AbstractNameQuery(null, nameMap);
        }

        //construct name from components
        PatternType pattern = resourceLocator.getPattern();
        Artifact artifact = null;
        if (pattern.getArtifactId() != null) {
            artifact = new Artifact(pattern.getGroupId(), pattern.getArtifactId(), pattern.getVersion(), "car");
        }

        Map<String, String> nameMap = new HashMap<String, String>();
        nameMap.put("name", pattern.getName());
        nameMap.put("j2eeType", NameFactory.JCA_RESOURCE_ADAPTER);
View Full Code Here

    private static List getConfigClassLoaders(List configurationNames) {
        List classLoaders = new ArrayList();
        ConfigurationManager configurationManager = PortletManager.getConfigurationManager();
        for (int i = 0; i < configurationNames.size(); i++) {
            Artifact configurationId = Artifact.create((String) configurationNames.get(i));
            classLoaders.add(configurationManager.getConfiguration(configurationId).getConfigurationClassLoader());
        }
        return classLoaders;
    }
View Full Code Here

            for (int i = 0; i < numDependencies; i++) {
                dependencies[i] = new org.apache.geronimo.deployment.service.jsr88.Artifact();
            }
            environment.setDependencies(dependencies);
            for (int i = 0; i < numDependencies; i++) {
                Artifact artifact = Artifact.create(((String) data.getDependencies().get(i)).trim());
                org.apache.geronimo.deployment.service.jsr88.Artifact dep = dependencies[i];
                dep.setArtifactId(artifact.getArtifactId());
                if (artifact.getGroupId() != null) {
                    dep.setGroupId(artifact.getGroupId());
                }
                if (artifact.getType() != null) {
                    dep.setType(artifact.getType());
                }
                if (artifact.getVersion() != null) {
                    dep.setVersion(artifact.getVersion().toString());
                }
            }
        }
        String hiddenClassesString = data.getHiddenClasses();
        if (hiddenClassesString != null && hiddenClassesString.length() > 0) {
View Full Code Here

    }

    public static File getRepositoryEntry(PortletRequest request, String repositoryURI) {
        J2EEServer server = getCurrentServer(request);
        Repository[] repos = server.getRepositories();
        Artifact uri = Artifact.create(repositoryURI);
        if (!uri.isResolved()) {
            Artifact[] all = server.getConfigurationManager().getArtifactResolver().queryArtifacts(uri);
            if (all.length == 0) {
                return null;
            } else {
                uri = all[all.length - 1];
View Full Code Here

                        }
                    }
                }


                repo.copyToRepository(file, new Artifact(group, artifact, version, fileType), new FileWriteMonitor() {
                    public void writeStarted(String fileDescription, int fileSize) {
                        log.info("Copying into repository " + fileDescription + "...");
                    }

                    public void writeProgress(int bytes) {
View Full Code Here

        PluginListType list = getServerPluginList(request, pluginInstaller);
        PluginListType installList = getPluginsFromIds(configIds, list);

        try {
            DownloadResults downloadResults = pluginInstaller.installPluginList("repository", relativeServerPath, installList);
            archiver.archive(relativeServerPath, "var/temp", new Artifact(groupId, artifactId, version, format));
        } catch (Exception e) {
            throw new PortletException("Could not assemble server", e);
        }
        return INDEX_MODE;
    }
View Full Code Here

                configId.setGroupId("console.jms");
                configId.setArtifactId(data.instanceName);
                configId.setVersion("1.0");
                configId.setType("rar");
                if(data.dependency != null && !data.dependency.trim().equals("")) {
                    Artifact artifact = Artifact.create(data.dependency.trim());
                    org.apache.geronimo.deployment.service.jsr88.Artifact dep = new org.apache.geronimo.deployment.service.jsr88.Artifact();
                    environment.setDependencies(new org.apache.geronimo.deployment.service.jsr88.Artifact[]{dep});
                    dep.setArtifactId(artifact.getArtifactId());
                    if(artifact.getGroupId() != null) {
                        dep.setGroupId(artifact.getGroupId());
                    }
                    if(artifact.getType() != null) {
                        dep.setType(artifact.getType());
                    }
                    if(artifact.getVersion() != null) {
                        dep.setVersion(artifact.getVersion().toString());
                    }
                }
               
                // Basic settings on RA plan and RA instance
                ResourceAdapter ra;
View Full Code Here

                if (deploymentStream != null) {
                    deploymentPlan = createTempFile(null);
                    copyTo(deploymentPlan, deploymentStream);
                }
            }
            Artifact configID = null;
            if(deploymentPlan != null) {
                String extracted = ConfigIDExtractor.extractModuleIdFromPlan(deploymentPlan);
                if(extracted != null) {
                    configID = Artifact.create(extracted);
                }
            } else {
                String extracted = ConfigIDExtractor.extractModuleIdFromArchive(moduleArchive);
                if(extracted != null) {
                    configID = Artifact.create(extracted);
                }
            }
            if(configID != null && configID.getGroupId() == null) {
                configID = new Artifact(Artifact.DEFAULT_GROUP_ID, configID.getArtifactId(),
                                        configID.getVersion(), configID.getType());
            }

            ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
            try {
                for (int i = 0; i < modules.length; i++) {
                    TargetModuleIDImpl module = (TargetModuleIDImpl) modules[i];
                    Artifact artifact = Artifact.create(module.getModuleID());
                    if(configID != null && configID.isResolved()) {
                        if(configID.getGroupId().equals(artifact.getGroupId()) &&
                                configID.getArtifactId().equals(artifact.getArtifactId()) &&
                                configID.getVersion().equals(artifact.getVersion())) {
                            redeploySameConfiguration(configurationManager, artifact, module.getTarget());
                        } else {
                            redeployUpdatedConfiguration(configurationManager, artifact, module.getTarget());
                        }
                    } else {
View Full Code Here

    }

    public void setDependencyFilterStrings(List<String> filterStrings) {
        dependencyFilters = new HashSet<Artifact>();
        for (String filterString: filterStrings) {
            Artifact filter = Artifact.createPartial(filterString);
            dependencyFilters.add(filter);
        }
    }
View Full Code Here

TOP

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

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.