From 6f664e071338f1e771d5e0c4106c6144806b33c8 Mon Sep 17 00:00:00 2001 From: Boubaker Khanfir Date: Mon, 13 May 2024 13:29:37 +0100 Subject: [PATCH] feat: Update AppCenter Data injection to use JSON - MEED-6794 - Meeds-io/MIPs#132 Prior to this change, App Center Data was injected at startup time using XML file. This change will introduce AppCenter applications using JSON format. --- .../src/main/resources/applications.json | 23 ++++++ perk-store-webapps/package-lock.json | 4 +- .../webapp/WEB-INF/conf/configuration.xml | 1 - .../perk-store/app-center-configuration.xml | 73 ------------------- 4 files changed, 24 insertions(+), 77 deletions(-) create mode 100644 perk-store-services/src/main/resources/applications.json delete mode 100644 perk-store-webapps/src/main/webapp/WEB-INF/conf/perk-store/app-center-configuration.xml diff --git a/perk-store-services/src/main/resources/applications.json b/perk-store-services/src/main/resources/applications.json new file mode 100644 index 000000000..46d97bc42 --- /dev/null +++ b/perk-store-services/src/main/resources/applications.json @@ -0,0 +1,23 @@ +{ + "descriptors": [ + { + "name": "Perk store", + "imagePath": "war:/../images/perkstore.png", + "overrideMode": "merge", + "override": false, + "enabled": true, + "application": { + "title": "Perk store", + "description": "Perk store application", + "url": "./perkstore", + "active": true, + "isMandatory": false, + "isMobile": true, + "permissions": [ + "*:/platform/users", + "*:/platform/externals" + ] + } + } + ] +} diff --git a/perk-store-webapps/package-lock.json b/perk-store-webapps/package-lock.json index c0ab18fdc..b5bd6d997 100644 --- a/perk-store-webapps/package-lock.json +++ b/perk-store-webapps/package-lock.json @@ -5227,9 +5227,7 @@ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", "dev": true, - "requires": { - "ajv": "^8.0.0" - } + "requires": {} }, "ajv-keywords": { "version": "5.1.0", diff --git a/perk-store-webapps/src/main/webapp/WEB-INF/conf/configuration.xml b/perk-store-webapps/src/main/webapp/WEB-INF/conf/configuration.xml index 471f335bc..a910ec730 100644 --- a/perk-store-webapps/src/main/webapp/WEB-INF/conf/configuration.xml +++ b/perk-store-webapps/src/main/webapp/WEB-INF/conf/configuration.xml @@ -24,7 +24,6 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. war:/conf/perk-store/notification-configuration.xml war:/conf/perk-store/websocket-configuration.xml war:/conf/perk-store/dynamic-container-configuration.xml - war:/conf/perk-store/app-center-configuration.xml war:/conf/perk-store/search-configuration.xml diff --git a/perk-store-webapps/src/main/webapp/WEB-INF/conf/perk-store/app-center-configuration.xml b/perk-store-webapps/src/main/webapp/WEB-INF/conf/perk-store/app-center-configuration.xml deleted file mode 100644 index e212d9b7d..000000000 --- a/perk-store-webapps/src/main/webapp/WEB-INF/conf/perk-store/app-center-configuration.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - org.exoplatform.appcenter.service.ApplicationCenterService - - Perk Store - addApplicationPlugin - org.exoplatform.appcenter.plugin.ApplicationPlugin - - - imagePath - war:/../images/perkstore.png - - - override - ${exo.app-center.perkstore.override:false} - - - override-mode - ${exo.app-center.perkstore.override-mode:merge} - - - application - description - - - Perk store - - - ./perkstore - - - Perk store application - - - - - *:/platform/users - - - *:/platform/externals - - - - - true - - - true - - - - - - -