diff options
Diffstat (limited to 'nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/spring/Conditions.java')
-rw-r--r-- | nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/spring/Conditions.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/spring/Conditions.java b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/spring/Conditions.java index 0554cbea..defa340a 100644 --- a/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/spring/Conditions.java +++ b/nokiav2/driver/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/spring/Conditions.java @@ -29,21 +29,24 @@ import static com.google.common.collect.Sets.newHashSet; * Collects the possibilities of sources */ public class Conditions { - private static final String USE_DIRECT_INTEGRATION = "direct"; - private static Set<Condition> getAllSources() { - return newHashSet(new UseForVfc(), new UseForDirect()); + private Conditions() { + //use static way } /** * Represents the condition for using VF-C */ public static class UseForVfc implements Condition { + private static Set<Condition> getAllSources() { + return newHashSet(new UseForVfc(), new UseForDirect()); + } + @Override public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) { boolean anyOtherSourceAvailable = false; - for (Condition condition : Conditions.getAllSources()) { + for (Condition condition : UseForVfc.getAllSources()) { if (!(condition instanceof UseForVfc) && condition.matches(conditionContext, annotatedTypeMetadata)) { anyOtherSourceAvailable = true; } |