Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2008, 2010 VMware Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors: VMware Inc. - initial contribution /
package org.eclipse.virgo.kernel.model.internal.deployer;
import  org.eclipse.equinox.region.Region;
Implementation of DependencyDeterminer that returns the dependent of a Plan. The dependents consist of the artifacts specified in the plan.

This class makes the assumption that the children of a composite artifact will always be in the same region as the parent. Concurrent Semantics

    private final Region globalRegion;
    private final Region userRegion;
    public DeployerCompositeArtifactDependencyDeterminer(@NonNull RuntimeArtifactRepository artifactRepository, @NonNull Region userRegion, @NonNull Region globalRegion) {
        this. = artifactRepository;
        this. = userRegion;
        this. = globalRegion;

    public Set<ArtifactgetDependents(Artifact rootArtifact) {
        if (!(rootArtifact instanceof DeployerCompositeArtifact)) {
            return Collections.<ArtifactemptySet();
        final Set<Artifactdependents = new HashSet<Artifact>();
        List<Tree<InstallArtifact>> children = ((DeployerCompositeArtifactrootArtifact).getInstallArtifact().getTree().getChildren();
        for (Tree<InstallArtifactchild : children) {
            InstallArtifact artifact = child.getValue();
                dependents.add(this..getArtifact(artifact.getType(), artifact.getName(), artifact.getVersion(), this.));
                dependents.add(this..getArtifact(artifact.getType(), artifact.getName(), artifact.getVersion(), this.));
        return dependents;
New to GrepCode? Check out our FAQ X