Package org.apache.geronimo.kernel.repository

Examples of org.apache.geronimo.kernel.repository.Artifact.matches()


            Artifact artifact = toArtifact(metadata.getModuleId());
            if (configManager.isInstalled(artifact)) {
                boolean upgrade = false;
                for (ArtifactType obsolete : metadata.getObsoletes()) {
                    Artifact test = toArtifact(obsolete);
                    if (test.matches(artifact)) {
                        upgrade = true;
                        break;
                    }
                }
                if (!upgrade) {
View Full Code Here


            Artifact artifact = Artifact.create(module);
            artifact = new Artifact(artifact.getGroupId() == null && fromPlan ? Artifact.DEFAULT_GROUP_ID : artifact.getGroupId(),
                    artifact.getArtifactId(), fromPlan ? (Version)null : artifact.getVersion(), artifact.getType());
            // First pass: exact match
            for(int i=0; i<allModules.length; i++) {
                if(allModules[i].getTarget().getName().equals(target) && artifact.matches(Artifact.create(allModules[i].getModuleID()))) {
                    list.add(allModules[i]);
                }
            }
        }
        if(!list.isEmpty()) {
View Full Code Here

                    artifact.getArtifactId(), fromPlan ? (Version)null : artifact.getVersion(), artifact.getType());
        } else {
            artifact = new Artifact(fromPlan ? Artifact.DEFAULT_GROUP_ID : null, name, (Version)null, null);
        }
        for(int i = 0; i < allModules.length; i++) {
            if(artifact.matches(Artifact.create(allModules[i].getModuleID()))) {
                list.add(allModules[i]);
            }
        }
        if(list.isEmpty()) {
            throw new DeploymentException(name+" does not appear to be a the name of a module " +
View Full Code Here

    }

    private boolean hasHardDependency(Artifact configurationId, ConfigurationData configurationData) {
        for (Dependency dependency : configurationData.getEnvironment().getDependencies()) {
            Artifact artifact = dependency.getArtifact();
            if (artifact.getVersion() != null && artifact.matches(configurationId)) {
                return true;
            }
        }

        for (ConfigurationData childConfigurationData : configurationData.getChildConfigurations().values()) {
View Full Code Here

            Artifact artifact = Artifact.create(module);
            artifact = new Artifact(artifact.getGroupId() == null && fromPlan ? Artifact.DEFAULT_GROUP_ID : artifact.getGroupId(),
                    artifact.getArtifactId(), fromPlan ? (Version)null : artifact.getVersion(), artifact.getType());
            // First pass: exact match
            for(int i=0; i<allModules.length; i++) {
                if(allModules[i].getTarget().getName().equals(target) && artifact.matches(Artifact.create(allModules[i].getModuleID()))) {
                    list.add(allModules[i]);
                }
            }
        }
        if(!list.isEmpty()) {
View Full Code Here

                    artifact.getArtifactId(), fromPlan ? (Version)null : artifact.getVersion(), artifact.getType());
        } else {
            artifact = new Artifact(fromPlan ? Artifact.DEFAULT_GROUP_ID : null, name, (Version)null, null);
        }
        for(int i = 0; i < allModules.length; i++) {
            if(artifact.matches(Artifact.create(allModules[i].getModuleID()))) {
                list.add(allModules[i]);
            }
        }
        if(list.isEmpty()) {
            throw new DeploymentException(name+" does not appear to be a the name of a module " +
View Full Code Here

        for (Artifact name : results.getLoaded()) {
            updateStatus("Loaded "+name);
        }
        for (Artifact name : results.getStarted()) {
            updateStatus("Started "+name);
            if(configID.matches(name)) {
                newStarted = true;
            }
        }
        for(Map.Entry<Artifact, Throwable> entry : results.getFailed().entrySet()) {
            updateStatus("Failed on " + entry.getKey() + ": " + entry.getValue().getMessage());
View Full Code Here

            } else {
                if (configManager.isInstalled(artifact)) {
                    boolean upgrade = false;
                    for (ArtifactType obsolete : metadata.getObsoletes()) {
                        Artifact test = toArtifact(obsolete);
                        if (test.matches(artifact)) {
                            upgrade = true;
                            break;
                        }
                    }
                    if (!upgrade && installedArtifacts.contains(artifact)) {
View Full Code Here

        Set<Map.Entry<AbstractName, GBeanData>> gbeanNames = configuration.getGBeans().entrySet();
        for (AbstractNameQuery abstractNameQuery : patterns) {
            Artifact queryArtifact = abstractNameQuery.getArtifact();

            // Does this query apply to this configuration
            if (queryArtifact == null || queryArtifact.matches(configuration.getId())) {

                // Search the GBeans
                for (Map.Entry<AbstractName, GBeanData> entry : gbeanNames) {
                    AbstractName abstractName = entry.getKey();
                    GBeanData gbeanData = entry.getValue();
View Full Code Here

    }

    private boolean hasHardDependency(Artifact configurationId, ConfigurationData configurationData) {
        for (Dependency dependency : configurationData.getEnvironment().getDependencies()) {
            Artifact artifact = dependency.getArtifact();
            if (artifact.getVersion() != null && artifact.matches(configurationId)) {
                return true;
            }
        }

        for (ConfigurationData childConfigurationData : configurationData.getChildConfigurations().values()) {
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.