[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Capability Questions


1. In IInstallableUnit the NAMESPACE_IU_ID says:
A capability namespace representing a particular InstallableUnit by id.
Each InstallableUnit automatically provides a capability in this namespace representing itself, ...


Where does this "automatically provided capability" get added? My IU doesn't seem to have it, but maybe I'm not creating them properly.
This generally added during publishing. See callers of AbstractPublishingAction.createSelfCapability().
2. In InstallableUnit, why is addProvidedCapability protected? Is this not the intended way to add provided capabilities to an IU.
First thing to note is that InstallableUnit is not api. It is an implementation bit. The current pattern is for people (e.g., the publisher) to create InstallableUnitDescriptions and then, when all is well, instantiate that using the MetadataFactory and ultimately get an IInstallableUnit.

Jeff