aboutsummaryrefslogtreecommitdiffstats
path: root/common-app-api/src/main/java
diff options
context:
space:
mode:
authorilanap <ilanap@amdocs.com>2019-11-26 11:53:36 +0200
committerilanap <ilanap@amdocs.com>2019-11-27 10:02:46 +0200
commit1367b73c1d1d761939f5893c711f87716a7baad0 (patch)
treeca3e94977db0575e30070d2f852c5184c4a38a06 /common-app-api/src/main/java
parent1d3f7e44c9773db172694e8abe0c1ffea1538e37 (diff)
Add API to retrieve UI configuration
Added configuration file with the menu configuration from catalog-ui. Added to the configuration manager. to chef and to the ui rest APIs. Issue-ID: SDC-2663 Signed-off-by: ilanap <ilanap@amdocs.com> Change-Id: Ia5e014a273238981241821c0d81b0455bd662b28 Signed-off-by: ilanap <ilanap@amdocs.com>
Diffstat (limited to 'common-app-api/src/main/java')
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/fe/config/ConfigurationManager.java10
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/fe/config/WorkspaceConfiguration.java46
2 files changed, 56 insertions, 0 deletions
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/fe/config/ConfigurationManager.java b/common-app-api/src/main/java/org/openecomp/sdc/fe/config/ConfigurationManager.java
index aafbdc7aa0..5aa2d1f79d 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/fe/config/ConfigurationManager.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/fe/config/ConfigurationManager.java
@@ -54,6 +54,7 @@ public class ConfigurationManager implements FileChangeCallback, IEcompConfigura
loadConfigurationClass(RestConfigurationInfo.class);
loadConfigurationClass(EcompErrorConfiguration.class);
loadConfigurationClass(PluginsConfiguration.class);
+ loadConfigurationClass(WorkspaceConfiguration.class);
}
@@ -99,6 +100,15 @@ public class ConfigurationManager implements FileChangeCallback, IEcompConfigura
return (PluginsConfiguration) configurations.get(getKey(PluginsConfiguration.class));
}
+
+ public WorkspaceConfiguration getWorkspaceConfiguration() {
+
+ logger.info("requested plugins configuration and got this:{}", configurations.get(getKey(WorkspaceConfiguration.class)));
+
+ return (WorkspaceConfiguration) configurations.get(getKey(WorkspaceConfiguration.class));
+ }
+
+
public Configuration getConfigurationAndWatch(ConfigurationListener configurationListener) {
if (configurationListener != null) {
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/fe/config/WorkspaceConfiguration.java b/common-app-api/src/main/java/org/openecomp/sdc/fe/config/WorkspaceConfiguration.java
new file mode 100644
index 0000000000..caaaf5ad6d
--- /dev/null
+++ b/common-app-api/src/main/java/org/openecomp/sdc/fe/config/WorkspaceConfiguration.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.fe.config;
+
+import org.openecomp.sdc.common.api.BasicConfiguration;
+
+import java.util.List;
+import java.util.Map;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class WorkspaceConfiguration extends BasicConfiguration {
+
+ private Map<String, List<MenuConfiguration>> workspaceMenuConfiguration;
+
+ @Getter
+ @Setter
+ private static class MenuConfiguration {
+ private String text;
+ private String action;
+ private String state;
+ private Integer menuIndex;
+ private List<String> disabledRoles;
+ }
+}