osgi / bugzilla-archive

Archive of OSGi Alliance Specification Bugzilla bugs. The Specification Bugzilla system was decommissioned with the move to GitHub. The issues in this repository are imported from the Specification Bugzilla system for archival purposes.
0 stars 1 forks source link

[Metatype] Make AD cardinality 0.n in OCD #2598

Closed bjhargrave closed 9 years ago

bjhargrave commented 9 years ago

Original bug ID: BZ#2730 From: David Jencks <djencks@us.ibm.com> Reported version: R6

bjhargrave commented 9 years ago

Comment author: David Jencks <djencks@us.ibm.com>

The primary within-specs purpose of this is to supply metatype for "marker configurations" with no properties to control the existence of DS components with configuration REQUIRE. This could be satisfied by a special singleton OCD with no ADs, but that could not be referenced from a designate without breaking the condition that the designate has to be in the same bundle as the OCD.

I happen to have some metatype extensions that would make empty OCDs more generally useful.

In a little more detail:

You have a DS component that doesn't actually need any configuration properties, but you want to control whether the component is available or not by the presence or absence of a Configuration: therefore you specify configuration-policy REQUIRE. Now you want to integrate the configuration with your metatype. Currently in order to do this you have to include a bogus useless AD to satisfy the 1.n AD cardinality. I'm proposing to change the cardinality to 0.n to allow empty OCDs for this situation.

The same situation could occur with ManagedService/ManagedServiceFactory.

The references to the 1.n cardinality that I've located are (in the enterprise R5 spec) in figure 105.3, just below it in OCD ::= AD+ Icon

and in the schema

bjhargrave commented 9 years ago

Comment author: @bjhargrave

CPEG f2f: Agreed to allow OCD to contain zero AD. BJ will update the schema and the spec.

bjhargrave commented 9 years ago

Comment author: @bjhargrave

Fixed by https://www.osgi.org/members/gitweb/build.git/commit/eb8f4c474a47433ed986371454c5578fbf104e52