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
On 7/30/07, Luciano Resende <[EMAIL PROTECTED]> wrote:
> I guess Venkata is trying to create the deployedArtifact to resolve...
>
> >To resolve an artifact, you simple need to create a DeployedArtifact -
> >see ContributionFactory.createDeployedArtifact() -, set it's URI to the
> >URI of the artifact inside the SCA contribution, then call
> >ModelResolver.resolve(theDeployedArtifact).
>
> But I'll wait to see the code.
>
> On 7/30/07, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:
> > Venkata Krishnan wrote:
> > > Hi Sebastien / Luciano,
> > >
> > > I have this going in my local. But I've had to pass the
> > > ContributionFactory down to the CompositeProcessor thus adding one
> > > more argument to the CompositeProcessor contructor. Is there any
> > > violation of layering in our design with this passing? Just want to
> > > check this up before I commit the changes.
> > >
> > > Thanks
> > >
> > > - Venkat
> > >
> > >
> >
> > I'm not quite sure I understand the relationship between
> > ContributionFactory and resolution of a file. Could you post the code
> > somewhere? It'll help me understand. Thanks.
> >
> > --
> > Jean-Sebastien
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende
> http://lresende.blogspot.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]