Jean-Sebastien Delfino wrote:
Venkata Krishnan wrote:
Luciano, you are right... here is the code snippet that I have added
to the CompositeProcessor.resolve()
for (ComponentProperty componentProperty : component.getProperties()) {
if ( componentProperty.getFile() != null &&
componentProperty.getFile().length() > 0 ) {
DeployedArtifact deployedArtifact =
contributionFactory.createDeployedArtifact();
deployedArtifact.setURI(componentProperty.getFile());
deployedArtifact =
resolver.resolveModel(DeployedArtifact.class, deployedArtifact);
if ( deployedArtifact.getLocation() != null &&
deployedArtifact.getLocation().length() > 0 ) {
componentProperty.setFile(deployedArtifact.getLocation());
}
}
}
Thanks
- Venkat
OK, I understand better now :) What you're proposing looks fine to me.
CompositeProcessor already depends on ArtifactProcessor, ModelResolver
etc. which are all from the contribution module. So passing a pointer
to ContributionFactory to it does not alter any layering.
One minor comment, I'd suggest to remove the:
&& componentProperty.getFile().length() > 0, as it'll mask a syntax
error in the .composite file
and
&& deployedArtifact.getLocation().length() > 0, as it'll mask a serious
error in the contribution service
--
Jean-Sebastien
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]