Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2008, 2011 VMware Inc. and others 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 EclipseSource - Bug 358442 Change InstallArtifact graph from a tree to a DAG /
package org.eclipse.virgo.kernel.model.internal.deployer;
import  org.eclipse.equinox.region.Region;
Implementation of org.eclipse.virgo.kernel.model.internal.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<GraphNode<InstallArtifact>> children = ((DeployerCompositeArtifactrootArtifact).getInstallArtifact().getGraph().getChildren();
        for (GraphNode<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