aboutsummaryrefslogtreecommitdiffstats
path: root/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/type/ConfigurationQuery.java
diff options
context:
space:
mode:
authoramitjai <amitjai@amdocs.com>2018-04-27 13:28:57 +0530
committerOren Kleks <orenkle@amdocs.com>2018-04-30 06:05:27 +0000
commit42c920baf4dbb9fe8775843a6d4c9f70fa29f064 (patch)
treeac2aff977e2b129e61d2166c4832842676e4f5c3 /common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/type/ConfigurationQuery.java
parentf487427a32f410ab5c97a4092865d32beb88ee27 (diff)
Rename packages from openecomp to onap.
This task is all about package name space change also make changes to pom for common module Change-Id: Ie9bda0f958a9a05826c0374830cc9cb7d6d196b6 Issue-ID: SDC-1272 Signed-off-by: amitjai <amitjai@amdocs.com>
Diffstat (limited to 'common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/type/ConfigurationQuery.java')
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/type/ConfigurationQuery.java94
1 files changed, 94 insertions, 0 deletions
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/type/ConfigurationQuery.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/type/ConfigurationQuery.java
new file mode 100644
index 0000000000..6aec7c27da
--- /dev/null
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/type/ConfigurationQuery.java
@@ -0,0 +1,94 @@
+package org.onap.config.type;
+
+import org.onap.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;
+ }
+}