Commit bac87b9b authored by Lionel Seinturier's avatar Lionel Seinturier

Propage to the COMP mode recent commits about minor additional framework...

Propage to the COMP mode recent commits about minor additional framework behavior when setting/unsetting collection references.
parent 48c0e570
......@@ -208,12 +208,26 @@ with UseComponentTrait with SCAExtendedContentControllerTrait {
if( !found ) {
srs.add(value);
}
/*
* Re-inject the reference of the list even if this is not
* needed. This follows a discussion with Philippe on 7
* March 2013 that needs a way to be notified that something
* has changed. Reinjecting has the side-effect of invoking
* the setter (in the case the injection point corresponds
* to asetter/getter), and enables to be notified that
* something has changed in the list of references.
*/
ip.set(content,srs)
}
else if( classOf[java.util.Map[_,_]].isAssignableFrom(iptype) ) {
// Fraclet style collection reference
val srs = ip.get(content).asInstanceOf[java.util.Map[String,ServiceReference[_]]]
srs.put(name,value)
// Same comment as for SCA style collection references
ip.set(content,srs)
}
else {
// Singleton reference
......@@ -254,13 +268,26 @@ with UseComponentTrait with SCAExtendedContentControllerTrait {
}
}
srs.remove(toBeRemoved)
/*
* Re-inject the reference of the list even if this is not
* needed. This follows a discussion with Philippe on 7
* March 2013 that needs a way to be notified that something
* has changed. Reinjecting has the side-effect of invoking
* the setter (in the case the injection point corresponds
* to asetter/getter), and enables to be notified that
* something has changed in the list of references.
*/
ip.set(content,srs)
}
else if( classOf[java.util.Map[_,_]].isAssignableFrom(iptype) ) {
// Fraclet style collection reference
val srs = ip.get(content).asInstanceOf[java.util.Map[String,ServiceReference[_]]]
srs.remove(name)
// Same comment as for SCA style collection references
ip.set(content,srs)
}
else {
// Singleton reference
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment