Difference between revisions of "Virgo/Community/Migrating from 3.0.x to 3.5.0"

From Eclipsepedia

Jump to: navigation, search
(New page: = Modified Directory Layout = TBD = Transformer Signature = Transformer services in Virgo 3.5.0 operate in terms of a directed acyclic graph of install artefacts instead of the tree whi...)
 
(Transformer Signature)
Line 9: Line 9:
 
If you provide a Transformer service, you'll need to rework it to implement the modified signature. For example, the WebTransformer.transform method needed to be changed as follows:
 
If you provide a Transformer service, you'll need to rework it to implement the modified signature. For example, the WebTransformer.transform method needed to be changed as follows:
  
public void transform(GraphNode<InstallArtifact> installGraph, InstallEnvironment installEnvironment) throws DeploymentException {
+
public void transform(GraphNode<InstallArtifact> installGraph, InstallEnvironment installEnvironment) throws DeploymentException {
            installGraph.visit(new ExceptionThrowingDirectedAcyclicGraphVisitor<InstallArtifact, DeploymentException>() {
+
    installGraph.visit(new ExceptionThrowingDirectedAcyclicGraphVisitor<InstallArtifact, DeploymentException>() {
 
      
 
      
              public boolean visit(GraphNode<InstallArtifact> node) throws DeploymentException {
+
        public boolean visit(GraphNode<InstallArtifact> node) throws DeploymentException {
 
                 InstallArtifact installArtifact = node.getValue();
 
                 InstallArtifact installArtifact = node.getValue();
                if (checkWebBundle(installArtifact)) {
+
                ...
                    applyWebContainerTransformations((BundleInstallArtifact) installArtifact);
+
        }
                }
+
    });
   
+
}
                  return true;
+
                }
+
            });
+
      }
+

Revision as of 12:02, 28 November 2011

Modified Directory Layout

TBD

Transformer Signature

Transformer services in Virgo 3.5.0 operate in terms of a directed acyclic graph of install artefacts instead of the tree which was used by Virgo 3.0.x.

If you provide a Transformer service, you'll need to rework it to implement the modified signature. For example, the WebTransformer.transform method needed to be changed as follows:

public void transform(GraphNode<InstallArtifact> installGraph, InstallEnvironment installEnvironment) throws DeploymentException {
    installGraph.visit(new ExceptionThrowingDirectedAcyclicGraphVisitor<InstallArtifact, DeploymentException>() {
   
        public boolean visit(GraphNode<InstallArtifact> node) throws DeploymentException {
                InstallArtifact installArtifact = node.getValue();
                ...
        }
    });
}