Add prefix matching for policy version 59/85259/9
authorJim Hahn <jrh3@att.com>
Sat, 13 Apr 2019 13:05:13 +0000 (09:05 -0400)
committerJim Hahn <jrh3@att.com>
Sun, 14 Apr 2019 20:43:51 +0000 (16:43 -0400)
commitc8d0a3d8b7df3b09ce3405f1192754fdef7026d3
tree27651921942e65b243f0d4110592b759d7afd2d8
parentc38fcf1a16f0d6bfdf2d80efa64a94ae68d80f03
Add prefix matching for policy version

Re-introduced regular expressions to match policy version
so that the policy version found in the metadata, which is just
the major number, can be matched with a policy's version, which
is of the form, major.minor.patch.
Simplified equals() test, as we already know "text!=null".
Added filterPrefixPred() and modified policy filter to use it when
matching versions, as it is simpler to use when matching a version
prefix.
Also added tests to PfObjectFilterTest to test each of the XxxPred()
methods.

Change-Id: I0734873f701a539e883fe25b8eecfdde60cc8b6d
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
models-base/src/main/java/org/onap/policy/models/base/PfObjectFilter.java
models-base/src/test/java/org/onap/policy/models/base/PfObjectFilterTest.java
models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyFilter.java
models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyFilterTest.java