From 280f8015d06af1f41a3ef12e8300801c7a5e0d54 Mon Sep 17 00:00:00 2001 From: AviZi Date: Fri, 9 Jun 2017 02:39:56 +0300 Subject: [SDC-29] Amdocs OnBoard 1707 initial commit. Change-Id: Ie4d12a3f574008b792899b368a0902a8b46b5370 Signed-off-by: AviZi --- .../openecomp/config/type/ConfigurationQuery.java | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/type/ConfigurationQuery.java (limited to 'common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/type/ConfigurationQuery.java') diff --git a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/type/ConfigurationQuery.java b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/type/ConfigurationQuery.java new file mode 100644 index 0000000000..53b0eed954 --- /dev/null +++ b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/type/ConfigurationQuery.java @@ -0,0 +1,94 @@ +package org.openecomp.config.type; + +import org.openecomp.config.Constants; + +public class ConfigurationQuery { + + String tenant = Constants.DEFAULT_TENANT; + String namespace = Constants.DEFAULT_NAMESPACE; + String key; + boolean fallback; + boolean externalLookup; + boolean latest; + private boolean nodeSpecific; + + public ConfigurationQuery fallback(boolean fallback) { + this.fallback = fallback; + return this; + } + + public ConfigurationQuery latest(boolean val) { + this.latest = val; + return this; + } + + public ConfigurationQuery nodeSpecific(boolean val) { + this.nodeSpecific = val; + return this; + } + + public ConfigurationQuery externalLookup(boolean val) { + this.externalLookup = val; + return this; + } + + /** + * Tenant configuration query. + * + * @param id the id + * @return the configuration query + */ + public ConfigurationQuery tenant(String id) { + if (id != null) { + tenant = id; + } + return this; + } + + + /** + * Namespace configuration query. + * + * @param id the id + * @return the configuration query + */ + public ConfigurationQuery namespace(String id) { + if (id != null) { + namespace = id; + } + return this; + } + + public ConfigurationQuery key(String id) { + key = id; + return this; + } + + public String getTenant() { + return tenant.toUpperCase(); + } + + public String getNamespace() { + return namespace.toUpperCase(); + } + + public String getKey() { + return key; + } + + public boolean isFallback() { + return fallback; + } + + public boolean isNodeSpecific() { + return nodeSpecific; + } + + public boolean isExternalLookup() { + return externalLookup; + } + + public boolean isLatest() { + return latest; + } +} -- cgit 1.2.3-korg