Bug 528387 - Dedicated xml elements for generic requirements

- Renamed IProvidedCapability.getAttributes() to getProperties(). This
is in sync with other parts of p2 that use "properties" for such data.
E.g. the IU properties.

- Extended content.xml read/write with a new serialization format for
requirements with the "requiredProperties" element. It is used to build
an IRequirement that has a standard match expression that applies an
LDAP filter to the capability properties. It was not possible to extend
the existing "required" element in a way that will make old p2 builds
ignore the extended version.

- Extended the content.xml read/write shared properties handling logic
with "type" attribute. Older p2 builds will ignore it and use strings.
Also the "type" attribute only appears in the "properties" extension of
"provides" which will be ignored by old p2 builds to begin with.

- Some additional cleanup to the content.xml read/write

- Increased the current content.xml format version from 1.1.0 to 1.2.0.
Old p2 builds declare compatibility with [1.0.0, 2).

- Made the handling of the property types supported by a capability
safer. E.g. unknown types are converted to Strings. E.g.
ProvidedCapability verifies that only supported types are used.

- Made the handling of generic requirements reflect the real semantics.
E.g. with correct handling of the resolution:=optional|mandatory flag
rather than to declare everything optional to avoid breakages in older
p2 builds. This is possible because the "requiredProperties" element is
completely ignored by older builds. E.g. now if an extender or service
is missing provisioning will fail as it is supposed to.

- Added factory methods to MetadataFactory for LDAP based requirements.

- Added a planner test for LDAP requirements

- Cleaned up the AutomatedDirectorTest

- Cleaned up some LDAP matching test cases.

Change-Id: Ifff77b3ea4c9cea33fd236ed101b1f33c173891d
Signed-off-by: Todor Boev <rinsvind@gmail.com>
27 files changed