From 9d3dcd6df2bb31f13b5ab5391f9a6df8a25d87ac Mon Sep 17 00:00:00 2001 From: Massimiliano Perrone Date: Tue, 30 Dec 2025 15:22:48 +0100 Subject: [PATCH 1/6] [SYNCOPE-1942] added getString to retrieve the label from localization properties file --- .../org/apache/syncope/client/console/pages/BasePage.java | 4 ++-- .../apache/syncope/client/console/pages/BasePage.properties | 4 ++++ .../syncope/client/console/pages/BasePage_fr_CA.properties | 4 ++++ .../syncope/client/console/pages/BasePage_it.properties | 4 ++++ .../syncope/client/console/pages/BasePage_ja.properties | 4 ++++ .../syncope/client/console/pages/BasePage_pt_BR.properties | 4 ++++ .../syncope/client/console/pages/BasePage_ru.properties | 4 ++++ 7 files changed, 26 insertions(+), 2 deletions(-) diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java index a77b56ad17..143d65a6d5 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java @@ -187,7 +187,7 @@ protected void populateItem(final ListItem> item) { IdMPage ann = item.getModelObject().getAnnotation(IdMPage.class); BookmarkablePageLink link = new BookmarkablePageLink<>("idmPage", item.getModelObject()); - link.add(new Label("idmPageLabel", ann.label())); + link.add(new Label("idmPageLabel", getString(ann.label()))); if (StringUtils.isNotBlank(ann.listEntitlement())) { MetaDataRoleAuthorizationStrategy.authorize(link, WebPage.RENDER, ann.listEntitlement()); } @@ -226,7 +226,7 @@ protected void populateItem(final ListItem> item) { AMPage ann = item.getModelObject().getAnnotation(AMPage.class); BookmarkablePageLink link = new BookmarkablePageLink<>("amPage", item.getModelObject()); - link.add(new Label("amPageLabel", ann.label())); + link.add(new Label("amPageLabel", getString(ann.label()))); if (StringUtils.isNotBlank(ann.listEntitlement())) { MetaDataRoleAuthorizationStrategy.authorize(link, WebPage.RENDER, ann.listEntitlement()); } diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties index d71081c161..5090ccef11 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties @@ -33,3 +33,7 @@ endDelegation=End Delegation sessionExpiration.header=Session Expiration sessionExpiration.body=Your session is about to expire. Please select the appropriate option to keep working. sessionExpiration.extend=Extend + +Topology=Topology +WA=WA +SRA=SRA diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_fr_CA.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_fr_CA.properties index f36bd3357c..590433aa45 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_fr_CA.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_fr_CA.properties @@ -32,3 +32,7 @@ fontSize=Taille de la police sessionExpiration.header=Expiration de la s\u00e9ance sessionExpiration.body=Votre session va expirer. Veuillez choisir l'option appropri\u00e9e pour continuer \u00e0 travailler. sessionExpiration.extend=\u00c9tendre + +Topology=Topologie +WA=WA +SRA=SRA diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_it.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_it.properties index 08327cfcfb..0fc7e60e48 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_it.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_it.properties @@ -33,3 +33,7 @@ endDelegation=Termina Delega sessionExpiration.header=Scadenza della sessione sessionExpiration.body=La tua sessione sta per scadere. Seleziona l'opzione appropriata per continuare a lavorare. sessionExpiration.extend=Estendi + +Topology=Topologia +WA=WA +SRA=SRA diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ja.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ja.properties index 5af5ed0dfc..6ee6cb5b52 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ja.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ja.properties @@ -33,3 +33,7 @@ endDelegation=End Delegation sessionExpiration.header=Session Expiration sessionExpiration.body=Your session is about to expire. Please select the appropriate option to keep working. sessionExpiration.extend=Extend + +Topology=\u30c8\u30dd\u30ed\u30b8\u30fc +WA=WA +SRA=SRA diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties index 9977dbdba0..1c4e7649ab 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties @@ -33,3 +33,7 @@ endDelegation=End Delegation sessionExpiration.header=Session Expiration sessionExpiration.body=Your session is about to expire. Please select the appropriate option to keep working. sessionExpiration.extend=Extend + +Topology=Topologia +WA=WA +SRA=SRA \ No newline at end of file diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ru.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ru.properties index 9def38f672..b1d06eaee1 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ru.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ru.properties @@ -33,3 +33,7 @@ endDelegation=End Delegation sessionExpiration.header=Session Expiration sessionExpiration.body=Your session is about to expire. Please select the appropriate option to keep working. sessionExpiration.extend=Extend + +Topology=\u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044f +WA=WA +SRA=SRA \ No newline at end of file From d08921b7ae91cca29c8301a6f0dd388f352a2823 Mon Sep 17 00:00:00 2001 From: Massimiliano Perrone Date: Wed, 7 Jan 2026 15:46:33 +0100 Subject: [PATCH 2/6] [SYNCOPE-1942] Dynamic localization for enduser and console --- .../console/topology/Topology.properties | 2 + .../topology/Topology_fr_CA.properties | 2 + .../console/topology/Topology_it.properties | 2 + .../console/topology/Topology_ja.properties | 2 + .../topology/Topology_pt_BR.properties | 2 + .../console/topology/Topology_ru.properties | 3 +- .../ui/commons/DynamicMenuRegister.java | 38 +++++++++ .../DynamicMenuStringResourceLoader.java | 78 +++++++++++++++++++ .../client/console/SyncopeWebApplication.java | 25 ++++++ .../client/console/pages/BasePage.java | 7 +- .../client/console/pages/BasePage.properties | 8 +- .../console/pages/BasePage_fr_CA.properties | 4 - .../console/pages/BasePage_it.properties | 4 - .../console/pages/BasePage_ja.properties | 4 - .../console/pages/BasePage_pt_BR.properties | 6 +- .../console/pages/BasePage_ru.properties | 6 +- .../client/enduser/SyncopeWebApplication.java | 23 ++++++ .../client/enduser/panels/Sidebar.java | 9 +-- .../client/console/pages/Flowable.properties | 2 + .../console/pages/Flowable_fr_CA.properties | 21 +++++ .../console/pages/Flowable_it.properties | 2 + .../console/pages/Flowable_ja.properties | 2 + .../console/pages/Flowable_pt_BR.properties | 2 + .../console/pages/Flowable_ru.properties | 2 + .../client/enduser/pages/Flowable.java | 2 +- .../client/enduser/pages/Flowable.properties | 2 + .../enduser/pages/Flowable_fr_CA.properties | 27 +++++++ .../enduser/pages/Flowable_it.properties | 2 + .../enduser/pages/Flowable_ja.properties | 2 + .../enduser/pages/Flowable_pt_BR.properties | 2 + .../enduser/pages/Flowable_ru.properties | 2 + .../client/console/pages/OIDCC4UI.java | 2 +- .../client/console/pages/OIDCC4UI.properties | 2 + .../console/pages/OIDCC4UI_fr.properties | 19 +++++ .../console/pages/OIDCC4UI_it.properties | 2 + .../console/pages/OIDCC4UI_ja.properties | 19 +++++ .../console/pages/OIDCC4UI_pt.properties | 19 +++++ .../console/pages/OIDCC4UI_ru.properties | 2 + .../client/console/pages/SAML2SP4UI.java | 2 +- .../console/pages/SAML2SP4UI.properties | 2 + .../console/pages/SAML2SP4UI_fr_CA.properties | 20 +++++ .../console/pages/SAML2SP4UI_it.properties | 2 + .../console/pages/SAML2SP4UI_ja.properties | 20 +++++ .../console/pages/SAML2SP4UI_pt_BR.properties | 2 + .../console/pages/SAML2SP4UI_ru.properties | 2 + .../client/console/pages/SCIMConfPage.java | 2 +- .../console/pages/SCIMConfPage.properties | 2 + .../console/pages/SCIMConfPage_fr.properties | 19 +++++ .../console/pages/SCIMConfPage_it.properties | 2 + .../console/pages/SCIMConfPage_ja.properties | 19 +++++ .../pages/SCIMConfPage_pt_BR.properties | 2 + .../console/pages/SCIMConfPage_ru.properties | 2 + 52 files changed, 416 insertions(+), 42 deletions(-) create mode 100644 client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java create mode 100644 client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java create mode 100644 ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_fr_CA.properties create mode 100644 ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_fr_CA.properties create mode 100644 ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_fr.properties create mode 100644 ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_ja.properties create mode 100644 ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_pt.properties create mode 100644 ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_fr_CA.properties create mode 100644 ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ja.properties create mode 100644 ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_fr.properties create mode 100644 ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ja.properties diff --git a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.properties index 14e381db28..51e5578911 100644 --- a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.properties +++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.properties @@ -15,3 +15,5 @@ # specific language governing permissions and limitations # under the License. missingEntitlement=MISSING ENTITLEMENT: CONNECTOR_READ + +menu.Topology=Topology \ No newline at end of file diff --git a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_fr_CA.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_fr_CA.properties index dc297fc5ad..796fbdb546 100644 --- a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_fr_CA.properties +++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_fr_CA.properties @@ -15,3 +15,5 @@ # specific language governing permissions and limitations # under the License. missingEntitlement=DROIT MANQUANT : CONNECTOR_READ + +menu.Topology=Topologie diff --git a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_it.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_it.properties index 5a3d4c8d0c..e230322f2d 100644 --- a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_it.properties +++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_it.properties @@ -15,3 +15,5 @@ # specific language governing permissions and limitations # under the License. missingEntitlement=ENTITLEMENT MANCANTE: CONNECTOR_READ + +menu.Topology=Topologia \ No newline at end of file diff --git a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_ja.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_ja.properties index 932f656acd..8db04f32fb 100644 --- a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_ja.properties +++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_ja.properties @@ -15,3 +15,5 @@ # specific language governing permissions and limitations # under the License. missingEntitlement=\u6a29\u5229\u4ed8\u4e0e\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093: CONNECTOR_READ + +menu.Topology=\u30c8\u30dd\u30ed\u30b8\u30fc \ No newline at end of file diff --git a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_pt_BR.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_pt_BR.properties index 14e381db28..e4ec1f2ed6 100644 --- a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_pt_BR.properties +++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_pt_BR.properties @@ -15,3 +15,5 @@ # specific language governing permissions and limitations # under the License. missingEntitlement=MISSING ENTITLEMENT: CONNECTOR_READ + +menu.Topology=Topologia \ No newline at end of file diff --git a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_ru.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_ru.properties index 7f3248a23b..ed2f267c40 100644 --- a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_ru.properties +++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_ru.properties @@ -14,5 +14,6 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -# missingEntitlement=Нет прав доступа на просмотр коннектора (CONNECTOR_READ) missingEntitlement=\u041d\u0435\u0442 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u043a\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440\u0430 (CONNECTOR_READ) + +menu.Topology=\u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044f diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java new file mode 100644 index 0000000000..b7688dd281 --- /dev/null +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ +package org.apache.syncope.client.ui.commons; + +import java.util.HashMap; +import java.util.Map; + +public class DynamicMenuRegister { + + private static final Map> KEYS_FOR_PAGES = new HashMap<>(); + + private DynamicMenuRegister() { + } + + public static void register(final String key, final Class pageClass) { + KEYS_FOR_PAGES.put(key, pageClass); + } + + public static Class getPage(final String key) { + return KEYS_FOR_PAGES.get(key); + } +} diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java new file mode 100644 index 0000000000..5d7733b908 --- /dev/null +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java @@ -0,0 +1,78 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ +package org.apache.syncope.client.ui.commons; + +import java.util.Locale; +import org.apache.syncope.client.ui.commons.DynamicMenuRegister; +import org.apache.wicket.core.util.resource.locator.IResourceNameIterator; +import org.apache.wicket.resource.IPropertiesFactory; +import org.apache.wicket.resource.Properties; +import org.apache.wicket.resource.loader.ClassStringResourceLoader; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class DynamicMenuStringResourceLoader extends ClassStringResourceLoader { + + protected static final Logger LOG = LoggerFactory.getLogger(DynamicMenuStringResourceLoader.class); + + public DynamicMenuStringResourceLoader() { + super(DynamicMenuStringResourceLoader.class); + } + + @Override + public String loadStringResource( + Class clazz, + String key, + Locale locale, + String style, + String variation) { + LOG.info("XXXXX key {}", key); + + if (key != null && key.startsWith("menu.")) { + Class pageClass = DynamicMenuRegister.getPage(key); + + LOG.info("XXXXX clazz {}", clazz); + LOG.info("XXXXX pageClass {}", pageClass); + + if (pageClass != null) { + final String path = pageClass.getName().replace('.', '/'); + final IResourceNameIterator iter = newResourceNameIterator(path, locale, style, variation); + final IPropertiesFactory propertiesFactory = getPropertiesFactory(); + LOG.info("XXXXX path {}", path); + + while (iter.hasNext()) { + final String newPath = iter.next(); + LOG.info("XXXXX newPath {}", newPath); + + final Properties props = propertiesFactory.load(pageClass, newPath); + + if (props != null) { + final String localeLabel = props.getString(key); + LOG.info("XXXXX localeLabel {}", localeLabel); + LOG.debug("Found label \"{}\" for key: {}", localeLabel, key); + return localeLabel; + } + + } + } + } + + return null; + } +} diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java index 9d32acacfa..283d107630 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java @@ -24,6 +24,7 @@ import de.agilecoders.wicket.core.settings.IBootstrapSettings; import de.agilecoders.wicket.core.settings.SingleThemeProvider; import jakarta.servlet.http.Cookie; +import java.lang.annotation.Annotation; import java.time.OffsetDateTime; import java.util.Collection; import java.util.List; @@ -34,12 +35,15 @@ import org.apache.syncope.client.console.commons.AnyDirectoryPanelAdditionalActionLinksProvider; import org.apache.syncope.client.console.commons.AnyDirectoryPanelAdditionalActionsProvider; import org.apache.syncope.client.console.commons.AnyWizardBuilderAdditionalSteps; +import org.apache.syncope.client.ui.commons.DynamicMenuRegister; import org.apache.syncope.client.console.commons.ExternalResourceProvider; import org.apache.syncope.client.console.commons.ImplementationInfoProvider; import org.apache.syncope.client.console.commons.PolicyTabProvider; import org.apache.syncope.client.console.commons.RealmsUtils; import org.apache.syncope.client.console.commons.StatusProvider; import org.apache.syncope.client.console.init.ClassPathScanImplementationLookup; +import org.apache.syncope.client.ui.commons.DynamicMenuStringResourceLoader; +import org.apache.syncope.client.console.pages.BaseExtPage; import org.apache.syncope.client.console.pages.BasePage; import org.apache.syncope.client.console.pages.Dashboard; import org.apache.syncope.client.console.pages.Login; @@ -53,6 +57,7 @@ import org.apache.syncope.client.ui.commons.BaseWebApplication; import org.apache.syncope.client.ui.commons.Constants; import org.apache.syncope.client.ui.commons.SyncopeUIRequestCycleListener; +import org.apache.syncope.client.ui.commons.annotations.ExtPage; import org.apache.syncope.client.ui.commons.annotations.Resource; import org.apache.syncope.client.ui.commons.themes.AdminLTE; import org.apache.syncope.client.ui.commons.wizards.AjaxWizard; @@ -240,6 +245,26 @@ protected void init() { mountPage("/login", getSignInPageClass()); + //[SYNCOPE-1942] + //-- + final List> amPageClasses = lookup.getAMPageClasses(); + amPageClasses.forEach(claz -> { + DynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + }); + + final List> idmPageClasses = lookup.getIdMPageClasses(); + idmPageClasses.forEach(claz -> { + DynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + }); + + final List> extPageClasses = lookup.getClasses(BaseExtPage.class); + extPageClasses.stream().filter(claz -> (claz.isAnnotationPresent(ExtPage.class))).forEach(claz -> { + DynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + }); + + getResourceSettings().getStringResourceLoaders().add(new DynamicMenuStringResourceLoader()); + //-- + for (IResource resource : resources) { Class resourceClass = AopUtils.getTargetClass(resource); Resource annotation = resourceClass.getAnnotation(Resource.class); diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java index 143d65a6d5..a2ceee3406 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java @@ -187,7 +187,7 @@ protected void populateItem(final ListItem> item) { IdMPage ann = item.getModelObject().getAnnotation(IdMPage.class); BookmarkablePageLink link = new BookmarkablePageLink<>("idmPage", item.getModelObject()); - link.add(new Label("idmPageLabel", getString(ann.label()))); + link.add(new Label("idmPageLabel", getString("menu." + ann.label(), null, ann.label()))); if (StringUtils.isNotBlank(ann.listEntitlement())) { MetaDataRoleAuthorizationStrategy.authorize(link, WebPage.RENDER, ann.listEntitlement()); } @@ -226,7 +226,8 @@ protected void populateItem(final ListItem> item) { AMPage ann = item.getModelObject().getAnnotation(AMPage.class); BookmarkablePageLink link = new BookmarkablePageLink<>("amPage", item.getModelObject()); - link.add(new Label("amPageLabel", getString(ann.label()))); + link.add(new Label("amPageLabel", getString("menu." + ann.label(), null, ann.label()))); + if (StringUtils.isNotBlank(ann.listEntitlement())) { MetaDataRoleAuthorizationStrategy.authorize(link, WebPage.RENDER, ann.listEntitlement()); } @@ -521,7 +522,7 @@ protected void populateItem(final ListItem> item) { ExtPage ann = item.getModelObject().getAnnotation(ExtPage.class); BookmarkablePageLink link = new BookmarkablePageLink<>("extPage", item.getModelObject()); - link.add(new Label("extPageLabel", ann.label())); + link.add(new Label("extPageLabel", getString("menu." + ann.label(), null, ann.label()))); if (StringUtils.isNotBlank(ann.listEntitlement())) { MetaDataRoleAuthorizationStrategy.authorize(link, WebPage.RENDER, ann.listEntitlement()); } diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties index 5090ccef11..dad200381e 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties @@ -16,7 +16,7 @@ # under the License. home=Home version=Version -domain=Domain +domain=Domain systemInfo=System Information hostname=Host Name @@ -32,8 +32,4 @@ delegations=Delegations endDelegation=End Delegation sessionExpiration.header=Session Expiration sessionExpiration.body=Your session is about to expire. Please select the appropriate option to keep working. -sessionExpiration.extend=Extend - -Topology=Topology -WA=WA -SRA=SRA +sessionExpiration.extend=Extend \ No newline at end of file diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_fr_CA.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_fr_CA.properties index 590433aa45..f36bd3357c 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_fr_CA.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_fr_CA.properties @@ -32,7 +32,3 @@ fontSize=Taille de la police sessionExpiration.header=Expiration de la s\u00e9ance sessionExpiration.body=Votre session va expirer. Veuillez choisir l'option appropri\u00e9e pour continuer \u00e0 travailler. sessionExpiration.extend=\u00c9tendre - -Topology=Topologie -WA=WA -SRA=SRA diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_it.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_it.properties index 0fc7e60e48..08327cfcfb 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_it.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_it.properties @@ -33,7 +33,3 @@ endDelegation=Termina Delega sessionExpiration.header=Scadenza della sessione sessionExpiration.body=La tua sessione sta per scadere. Seleziona l'opzione appropriata per continuare a lavorare. sessionExpiration.extend=Estendi - -Topology=Topologia -WA=WA -SRA=SRA diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ja.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ja.properties index 6ee6cb5b52..5af5ed0dfc 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ja.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ja.properties @@ -33,7 +33,3 @@ endDelegation=End Delegation sessionExpiration.header=Session Expiration sessionExpiration.body=Your session is about to expire. Please select the appropriate option to keep working. sessionExpiration.extend=Extend - -Topology=\u30c8\u30dd\u30ed\u30b8\u30fc -WA=WA -SRA=SRA diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties index 1c4e7649ab..6cce701743 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties @@ -32,8 +32,4 @@ delegations=Delegations endDelegation=End Delegation sessionExpiration.header=Session Expiration sessionExpiration.body=Your session is about to expire. Please select the appropriate option to keep working. -sessionExpiration.extend=Extend - -Topology=Topologia -WA=WA -SRA=SRA \ No newline at end of file +sessionExpiration.extend=Extend \ No newline at end of file diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ru.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ru.properties index b1d06eaee1..478baf402a 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ru.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ru.properties @@ -32,8 +32,4 @@ delegations=Delegations endDelegation=End Delegation sessionExpiration.header=Session Expiration sessionExpiration.body=Your session is about to expire. Please select the appropriate option to keep working. -sessionExpiration.extend=Extend - -Topology=\u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044f -WA=WA -SRA=SRA \ No newline at end of file +sessionExpiration.extend=Extend \ No newline at end of file diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeWebApplication.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeWebApplication.java index e21b847534..a105debcd5 100644 --- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeWebApplication.java +++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeWebApplication.java @@ -41,7 +41,10 @@ import org.apache.syncope.client.lib.SyncopeClientFactoryBean; import org.apache.syncope.client.ui.commons.BaseLogin; import org.apache.syncope.client.ui.commons.BaseWebApplication; +import org.apache.syncope.client.ui.commons.DynamicMenuRegister; +import org.apache.syncope.client.ui.commons.DynamicMenuStringResourceLoader; import org.apache.syncope.client.ui.commons.SyncopeUIRequestCycleListener; +import org.apache.syncope.client.ui.commons.annotations.ExtPage; import org.apache.syncope.client.ui.commons.annotations.Resource; import org.apache.syncope.client.ui.commons.themes.AdminLTE; import org.apache.syncope.common.keymaster.client.api.ServiceOps; @@ -203,6 +206,26 @@ public IResource getResource() { } } + //[SYNCOPE-1942] + //-- + final List> amPageClasses = lookup.getAMPageClasses(); + amPageClasses.forEach(claz -> { + DynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + }); + + final List> idmPageClasses = lookup.getIdMPageClasses(); + idmPageClasses.forEach(claz -> { + DynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + }); + + final List> extPageClasses = lookup.getExtPageClasses(); + extPageClasses.stream().filter(claz -> (claz.isAnnotationPresent(ExtPage.class))).forEach(claz -> { + DynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + }); + + getResourceSettings().getStringResourceLoaders().add(new DynamicMenuStringResourceLoader()); + //-- + try (InputStream is = resourceLoader.getResource(props.getCustomFormLayout()).getInputStream()) { customFormLayout = MAPPER.readValue(is, new TypeReference<>() { }); diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/Sidebar.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/Sidebar.java index 647ae087d9..48fd029c5a 100644 --- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/Sidebar.java +++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/Sidebar.java @@ -141,8 +141,7 @@ protected void populateItem(final ListItem> item) { IdMPage ann = item.getModelObject().getAnnotation(IdMPage.class); BookmarkablePageLink link = new BookmarkablePageLink<>("idmPage", item.getModelObject()); - - link.add(new Label("idmPageLabel", ann.label())); + link.add(new Label("idmPageLabel", getString("menu." + ann.label(), null, ann.label()))); if (item.getModelObject().equals(pageRef.getPage().getClass())) { link.add(new Behavior() { @@ -177,8 +176,7 @@ protected void populateItem(final ListItem> item) { AMPage ann = item.getModelObject().getAnnotation(AMPage.class); BookmarkablePageLink link = new BookmarkablePageLink<>("amPage", item.getModelObject()); - - link.add(new Label("amPageLabel", ann.label())); + link.add(new Label("amPageLabel", getString("menu." + ann.label(), null, ann.label()))); if (item.getModelObject().equals(pageRef.getPage().getClass())) { link.add(new Behavior() { @@ -216,8 +214,7 @@ protected void populateItem(final ListItem> item) { ExtPage ann = item.getModelObject().getAnnotation(ExtPage.class); BookmarkablePageLink link = new BookmarkablePageLink<>("extPage", item.getModelObject()); - - link.add(new Label("extPageLabel", ann.label())); + link.add(new Label("extPageLabel", getString("menu." + ann.label(), null, ann.label()))); if (item.getModelObject().equals(pageRef.getPage().getClass())) { link.add(new Behavior() { diff --git a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable.properties b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable.properties index 5b088d6d6c..9e9c94257b 100644 --- a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable.properties +++ b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable.properties @@ -17,3 +17,5 @@ xmlEditorTitle=Workflow XML Editor userWorkflow=User workflow external_editor.title=Flowable Modeler + +menu.Flowable=Flowable \ No newline at end of file diff --git a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_fr_CA.properties b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_fr_CA.properties new file mode 100644 index 0000000000..8227d56c57 --- /dev/null +++ b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_fr_CA.properties @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +xmlEditorTitle=XML \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u0438\u044f +userWorkflow=User workflow +external_editor.title=Flowable Modeler + +menu.Flowable=Flowable \ No newline at end of file diff --git a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_it.properties b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_it.properties index 37fd8593b3..a76f4dbd3f 100644 --- a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_it.properties +++ b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_it.properties @@ -17,3 +17,5 @@ xmlEditorTitle=Workflow XML Editor userWorkflow=Workflow utenti external_editor.title=Flowable Modeler + +menu.Flowable=Flowable diff --git a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ja.properties b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ja.properties index 45b48142e2..037d077d7c 100644 --- a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ja.properties +++ b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ja.properties @@ -17,3 +17,5 @@ xmlEditorTitle=\u30ef\u30fc\u30af\u30d5\u30ed\u30fc XML \u30a8\u30c7\u30a3\u30bf\u30fc userWorkflow=\u30e6\u30fc\u30b6\u30fc\u30ef\u30fc\u30af\u30d5\u30ed\u30fc external_editor.title=Flowable \u30e2\u30c7\u30e9\u30fc + +menu.Flowable=Flowable \ No newline at end of file diff --git a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_pt_BR.properties b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_pt_BR.properties index 5b088d6d6c..9e9c94257b 100644 --- a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_pt_BR.properties +++ b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_pt_BR.properties @@ -17,3 +17,5 @@ xmlEditorTitle=Workflow XML Editor userWorkflow=User workflow external_editor.title=Flowable Modeler + +menu.Flowable=Flowable \ No newline at end of file diff --git a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ru.properties b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ru.properties index 515fa3ae72..8227d56c57 100644 --- a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ru.properties +++ b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ru.properties @@ -17,3 +17,5 @@ xmlEditorTitle=XML \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u0438\u044f userWorkflow=User workflow external_editor.title=Flowable Modeler + +menu.Flowable=Flowable \ No newline at end of file diff --git a/ext/flowable/client-enduser/src/main/java/org/apache/syncope/client/enduser/pages/Flowable.java b/ext/flowable/client-enduser/src/main/java/org/apache/syncope/client/enduser/pages/Flowable.java index 30d9cd2827..f4d6345807 100644 --- a/ext/flowable/client-enduser/src/main/java/org/apache/syncope/client/enduser/pages/Flowable.java +++ b/ext/flowable/client-enduser/src/main/java/org/apache/syncope/client/enduser/pages/Flowable.java @@ -48,7 +48,7 @@ import org.apache.wicket.request.mapper.parameter.PageParameters; import org.apache.wicket.spring.injection.annot.SpringBean; -@ExtPage(label = "User Requests", icon = "fa fa-briefcase", listEntitlement = "") +@ExtPage(label = "Flowable", icon = "fa fa-briefcase", listEntitlement = "") public class Flowable extends BaseExtPage { private static final long serialVersionUID = -8781434495150074529L; diff --git a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable.properties b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable.properties index 17cc65dccf..ba6ac87343 100644 --- a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable.properties +++ b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable.properties @@ -23,3 +23,5 @@ delete=Delete start=Start requests.to.be.approved=Your active requests activityId=Activity Id + +menu.Flowable=User Requests \ No newline at end of file diff --git a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_fr_CA.properties b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_fr_CA.properties new file mode 100644 index 0000000000..ab9f578ec5 --- /dev/null +++ b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_fr_CA.properties @@ -0,0 +1,27 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +user.requests.accordion=${bpmnProcess} (${activityId}) +bpmn.process.title=Richieste +submit=Salva +executionId=Id esecuzione +startTime=Eseguito il +delete=Cancella +start=Esegui +requests.to.be.approved=Richieste in lavorazione +activityId=Id attivit\u00e0 + +menu.Flowable=Demandes des utilisateurs \ No newline at end of file diff --git a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_it.properties b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_it.properties index aba7051a6d..5c9fcbddc6 100644 --- a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_it.properties +++ b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_it.properties @@ -23,3 +23,5 @@ delete=Cancella start=Esegui requests.to.be.approved=Richieste in lavorazione activityId=Id attivit\u00e0 + +menu.Flowable=Richieste utente \ No newline at end of file diff --git a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_ja.properties b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_ja.properties index 2a8e4033b7..a2a7081ebd 100644 --- a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_ja.properties +++ b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_ja.properties @@ -23,3 +23,5 @@ delete=\u30af\u30ea\u30a2 start=\u958b\u59cb requests.to.be.approved=\u3042\u306a\u305f\u306e\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30ea\u30af\u30a8\u30b9\u30c8 activityId=Activity Id + +menu.Flowable=\u30e6\u30fc\u30b6\u30fc\u8981\u8acb \ No newline at end of file diff --git a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_pt_BR.properties b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_pt_BR.properties index 57b7d62683..7d6a2cc65d 100644 --- a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_pt_BR.properties +++ b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_pt_BR.properties @@ -23,3 +23,5 @@ delete=Limpa start=Come\u00e7ar requests.to.be.approved=Seus pedidos ativos activityId=Activity Id + +menu.Flowable=Solicita\u00e7\u00f5es dos usu\u00e1rios diff --git a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_ru.properties b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_ru.properties index 87cfaccc4a..1471ccd533 100644 --- a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_ru.properties +++ b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_ru.properties @@ -23,3 +23,5 @@ delete=\u0440\u0430\u0441\u0441\u0435\u0435\u0442\u0441\u044f start=\u041d\u0430\u0447\u043d\u0438\u0442\u0435 requests.to.be.approved=\u0412\u0430\u0448\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b activityId=Activity Id + +menu.Flowable=\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 diff --git a/ext/oidcc4ui/client-console/src/main/java/org/apache/syncope/client/console/pages/OIDCC4UI.java b/ext/oidcc4ui/client-console/src/main/java/org/apache/syncope/client/console/pages/OIDCC4UI.java index afa8fbec4a..a1924650ff 100644 --- a/ext/oidcc4ui/client-console/src/main/java/org/apache/syncope/client/console/pages/OIDCC4UI.java +++ b/ext/oidcc4ui/client-console/src/main/java/org/apache/syncope/client/console/pages/OIDCC4UI.java @@ -34,7 +34,7 @@ import org.apache.wicket.request.mapper.parameter.PageParameters; import org.apache.wicket.spring.injection.annot.SpringBean; -@ExtPage(label = "OIDC 1.0 C4UI", icon = "fab fa-openid", +@ExtPage(label = "OIDCC4UI", icon = "fab fa-openid", listEntitlement = OIDCC4UIEntitlement.OP_READ, priority = 300) public class OIDCC4UI extends BaseExtPage { diff --git a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI.properties b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI.properties index b34f11c366..c0f0473776 100644 --- a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI.properties +++ b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI.properties @@ -15,3 +15,5 @@ # specific language governing permissions and limitations # under the License. op=OIDC Providers + +menu.OIDCC4UI=OIDC 1.0 C4UI \ No newline at end of file diff --git a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_fr.properties b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_fr.properties new file mode 100644 index 0000000000..1d795b3858 --- /dev/null +++ b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_fr.properties @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +op=Provider OIDC + +menu.OIDCC4UI=OIDC 1.0 C4UI \ No newline at end of file diff --git a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_it.properties b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_it.properties index e78fe314b3..1d795b3858 100644 --- a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_it.properties +++ b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_it.properties @@ -15,3 +15,5 @@ # specific language governing permissions and limitations # under the License. op=Provider OIDC + +menu.OIDCC4UI=OIDC 1.0 C4UI \ No newline at end of file diff --git a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_ja.properties b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_ja.properties new file mode 100644 index 0000000000..c0f0473776 --- /dev/null +++ b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_ja.properties @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +op=OIDC Providers + +menu.OIDCC4UI=OIDC 1.0 C4UI \ No newline at end of file diff --git a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_pt.properties b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_pt.properties new file mode 100644 index 0000000000..1d795b3858 --- /dev/null +++ b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_pt.properties @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +op=Provider OIDC + +menu.OIDCC4UI=OIDC 1.0 C4UI \ No newline at end of file diff --git a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_ru.properties b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_ru.properties index b34f11c366..5712591ae5 100644 --- a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_ru.properties +++ b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_ru.properties @@ -15,3 +15,5 @@ # specific language governing permissions and limitations # under the License. op=OIDC Providers + +menu.OIDCC4UI=OIDC 1.0 C4UI diff --git a/ext/saml2sp4ui/client-console/src/main/java/org/apache/syncope/client/console/pages/SAML2SP4UI.java b/ext/saml2sp4ui/client-console/src/main/java/org/apache/syncope/client/console/pages/SAML2SP4UI.java index 9bffc91379..28431bf9ea 100644 --- a/ext/saml2sp4ui/client-console/src/main/java/org/apache/syncope/client/console/pages/SAML2SP4UI.java +++ b/ext/saml2sp4ui/client-console/src/main/java/org/apache/syncope/client/console/pages/SAML2SP4UI.java @@ -36,7 +36,7 @@ import org.apache.wicket.request.mapper.parameter.PageParameters; import org.apache.wicket.spring.injection.annot.SpringBean; -@ExtPage(label = "SAML 2.0 SP4UI", icon = "fas fa-sign-in-alt", +@ExtPage(label = "SAML2SP4UI", icon = "fas fa-sign-in-alt", listEntitlement = SAML2SP4UIEntitlement.IDP_READ, priority = 400) public class SAML2SP4UI extends BaseExtPage { diff --git a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI.properties b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI.properties index ead24e7b81..057a26dbb4 100644 --- a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI.properties +++ b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI.properties @@ -16,3 +16,5 @@ # under the License. idps=Identity Providers sp=Service Provider + +menu.SAML2SP4UI=SAML 2.0 SP4UI \ No newline at end of file diff --git a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_fr_CA.properties b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_fr_CA.properties new file mode 100644 index 0000000000..057a26dbb4 --- /dev/null +++ b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_fr_CA.properties @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +idps=Identity Providers +sp=Service Provider + +menu.SAML2SP4UI=SAML 2.0 SP4UI \ No newline at end of file diff --git a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_it.properties b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_it.properties index ead24e7b81..057a26dbb4 100644 --- a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_it.properties +++ b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_it.properties @@ -16,3 +16,5 @@ # under the License. idps=Identity Providers sp=Service Provider + +menu.SAML2SP4UI=SAML 2.0 SP4UI \ No newline at end of file diff --git a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ja.properties b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ja.properties new file mode 100644 index 0000000000..057a26dbb4 --- /dev/null +++ b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ja.properties @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +idps=Identity Providers +sp=Service Provider + +menu.SAML2SP4UI=SAML 2.0 SP4UI \ No newline at end of file diff --git a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_pt_BR.properties b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_pt_BR.properties index ead24e7b81..057a26dbb4 100644 --- a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_pt_BR.properties +++ b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_pt_BR.properties @@ -16,3 +16,5 @@ # under the License. idps=Identity Providers sp=Service Provider + +menu.SAML2SP4UI=SAML 2.0 SP4UI \ No newline at end of file diff --git a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ru.properties b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ru.properties index ead24e7b81..057a26dbb4 100644 --- a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ru.properties +++ b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ru.properties @@ -16,3 +16,5 @@ # under the License. idps=Identity Providers sp=Service Provider + +menu.SAML2SP4UI=SAML 2.0 SP4UI \ No newline at end of file diff --git a/ext/scimv2/client-console/src/main/java/org/apache/syncope/client/console/pages/SCIMConfPage.java b/ext/scimv2/client-console/src/main/java/org/apache/syncope/client/console/pages/SCIMConfPage.java index 798d95161b..73c08db918 100644 --- a/ext/scimv2/client-console/src/main/java/org/apache/syncope/client/console/pages/SCIMConfPage.java +++ b/ext/scimv2/client-console/src/main/java/org/apache/syncope/client/console/pages/SCIMConfPage.java @@ -28,7 +28,7 @@ import org.apache.wicket.request.mapper.parameter.PageParameters; import org.apache.wicket.spring.injection.annot.SpringBean; -@ExtPage(label = "SCIM 2.0", icon = "fa fa-cloud", listEntitlement = SCIMEntitlement.SCIM_CONF_GET, priority = 500) +@ExtPage(label = "SCIMConfPage", icon = "fa fa-cloud", listEntitlement = SCIMEntitlement.SCIM_CONF_GET, priority = 500) public class SCIMConfPage extends BaseExtPage { private static final long serialVersionUID = -8156063343062111770L; diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage.properties b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage.properties index cbcf4a3254..47c2a9f176 100644 --- a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage.properties +++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage.properties @@ -15,3 +15,5 @@ # specific language governing permissions and limitations # under the License. scimConfGeneral=General + +menu.SCIMConfPage=SCIM 2.0 \ No newline at end of file diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_fr.properties b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_fr.properties new file mode 100644 index 0000000000..47c2a9f176 --- /dev/null +++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_fr.properties @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +scimConfGeneral=General + +menu.SCIMConfPage=SCIM 2.0 \ No newline at end of file diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_it.properties b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_it.properties index cbcf4a3254..47c2a9f176 100644 --- a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_it.properties +++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_it.properties @@ -15,3 +15,5 @@ # specific language governing permissions and limitations # under the License. scimConfGeneral=General + +menu.SCIMConfPage=SCIM 2.0 \ No newline at end of file diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ja.properties b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ja.properties new file mode 100644 index 0000000000..47c2a9f176 --- /dev/null +++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ja.properties @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +scimConfGeneral=General + +menu.SCIMConfPage=SCIM 2.0 \ No newline at end of file diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_pt_BR.properties b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_pt_BR.properties index cbcf4a3254..47c2a9f176 100644 --- a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_pt_BR.properties +++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_pt_BR.properties @@ -15,3 +15,5 @@ # specific language governing permissions and limitations # under the License. scimConfGeneral=General + +menu.SCIMConfPage=SCIM 2.0 \ No newline at end of file diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ru.properties b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ru.properties index cbcf4a3254..a82bf5e4df 100644 --- a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ru.properties +++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ru.properties @@ -15,3 +15,5 @@ # specific language governing permissions and limitations # under the License. scimConfGeneral=General + +menu.SCIMConfPage=SCIM 2.0 From 0ed8940e747ccdb7fb687a0984ff6af495fe6281 Mon Sep 17 00:00:00 2001 From: Massimiliano Perrone Date: Wed, 7 Jan 2026 15:52:45 +0100 Subject: [PATCH 3/6] [SYNCOPE-1942] - useless logs --- .../ui/commons/DynamicMenuStringResourceLoader.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java index 5d7733b908..60d4cda1ec 100644 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java @@ -19,7 +19,6 @@ package org.apache.syncope.client.ui.commons; import java.util.Locale; -import org.apache.syncope.client.ui.commons.DynamicMenuRegister; import org.apache.wicket.core.util.resource.locator.IResourceNameIterator; import org.apache.wicket.resource.IPropertiesFactory; import org.apache.wicket.resource.Properties; @@ -42,33 +41,24 @@ public String loadStringResource( Locale locale, String style, String variation) { - LOG.info("XXXXX key {}", key); if (key != null && key.startsWith("menu.")) { Class pageClass = DynamicMenuRegister.getPage(key); - LOG.info("XXXXX clazz {}", clazz); - LOG.info("XXXXX pageClass {}", pageClass); - if (pageClass != null) { final String path = pageClass.getName().replace('.', '/'); final IResourceNameIterator iter = newResourceNameIterator(path, locale, style, variation); final IPropertiesFactory propertiesFactory = getPropertiesFactory(); - LOG.info("XXXXX path {}", path); while (iter.hasNext()) { final String newPath = iter.next(); - LOG.info("XXXXX newPath {}", newPath); - final Properties props = propertiesFactory.load(pageClass, newPath); if (props != null) { final String localeLabel = props.getString(key); - LOG.info("XXXXX localeLabel {}", localeLabel); LOG.debug("Found label \"{}\" for key: {}", localeLabel, key); return localeLabel; } - } } } From 6794833b50595a447e90b4f8ff21d5db6039c983 Mon Sep 17 00:00:00 2001 From: Massimiliano Perrone Date: Tue, 13 Jan 2026 17:50:44 +0100 Subject: [PATCH 4/6] [SYNCOPE-1942] - changes for checkstyle --- .../client/console/topology/Topology.properties | 2 +- .../client/console/topology/Topology_it.properties | 2 +- .../client/console/topology/Topology_ja.properties | 2 +- .../client/console/topology/Topology_pt_BR.properties | 2 +- .../syncope/client/ui/commons/DynamicMenuRegister.java | 2 +- .../ui/commons/DynamicMenuStringResourceLoader.java | 10 +++++----- .../syncope/client/console/SyncopeWebApplication.java | 5 ++--- .../syncope/client/console/pages/BasePage.properties | 2 +- .../client/console/pages/BasePage_pt_BR.properties | 2 +- .../client/console/pages/BasePage_ru.properties | 2 +- .../syncope/client/console/pages/Flowable.properties | 2 +- .../client/console/pages/Flowable_fr_CA.properties | 2 +- .../client/console/pages/Flowable_ja.properties | 2 +- .../client/console/pages/Flowable_pt_BR.properties | 2 +- .../client/console/pages/Flowable_ru.properties | 2 +- .../syncope/client/enduser/pages/Flowable.properties | 2 +- .../client/enduser/pages/Flowable_fr_CA.properties | 2 +- .../client/enduser/pages/Flowable_it.properties | 2 +- .../client/enduser/pages/Flowable_ja.properties | 2 +- .../client/enduser/pages/Flowable_pt_BR.properties | 1 + .../syncope/client/console/pages/OIDCC4UI.properties | 2 +- .../client/console/pages/OIDCC4UI_fr.properties | 2 +- .../client/console/pages/OIDCC4UI_it.properties | 2 +- .../client/console/pages/OIDCC4UI_ja.properties | 2 +- .../client/console/pages/OIDCC4UI_pt.properties | 2 +- .../syncope/client/console/pages/SAML2SP4UI.properties | 2 +- .../client/console/pages/SAML2SP4UI_fr_CA.properties | 2 +- .../client/console/pages/SAML2SP4UI_it.properties | 2 +- .../client/console/pages/SAML2SP4UI_ja.properties | 2 +- .../client/console/pages/SAML2SP4UI_pt_BR.properties | 2 +- .../client/console/pages/SAML2SP4UI_ru.properties | 2 +- .../client/console/pages/SCIMConfPage.properties | 2 +- .../client/console/pages/SCIMConfPage_fr.properties | 2 +- .../client/console/pages/SCIMConfPage_it.properties | 2 +- .../client/console/pages/SCIMConfPage_ja.properties | 2 +- .../client/console/pages/SCIMConfPage_pt_BR.properties | 2 +- .../client/console/pages/SCIMConfPage_ru.properties | 1 + 37 files changed, 42 insertions(+), 41 deletions(-) diff --git a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.properties index 51e5578911..7b2a714ee5 100644 --- a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.properties +++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.properties @@ -16,4 +16,4 @@ # under the License. missingEntitlement=MISSING ENTITLEMENT: CONNECTOR_READ -menu.Topology=Topology \ No newline at end of file +menu.Topology=Topology diff --git a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_it.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_it.properties index e230322f2d..06e80ac5f0 100644 --- a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_it.properties +++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_it.properties @@ -16,4 +16,4 @@ # under the License. missingEntitlement=ENTITLEMENT MANCANTE: CONNECTOR_READ -menu.Topology=Topologia \ No newline at end of file +menu.Topology=Topologia diff --git a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_ja.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_ja.properties index 8db04f32fb..5406bef554 100644 --- a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_ja.properties +++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_ja.properties @@ -16,4 +16,4 @@ # under the License. missingEntitlement=\u6a29\u5229\u4ed8\u4e0e\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093: CONNECTOR_READ -menu.Topology=\u30c8\u30dd\u30ed\u30b8\u30fc \ No newline at end of file +menu.Topology=\u30c8\u30dd\u30ed\u30b8\u30fc diff --git a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_pt_BR.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_pt_BR.properties index e4ec1f2ed6..fc21cf12f1 100644 --- a/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_pt_BR.properties +++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/topology/Topology_pt_BR.properties @@ -16,4 +16,4 @@ # under the License. missingEntitlement=MISSING ENTITLEMENT: CONNECTOR_READ -menu.Topology=Topologia \ No newline at end of file +menu.Topology=Topologia diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java index b7688dd281..3543b0d403 100644 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java @@ -21,7 +21,7 @@ import java.util.HashMap; import java.util.Map; -public class DynamicMenuRegister { +public final class DynamicMenuRegister { private static final Map> KEYS_FOR_PAGES = new HashMap<>(); diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java index 60d4cda1ec..f5cf671da5 100644 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java @@ -36,11 +36,11 @@ public DynamicMenuStringResourceLoader() { @Override public String loadStringResource( - Class clazz, - String key, - Locale locale, - String style, - String variation) { + final Class clazz, + final String key, + final Locale locale, + final String style, + final String variation) { if (key != null && key.startsWith("menu.")) { Class pageClass = DynamicMenuRegister.getPage(key); diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java index 283d107630..e4f2f3ea86 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java @@ -24,7 +24,6 @@ import de.agilecoders.wicket.core.settings.IBootstrapSettings; import de.agilecoders.wicket.core.settings.SingleThemeProvider; import jakarta.servlet.http.Cookie; -import java.lang.annotation.Annotation; import java.time.OffsetDateTime; import java.util.Collection; import java.util.List; @@ -35,14 +34,12 @@ import org.apache.syncope.client.console.commons.AnyDirectoryPanelAdditionalActionLinksProvider; import org.apache.syncope.client.console.commons.AnyDirectoryPanelAdditionalActionsProvider; import org.apache.syncope.client.console.commons.AnyWizardBuilderAdditionalSteps; -import org.apache.syncope.client.ui.commons.DynamicMenuRegister; import org.apache.syncope.client.console.commons.ExternalResourceProvider; import org.apache.syncope.client.console.commons.ImplementationInfoProvider; import org.apache.syncope.client.console.commons.PolicyTabProvider; import org.apache.syncope.client.console.commons.RealmsUtils; import org.apache.syncope.client.console.commons.StatusProvider; import org.apache.syncope.client.console.init.ClassPathScanImplementationLookup; -import org.apache.syncope.client.ui.commons.DynamicMenuStringResourceLoader; import org.apache.syncope.client.console.pages.BaseExtPage; import org.apache.syncope.client.console.pages.BasePage; import org.apache.syncope.client.console.pages.Dashboard; @@ -56,6 +53,8 @@ import org.apache.syncope.client.ui.commons.BaseSession; import org.apache.syncope.client.ui.commons.BaseWebApplication; import org.apache.syncope.client.ui.commons.Constants; +import org.apache.syncope.client.ui.commons.DynamicMenuRegister; +import org.apache.syncope.client.ui.commons.DynamicMenuStringResourceLoader; import org.apache.syncope.client.ui.commons.SyncopeUIRequestCycleListener; import org.apache.syncope.client.ui.commons.annotations.ExtPage; import org.apache.syncope.client.ui.commons.annotations.Resource; diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties index dad200381e..b2fd7fdade 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.properties @@ -32,4 +32,4 @@ delegations=Delegations endDelegation=End Delegation sessionExpiration.header=Session Expiration sessionExpiration.body=Your session is about to expire. Please select the appropriate option to keep working. -sessionExpiration.extend=Extend \ No newline at end of file +sessionExpiration.extend=Extend diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties index 6cce701743..9977dbdba0 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties @@ -32,4 +32,4 @@ delegations=Delegations endDelegation=End Delegation sessionExpiration.header=Session Expiration sessionExpiration.body=Your session is about to expire. Please select the appropriate option to keep working. -sessionExpiration.extend=Extend \ No newline at end of file +sessionExpiration.extend=Extend diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ru.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ru.properties index 478baf402a..9def38f672 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ru.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_ru.properties @@ -32,4 +32,4 @@ delegations=Delegations endDelegation=End Delegation sessionExpiration.header=Session Expiration sessionExpiration.body=Your session is about to expire. Please select the appropriate option to keep working. -sessionExpiration.extend=Extend \ No newline at end of file +sessionExpiration.extend=Extend diff --git a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable.properties b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable.properties index 9e9c94257b..208b8c3ae0 100644 --- a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable.properties +++ b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable.properties @@ -18,4 +18,4 @@ xmlEditorTitle=Workflow XML Editor userWorkflow=User workflow external_editor.title=Flowable Modeler -menu.Flowable=Flowable \ No newline at end of file +menu.Flowable=Flowable diff --git a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_fr_CA.properties b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_fr_CA.properties index 8227d56c57..f970823aef 100644 --- a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_fr_CA.properties +++ b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_fr_CA.properties @@ -18,4 +18,4 @@ xmlEditorTitle=XML \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043f\u0440 userWorkflow=User workflow external_editor.title=Flowable Modeler -menu.Flowable=Flowable \ No newline at end of file +menu.Flowable=Flowable diff --git a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ja.properties b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ja.properties index 037d077d7c..8328db6857 100644 --- a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ja.properties +++ b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ja.properties @@ -18,4 +18,4 @@ xmlEditorTitle=\u30ef\u30fc\u30af\u30d5\u30ed\u30fc XML \u30a8\u30c7\u30a3\u30bf userWorkflow=\u30e6\u30fc\u30b6\u30fc\u30ef\u30fc\u30af\u30d5\u30ed\u30fc external_editor.title=Flowable \u30e2\u30c7\u30e9\u30fc -menu.Flowable=Flowable \ No newline at end of file +menu.Flowable=Flowable diff --git a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_pt_BR.properties b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_pt_BR.properties index 9e9c94257b..208b8c3ae0 100644 --- a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_pt_BR.properties +++ b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_pt_BR.properties @@ -18,4 +18,4 @@ xmlEditorTitle=Workflow XML Editor userWorkflow=User workflow external_editor.title=Flowable Modeler -menu.Flowable=Flowable \ No newline at end of file +menu.Flowable=Flowable diff --git a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ru.properties b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ru.properties index 8227d56c57..f970823aef 100644 --- a/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ru.properties +++ b/ext/flowable/client-console/src/main/resources/org/apache/syncope/client/console/pages/Flowable_ru.properties @@ -18,4 +18,4 @@ xmlEditorTitle=XML \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043f\u0440 userWorkflow=User workflow external_editor.title=Flowable Modeler -menu.Flowable=Flowable \ No newline at end of file +menu.Flowable=Flowable diff --git a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable.properties b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable.properties index ba6ac87343..0462c18517 100644 --- a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable.properties +++ b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable.properties @@ -24,4 +24,4 @@ start=Start requests.to.be.approved=Your active requests activityId=Activity Id -menu.Flowable=User Requests \ No newline at end of file +menu.Flowable=User Requests diff --git a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_fr_CA.properties b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_fr_CA.properties index ab9f578ec5..3fb74cc04c 100644 --- a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_fr_CA.properties +++ b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_fr_CA.properties @@ -24,4 +24,4 @@ start=Esegui requests.to.be.approved=Richieste in lavorazione activityId=Id attivit\u00e0 -menu.Flowable=Demandes des utilisateurs \ No newline at end of file +menu.Flowable=Demandes des utilisateurs diff --git a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_it.properties b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_it.properties index 5c9fcbddc6..f52e354375 100644 --- a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_it.properties +++ b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_it.properties @@ -24,4 +24,4 @@ start=Esegui requests.to.be.approved=Richieste in lavorazione activityId=Id attivit\u00e0 -menu.Flowable=Richieste utente \ No newline at end of file +menu.Flowable=Richieste utente diff --git a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_ja.properties b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_ja.properties index a2a7081ebd..235838f236 100644 --- a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_ja.properties +++ b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_ja.properties @@ -24,4 +24,4 @@ start=\u958b\u59cb requests.to.be.approved=\u3042\u306a\u305f\u306e\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30ea\u30af\u30a8\u30b9\u30c8 activityId=Activity Id -menu.Flowable=\u30e6\u30fc\u30b6\u30fc\u8981\u8acb \ No newline at end of file +menu.Flowable=\u30e6\u30fc\u30b6\u30fc\u8981\u8acb diff --git a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_pt_BR.properties b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_pt_BR.properties index 7d6a2cc65d..29c98da459 100644 --- a/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_pt_BR.properties +++ b/ext/flowable/client-enduser/src/main/resources/org/apache/syncope/client/enduser/pages/Flowable_pt_BR.properties @@ -25,3 +25,4 @@ requests.to.be.approved=Seus pedidos ativos activityId=Activity Id menu.Flowable=Solicita\u00e7\u00f5es dos usu\u00e1rios + diff --git a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI.properties b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI.properties index c0f0473776..5712591ae5 100644 --- a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI.properties +++ b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI.properties @@ -16,4 +16,4 @@ # under the License. op=OIDC Providers -menu.OIDCC4UI=OIDC 1.0 C4UI \ No newline at end of file +menu.OIDCC4UI=OIDC 1.0 C4UI diff --git a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_fr.properties b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_fr.properties index 1d795b3858..51e437f0f7 100644 --- a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_fr.properties +++ b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_fr.properties @@ -16,4 +16,4 @@ # under the License. op=Provider OIDC -menu.OIDCC4UI=OIDC 1.0 C4UI \ No newline at end of file +menu.OIDCC4UI=OIDC 1.0 C4UI diff --git a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_it.properties b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_it.properties index 1d795b3858..51e437f0f7 100644 --- a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_it.properties +++ b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_it.properties @@ -16,4 +16,4 @@ # under the License. op=Provider OIDC -menu.OIDCC4UI=OIDC 1.0 C4UI \ No newline at end of file +menu.OIDCC4UI=OIDC 1.0 C4UI diff --git a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_ja.properties b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_ja.properties index c0f0473776..5712591ae5 100644 --- a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_ja.properties +++ b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_ja.properties @@ -16,4 +16,4 @@ # under the License. op=OIDC Providers -menu.OIDCC4UI=OIDC 1.0 C4UI \ No newline at end of file +menu.OIDCC4UI=OIDC 1.0 C4UI diff --git a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_pt.properties b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_pt.properties index 1d795b3858..51e437f0f7 100644 --- a/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_pt.properties +++ b/ext/oidcc4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/OIDCC4UI_pt.properties @@ -16,4 +16,4 @@ # under the License. op=Provider OIDC -menu.OIDCC4UI=OIDC 1.0 C4UI \ No newline at end of file +menu.OIDCC4UI=OIDC 1.0 C4UI diff --git a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI.properties b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI.properties index 057a26dbb4..734c6a71db 100644 --- a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI.properties +++ b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI.properties @@ -17,4 +17,4 @@ idps=Identity Providers sp=Service Provider -menu.SAML2SP4UI=SAML 2.0 SP4UI \ No newline at end of file +menu.SAML2SP4UI=SAML 2.0 SP4UI diff --git a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_fr_CA.properties b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_fr_CA.properties index 057a26dbb4..734c6a71db 100644 --- a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_fr_CA.properties +++ b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_fr_CA.properties @@ -17,4 +17,4 @@ idps=Identity Providers sp=Service Provider -menu.SAML2SP4UI=SAML 2.0 SP4UI \ No newline at end of file +menu.SAML2SP4UI=SAML 2.0 SP4UI diff --git a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_it.properties b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_it.properties index 057a26dbb4..734c6a71db 100644 --- a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_it.properties +++ b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_it.properties @@ -17,4 +17,4 @@ idps=Identity Providers sp=Service Provider -menu.SAML2SP4UI=SAML 2.0 SP4UI \ No newline at end of file +menu.SAML2SP4UI=SAML 2.0 SP4UI diff --git a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ja.properties b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ja.properties index 057a26dbb4..734c6a71db 100644 --- a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ja.properties +++ b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ja.properties @@ -17,4 +17,4 @@ idps=Identity Providers sp=Service Provider -menu.SAML2SP4UI=SAML 2.0 SP4UI \ No newline at end of file +menu.SAML2SP4UI=SAML 2.0 SP4UI diff --git a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_pt_BR.properties b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_pt_BR.properties index 057a26dbb4..734c6a71db 100644 --- a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_pt_BR.properties +++ b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_pt_BR.properties @@ -17,4 +17,4 @@ idps=Identity Providers sp=Service Provider -menu.SAML2SP4UI=SAML 2.0 SP4UI \ No newline at end of file +menu.SAML2SP4UI=SAML 2.0 SP4UI diff --git a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ru.properties b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ru.properties index 057a26dbb4..734c6a71db 100644 --- a/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ru.properties +++ b/ext/saml2sp4ui/client-console/src/main/resources/org/apache/syncope/client/console/pages/SAML2SP4UI_ru.properties @@ -17,4 +17,4 @@ idps=Identity Providers sp=Service Provider -menu.SAML2SP4UI=SAML 2.0 SP4UI \ No newline at end of file +menu.SAML2SP4UI=SAML 2.0 SP4UI diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage.properties b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage.properties index 47c2a9f176..a82bf5e4df 100644 --- a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage.properties +++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage.properties @@ -16,4 +16,4 @@ # under the License. scimConfGeneral=General -menu.SCIMConfPage=SCIM 2.0 \ No newline at end of file +menu.SCIMConfPage=SCIM 2.0 diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_fr.properties b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_fr.properties index 47c2a9f176..a82bf5e4df 100644 --- a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_fr.properties +++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_fr.properties @@ -16,4 +16,4 @@ # under the License. scimConfGeneral=General -menu.SCIMConfPage=SCIM 2.0 \ No newline at end of file +menu.SCIMConfPage=SCIM 2.0 diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_it.properties b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_it.properties index 47c2a9f176..a82bf5e4df 100644 --- a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_it.properties +++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_it.properties @@ -16,4 +16,4 @@ # under the License. scimConfGeneral=General -menu.SCIMConfPage=SCIM 2.0 \ No newline at end of file +menu.SCIMConfPage=SCIM 2.0 diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ja.properties b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ja.properties index 47c2a9f176..a82bf5e4df 100644 --- a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ja.properties +++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ja.properties @@ -16,4 +16,4 @@ # under the License. scimConfGeneral=General -menu.SCIMConfPage=SCIM 2.0 \ No newline at end of file +menu.SCIMConfPage=SCIM 2.0 diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_pt_BR.properties b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_pt_BR.properties index 47c2a9f176..a82bf5e4df 100644 --- a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_pt_BR.properties +++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_pt_BR.properties @@ -16,4 +16,4 @@ # under the License. scimConfGeneral=General -menu.SCIMConfPage=SCIM 2.0 \ No newline at end of file +menu.SCIMConfPage=SCIM 2.0 diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ru.properties b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ru.properties index a82bf5e4df..66cff14474 100644 --- a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ru.properties +++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ru.properties @@ -17,3 +17,4 @@ scimConfGeneral=General menu.SCIMConfPage=SCIM 2.0 + From 81be4c294baf6db54b47cb4543e2948e0de34d8d Mon Sep 17 00:00:00 2001 From: Massimiliano Perrone Date: Wed, 14 Jan 2026 10:50:43 +0100 Subject: [PATCH 5/6] [SYNCOPE-1942] - using injection instead of static class + localized label --- .../ui/commons/DynamicMenuRegister.java | 13 ++++++------ .../DynamicMenuStringResourceLoader.java | 7 +++++-- .../client/console/IdRepoConsoleContext.java | 7 +++++++ .../console/SyncopeConsoleApplication.java | 8 +++++-- .../client/console/SyncopeWebApplication.java | 17 ++++++++------- .../SyncopeWebApplication_ja.properties | 2 +- .../SyncopeWebApplication_pt_BR.properties | 2 +- .../SyncopeWebApplication_ru.properties | 2 +- .../syncope/client/console/AbstractTest.java | 3 ++- .../client/enduser/IdRepoEnduserContext.java | 7 +++++++ .../enduser/SyncopeEnduserApplication.java | 6 ++++-- .../client/enduser/SyncopeWebApplication.java | 21 +++++++++++-------- .../syncope/client/enduser/AbstractTest.java | 3 ++- 13 files changed, 64 insertions(+), 34 deletions(-) diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java index 3543b0d403..7d92ed4704 100644 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java @@ -23,16 +23,17 @@ public final class DynamicMenuRegister { - private static final Map> KEYS_FOR_PAGES = new HashMap<>(); + private final Map> keysForPages; - private DynamicMenuRegister() { + public DynamicMenuRegister() { + keysForPages = new HashMap<>(); } - public static void register(final String key, final Class pageClass) { - KEYS_FOR_PAGES.put(key, pageClass); + public void register(final String key, final Class pageClass) { + keysForPages.put(key, pageClass); } - public static Class getPage(final String key) { - return KEYS_FOR_PAGES.get(key); + public Class getPage(final String key) { + return keysForPages.get(key); } } diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java index f5cf671da5..939fadfbf9 100644 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java @@ -30,8 +30,11 @@ public class DynamicMenuStringResourceLoader extends ClassStringResourceLoader { protected static final Logger LOG = LoggerFactory.getLogger(DynamicMenuStringResourceLoader.class); - public DynamicMenuStringResourceLoader() { + private DynamicMenuRegister dynamicMenuRegister; + + public DynamicMenuStringResourceLoader(final DynamicMenuRegister dynamicMenuRegister) { super(DynamicMenuStringResourceLoader.class); + this.dynamicMenuRegister = dynamicMenuRegister; } @Override @@ -43,7 +46,7 @@ public String loadStringResource( final String variation) { if (key != null && key.startsWith("menu.")) { - Class pageClass = DynamicMenuRegister.getPage(key); + Class pageClass = dynamicMenuRegister.getPage(key); if (pageClass != null) { final String path = pageClass.getName().replace('.', '/'); diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/IdRepoConsoleContext.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/IdRepoConsoleContext.java index 0f85093b9e..551a02fb53 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/IdRepoConsoleContext.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/IdRepoConsoleContext.java @@ -69,6 +69,7 @@ import org.apache.syncope.client.console.rest.TaskRestClient; import org.apache.syncope.client.console.rest.UserRestClient; import org.apache.syncope.client.console.rest.UserSelfRestClient; +import org.apache.syncope.client.ui.commons.DynamicMenuRegister; import org.apache.syncope.client.ui.commons.MIMETypesLoader; import org.apache.syncope.client.ui.commons.PreviewUtils; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; @@ -334,4 +335,10 @@ public UserRestClient userRestClient() { public UserSelfRestClient userSelfRestClient() { return new UserSelfRestClient(); } + + @ConditionalOnMissingBean + @Bean + public DynamicMenuRegister dynamicMenuRegister() { + return new DynamicMenuRegister(); + } } diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java index 74bb1be384..e6c91c4826 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java @@ -33,6 +33,7 @@ import org.apache.syncope.client.console.commons.StatusProvider; import org.apache.syncope.client.console.init.ClassPathScanImplementationLookup; import org.apache.syncope.client.console.wizards.any.UserFormFinalizer; +import org.apache.syncope.client.ui.commons.DynamicMenuRegister; import org.apache.syncope.client.ui.commons.actuate.SyncopeCoreHealthIndicator; import org.apache.syncope.common.keymaster.client.api.ServiceOps; import org.apache.syncope.common.keymaster.client.api.model.NetworkService; @@ -87,7 +88,9 @@ public SyncopeWebApplication syncopeWebApplication( @Qualifier(SyncopeWebApplication.LOGGEDOUT_SESSIONID_CACHE) final Cache loggedoutSessionIdCache, @Qualifier(SyncopeWebApplication.DESTROYED_SESSIONID_CACHE) - final Cache destroyedSessionIdCache) { + final Cache destroyedSessionIdCache, + final DynamicMenuRegister dynamicMenuRegister + ) { return new SyncopeWebApplication( props, @@ -103,7 +106,8 @@ public SyncopeWebApplication syncopeWebApplication( userFormFinalizers, resources, loggedoutSessionIdCache, - destroyedSessionIdCache); + destroyedSessionIdCache, + dynamicMenuRegister); } @ConditionalOnMissingBean diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java index e4f2f3ea86..ff21e5e925 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java @@ -129,6 +129,8 @@ public static SyncopeWebApplication get() { protected final Cache destroyedSessionIdCache; + protected final DynamicMenuRegister dynamicMenuRegister; + public SyncopeWebApplication( final ConsoleProperties props, final ClassPathScanImplementationLookup lookup, @@ -144,7 +146,8 @@ public SyncopeWebApplication( final List userFormFinalizers, final List resources, final Cache loggedoutSessionIdCache, - final Cache destroyedSessionIdCache) { + final Cache destroyedSessionIdCache, + final DynamicMenuRegister dynamicMenuRegister) { this.props = props; this.lookup = lookup; @@ -161,6 +164,7 @@ public SyncopeWebApplication( this.resources = resources; this.loggedoutSessionIdCache = loggedoutSessionIdCache; this.destroyedSessionIdCache = destroyedSessionIdCache; + this.dynamicMenuRegister = dynamicMenuRegister; } protected SyncopeUIRequestCycleListener buildSyncopeUIRequestCycleListener() { @@ -244,25 +248,22 @@ protected void init() { mountPage("/login", getSignInPageClass()); - //[SYNCOPE-1942] - //-- final List> amPageClasses = lookup.getAMPageClasses(); amPageClasses.forEach(claz -> { - DynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + dynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); }); final List> idmPageClasses = lookup.getIdMPageClasses(); idmPageClasses.forEach(claz -> { - DynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + dynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); }); final List> extPageClasses = lookup.getClasses(BaseExtPage.class); extPageClasses.stream().filter(claz -> (claz.isAnnotationPresent(ExtPage.class))).forEach(claz -> { - DynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + dynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); }); - getResourceSettings().getStringResourceLoaders().add(new DynamicMenuStringResourceLoader()); - //-- + getResourceSettings().getStringResourceLoaders().add(new DynamicMenuStringResourceLoader(dynamicMenuRegister)); for (IResource resource : resources) { Class resourceClass = AopUtils.getTargetClass(resource); diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/SyncopeWebApplication_ja.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/SyncopeWebApplication_ja.properties index c5574aed48..2c2735d155 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/SyncopeWebApplication_ja.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/SyncopeWebApplication_ja.properties @@ -79,6 +79,6 @@ nomatch=No matches found tooLargeFile=File is too large, max upload file size is ${maxUploadSizeB} bytes (${maxUploadSizeMB} MB). confirmDelegation=Do you really want to switch user? topology=Topology -engagements=Engagements +engagements=\u5a5a\u7d04 confirmProvisionMembers=Do you really want to provision all group members? confirmDeprovisionMembers=Do you really want to deprovision all group members? diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/SyncopeWebApplication_pt_BR.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/SyncopeWebApplication_pt_BR.properties index 99cb0b0319..deed0a6770 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/SyncopeWebApplication_pt_BR.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/SyncopeWebApplication_pt_BR.properties @@ -81,6 +81,6 @@ nomatch=Nenhuma correspond\u00eancia encontrada tooLargeFile=File is too large, max upload file size is ${maxUploadSizeB} bytes (${maxUploadSizeMB} MB). confirmDelegation=Do you really want to switch user? topology=Topology -engagements=Engagements +engagements=Compromissos confirmProvisionMembers=Do you really want to provision all group's members? confirmDeprovisionMembers=Do you really want to deprovision all group members? diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/SyncopeWebApplication_ru.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/SyncopeWebApplication_ru.properties index 8a234c38d6..ee0d2cedee 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/SyncopeWebApplication_ru.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/SyncopeWebApplication_ru.properties @@ -80,6 +80,6 @@ nomatch=No matches found tooLargeFile=File is too large, max upload file size is ${maxUploadSizeB} bytes (${maxUploadSizeMB} MB). confirmDelegation=Do you really want to switch user? topology=Topology -engagements=Engagements +engagements=\u043f\u043e\u043c\u043e\u043b\u0432\u043a\u0438 confirmProvisionMembers=Do you really want to provision all group members? confirmDeprovisionMembers=Do you really want to deprovision all group members? diff --git a/client/idrepo/console/src/test/java/org/apache/syncope/client/console/AbstractTest.java b/client/idrepo/console/src/test/java/org/apache/syncope/client/console/AbstractTest.java index 217c3268a9..ce25b180ab 100644 --- a/client/idrepo/console/src/test/java/org/apache/syncope/client/console/AbstractTest.java +++ b/client/idrepo/console/src/test/java/org/apache/syncope/client/console/AbstractTest.java @@ -52,6 +52,7 @@ import org.apache.syncope.client.lib.SyncopeAnonymousClient; import org.apache.syncope.client.lib.SyncopeClient; import org.apache.syncope.client.lib.SyncopeClientFactoryBean; +import org.apache.syncope.client.ui.commons.DynamicMenuRegister; import org.apache.syncope.common.keymaster.client.api.DomainOps; import org.apache.syncope.common.keymaster.client.api.ServiceOps; import org.apache.syncope.common.keymaster.client.api.model.JPADomain; @@ -169,7 +170,7 @@ public TestSyncopeWebApplication( super(props, lookup, serviceOps, resourceProvider, anyDirectoryPanelAdditionalActionsProvider, anyDirectoryPanelAdditionalActionLinksProvider, anyWizardBuilderAdditionalSteps, statusProvider, implementationInfoProvider, accessPolicyConfProvider, policyTabProviders, userFormFinalizers, - resources, loggedoutSessionIdCache, destroyedSessionIdCache); + resources, loggedoutSessionIdCache, destroyedSessionIdCache, new DynamicMenuRegister()); } public interface SyncopeServiceClient extends SyncopeService, Client { diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/IdRepoEnduserContext.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/IdRepoEnduserContext.java index 4cbe7b47be..4eaaf1993e 100644 --- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/IdRepoEnduserContext.java +++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/IdRepoEnduserContext.java @@ -25,6 +25,7 @@ import org.apache.syncope.client.enduser.rest.SecurityQuestionRestClient; import org.apache.syncope.client.enduser.rest.SyncopeRestClient; import org.apache.syncope.client.enduser.rest.UserSelfRestClient; +import org.apache.syncope.client.ui.commons.DynamicMenuRegister; import org.apache.syncope.client.ui.commons.MIMETypesLoader; import org.apache.syncope.client.ui.commons.PreviewUtils; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; @@ -91,4 +92,10 @@ public SyncopeRestClient syncopeRestClient() { public UserSelfRestClient userSelfRestClient() { return new UserSelfRestClient(); } + + @ConditionalOnMissingBean + @Bean + public DynamicMenuRegister dynamicMenuRegister() { + return new DynamicMenuRegister(); + } } diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserApplication.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserApplication.java index 96c0f065f7..1747bd5610 100644 --- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserApplication.java +++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserApplication.java @@ -22,6 +22,7 @@ import java.util.List; import java.util.Map; import org.apache.syncope.client.enduser.init.ClassPathScanImplementationLookup; +import org.apache.syncope.client.ui.commons.DynamicMenuRegister; import org.apache.syncope.client.ui.commons.actuate.SyncopeCoreHealthIndicator; import org.apache.syncope.common.keymaster.client.api.ServiceOps; import org.apache.syncope.common.keymaster.client.api.model.NetworkService; @@ -62,9 +63,10 @@ public SyncopeWebApplication syncopeWebApplication( final EnduserProperties props, final ClassPathScanImplementationLookup lookup, final ServiceOps serviceOps, - final List resources) { + final List resources, + final DynamicMenuRegister dynamicMenuRegister) { - return new SyncopeWebApplication(resourceLoader, props, lookup, serviceOps, resources); + return new SyncopeWebApplication(resourceLoader, props, lookup, serviceOps, resources, dynamicMenuRegister); } @ConditionalOnMissingBean diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeWebApplication.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeWebApplication.java index a105debcd5..d41cfe9883 100644 --- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeWebApplication.java +++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeWebApplication.java @@ -94,18 +94,24 @@ public static SyncopeWebApplication get() { protected UserFormLayoutInfo customFormLayout; + protected final DynamicMenuRegister dynamicMenuRegister; + public SyncopeWebApplication( final ResourceLoader resourceLoader, final EnduserProperties props, final ClassPathScanImplementationLookup lookup, final ServiceOps serviceOps, - final List resources) { + final List resources, + final DynamicMenuRegister dynamicMenuRegister + ) { this.resourceLoader = resourceLoader; this.props = props; this.lookup = lookup; this.serviceOps = serviceOps; this.resources = resources; + this.dynamicMenuRegister = dynamicMenuRegister; + } protected SyncopeUIRequestCycleListener buildSyncopeUIRequestCycleListener() { @@ -206,25 +212,22 @@ public IResource getResource() { } } - //[SYNCOPE-1942] - //-- final List> amPageClasses = lookup.getAMPageClasses(); amPageClasses.forEach(claz -> { - DynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + dynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); }); final List> idmPageClasses = lookup.getIdMPageClasses(); idmPageClasses.forEach(claz -> { - DynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + dynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); }); - + final List> extPageClasses = lookup.getExtPageClasses(); extPageClasses.stream().filter(claz -> (claz.isAnnotationPresent(ExtPage.class))).forEach(claz -> { - DynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + dynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); }); - getResourceSettings().getStringResourceLoaders().add(new DynamicMenuStringResourceLoader()); - //-- + getResourceSettings().getStringResourceLoaders().add(new DynamicMenuStringResourceLoader(dynamicMenuRegister)); try (InputStream is = resourceLoader.getResource(props.getCustomFormLayout()).getInputStream()) { customFormLayout = MAPPER.readValue(is, new TypeReference<>() { diff --git a/client/idrepo/enduser/src/test/java/org/apache/syncope/client/enduser/AbstractTest.java b/client/idrepo/enduser/src/test/java/org/apache/syncope/client/enduser/AbstractTest.java index 3016d1af58..44d7f59a12 100644 --- a/client/idrepo/enduser/src/test/java/org/apache/syncope/client/enduser/AbstractTest.java +++ b/client/idrepo/enduser/src/test/java/org/apache/syncope/client/enduser/AbstractTest.java @@ -40,6 +40,7 @@ import org.apache.syncope.client.lib.SyncopeAnonymousClient; import org.apache.syncope.client.lib.SyncopeClient; import org.apache.syncope.client.lib.SyncopeClientFactoryBean; +import org.apache.syncope.client.ui.commons.DynamicMenuRegister; import org.apache.syncope.common.keymaster.client.api.DomainOps; import org.apache.syncope.common.keymaster.client.api.ServiceOps; import org.apache.syncope.common.keymaster.client.api.model.JPADomain; @@ -137,7 +138,7 @@ public TestSyncopeWebApplication( final ServiceOps serviceOps, final List resources) { - super(resourceLoader, props, lookup, serviceOps, resources); + super(resourceLoader, props, lookup, serviceOps, resources, new DynamicMenuRegister()); } public interface SyncopeServiceClient extends SyncopeService, Client { From 6958a05dda53c1d917a962d469d346216fb25006 Mon Sep 17 00:00:00 2001 From: Massimiliano Perrone Date: Thu, 15 Jan 2026 11:13:27 +0100 Subject: [PATCH 6/6] [SYNCOPE-1942] - collapsed DynamicMenuStringResourceLoader DynamicMenuRegister to use with Bean --- .../ui/commons/DynamicMenuRegister.java | 39 ------------------- .../DynamicMenuStringResourceLoader.java | 18 +++++++-- .../client/console/IdRepoConsoleContext.java | 6 +-- .../console/SyncopeConsoleApplication.java | 6 +-- .../client/console/SyncopeWebApplication.java | 15 ++++--- .../syncope/client/console/AbstractTest.java | 12 ++++-- .../client/enduser/IdRepoEnduserContext.java | 6 +-- .../enduser/SyncopeEnduserApplication.java | 7 ++-- .../client/enduser/SyncopeWebApplication.java | 16 ++++---- .../syncope/client/enduser/AbstractTest.java | 12 ++++-- 10 files changed, 59 insertions(+), 78 deletions(-) delete mode 100644 client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java deleted file mode 100644 index 7d92ed4704..0000000000 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuRegister.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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. - */ -package org.apache.syncope.client.ui.commons; - -import java.util.HashMap; -import java.util.Map; - -public final class DynamicMenuRegister { - - private final Map> keysForPages; - - public DynamicMenuRegister() { - keysForPages = new HashMap<>(); - } - - public void register(final String key, final Class pageClass) { - keysForPages.put(key, pageClass); - } - - public Class getPage(final String key) { - return keysForPages.get(key); - } -} diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java index 939fadfbf9..13234932ec 100644 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/DynamicMenuStringResourceLoader.java @@ -18,7 +18,9 @@ */ package org.apache.syncope.client.ui.commons; +import java.util.HashMap; import java.util.Locale; +import java.util.Map; import org.apache.wicket.core.util.resource.locator.IResourceNameIterator; import org.apache.wicket.resource.IPropertiesFactory; import org.apache.wicket.resource.Properties; @@ -30,11 +32,11 @@ public class DynamicMenuStringResourceLoader extends ClassStringResourceLoader { protected static final Logger LOG = LoggerFactory.getLogger(DynamicMenuStringResourceLoader.class); - private DynamicMenuRegister dynamicMenuRegister; + private final Map> keysForPages; - public DynamicMenuStringResourceLoader(final DynamicMenuRegister dynamicMenuRegister) { + public DynamicMenuStringResourceLoader() { super(DynamicMenuStringResourceLoader.class); - this.dynamicMenuRegister = dynamicMenuRegister; + keysForPages = new HashMap<>(); } @Override @@ -46,7 +48,7 @@ public String loadStringResource( final String variation) { if (key != null && key.startsWith("menu.")) { - Class pageClass = dynamicMenuRegister.getPage(key); + Class pageClass = getPage(key); if (pageClass != null) { final String path = pageClass.getName().replace('.', '/'); @@ -68,4 +70,12 @@ public String loadStringResource( return null; } + + private Class getPage(final String key) { + return keysForPages.get(key); + } + + public void register(final String key, final Class pageClass) { + keysForPages.put(key, pageClass); + } } diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/IdRepoConsoleContext.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/IdRepoConsoleContext.java index 551a02fb53..b1a3c8fb91 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/IdRepoConsoleContext.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/IdRepoConsoleContext.java @@ -69,7 +69,7 @@ import org.apache.syncope.client.console.rest.TaskRestClient; import org.apache.syncope.client.console.rest.UserRestClient; import org.apache.syncope.client.console.rest.UserSelfRestClient; -import org.apache.syncope.client.ui.commons.DynamicMenuRegister; +import org.apache.syncope.client.ui.commons.DynamicMenuStringResourceLoader; import org.apache.syncope.client.ui.commons.MIMETypesLoader; import org.apache.syncope.client.ui.commons.PreviewUtils; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; @@ -338,7 +338,7 @@ public UserSelfRestClient userSelfRestClient() { @ConditionalOnMissingBean @Bean - public DynamicMenuRegister dynamicMenuRegister() { - return new DynamicMenuRegister(); + public DynamicMenuStringResourceLoader dynamicMenuStringResourceLoader() { + return new DynamicMenuStringResourceLoader(); } } diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java index e6c91c4826..a92b9227f4 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java @@ -33,7 +33,7 @@ import org.apache.syncope.client.console.commons.StatusProvider; import org.apache.syncope.client.console.init.ClassPathScanImplementationLookup; import org.apache.syncope.client.console.wizards.any.UserFormFinalizer; -import org.apache.syncope.client.ui.commons.DynamicMenuRegister; +import org.apache.syncope.client.ui.commons.DynamicMenuStringResourceLoader; import org.apache.syncope.client.ui.commons.actuate.SyncopeCoreHealthIndicator; import org.apache.syncope.common.keymaster.client.api.ServiceOps; import org.apache.syncope.common.keymaster.client.api.model.NetworkService; @@ -89,7 +89,7 @@ public SyncopeWebApplication syncopeWebApplication( final Cache loggedoutSessionIdCache, @Qualifier(SyncopeWebApplication.DESTROYED_SESSIONID_CACHE) final Cache destroyedSessionIdCache, - final DynamicMenuRegister dynamicMenuRegister + final DynamicMenuStringResourceLoader dynamicMenuStringResourceLoader ) { return new SyncopeWebApplication( @@ -107,7 +107,7 @@ public SyncopeWebApplication syncopeWebApplication( resources, loggedoutSessionIdCache, destroyedSessionIdCache, - dynamicMenuRegister); + dynamicMenuStringResourceLoader); } @ConditionalOnMissingBean diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java index ff21e5e925..8dae943ce0 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/SyncopeWebApplication.java @@ -53,7 +53,6 @@ import org.apache.syncope.client.ui.commons.BaseSession; import org.apache.syncope.client.ui.commons.BaseWebApplication; import org.apache.syncope.client.ui.commons.Constants; -import org.apache.syncope.client.ui.commons.DynamicMenuRegister; import org.apache.syncope.client.ui.commons.DynamicMenuStringResourceLoader; import org.apache.syncope.client.ui.commons.SyncopeUIRequestCycleListener; import org.apache.syncope.client.ui.commons.annotations.ExtPage; @@ -129,7 +128,7 @@ public static SyncopeWebApplication get() { protected final Cache destroyedSessionIdCache; - protected final DynamicMenuRegister dynamicMenuRegister; + protected final DynamicMenuStringResourceLoader dynamicMenuStringResourceLoader; public SyncopeWebApplication( final ConsoleProperties props, @@ -147,7 +146,7 @@ public SyncopeWebApplication( final List resources, final Cache loggedoutSessionIdCache, final Cache destroyedSessionIdCache, - final DynamicMenuRegister dynamicMenuRegister) { + final DynamicMenuStringResourceLoader dynamicMenuStringResourceLoader) { this.props = props; this.lookup = lookup; @@ -164,7 +163,7 @@ public SyncopeWebApplication( this.resources = resources; this.loggedoutSessionIdCache = loggedoutSessionIdCache; this.destroyedSessionIdCache = destroyedSessionIdCache; - this.dynamicMenuRegister = dynamicMenuRegister; + this.dynamicMenuStringResourceLoader = dynamicMenuStringResourceLoader; } protected SyncopeUIRequestCycleListener buildSyncopeUIRequestCycleListener() { @@ -250,20 +249,20 @@ protected void init() { final List> amPageClasses = lookup.getAMPageClasses(); amPageClasses.forEach(claz -> { - dynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + dynamicMenuStringResourceLoader.register("menu." + claz.getSimpleName(), claz); }); final List> idmPageClasses = lookup.getIdMPageClasses(); idmPageClasses.forEach(claz -> { - dynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + dynamicMenuStringResourceLoader.register("menu." + claz.getSimpleName(), claz); }); final List> extPageClasses = lookup.getClasses(BaseExtPage.class); extPageClasses.stream().filter(claz -> (claz.isAnnotationPresent(ExtPage.class))).forEach(claz -> { - dynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + dynamicMenuStringResourceLoader.register("menu." + claz.getSimpleName(), claz); }); - getResourceSettings().getStringResourceLoaders().add(new DynamicMenuStringResourceLoader(dynamicMenuRegister)); + getResourceSettings().getStringResourceLoaders().add(dynamicMenuStringResourceLoader); for (IResource resource : resources) { Class resourceClass = AopUtils.getTargetClass(resource); diff --git a/client/idrepo/console/src/test/java/org/apache/syncope/client/console/AbstractTest.java b/client/idrepo/console/src/test/java/org/apache/syncope/client/console/AbstractTest.java index ce25b180ab..17f968ad08 100644 --- a/client/idrepo/console/src/test/java/org/apache/syncope/client/console/AbstractTest.java +++ b/client/idrepo/console/src/test/java/org/apache/syncope/client/console/AbstractTest.java @@ -52,7 +52,7 @@ import org.apache.syncope.client.lib.SyncopeAnonymousClient; import org.apache.syncope.client.lib.SyncopeClient; import org.apache.syncope.client.lib.SyncopeClientFactoryBean; -import org.apache.syncope.client.ui.commons.DynamicMenuRegister; +import org.apache.syncope.client.ui.commons.DynamicMenuStringResourceLoader; import org.apache.syncope.common.keymaster.client.api.DomainOps; import org.apache.syncope.common.keymaster.client.api.ServiceOps; import org.apache.syncope.common.keymaster.client.api.model.JPADomain; @@ -146,6 +146,11 @@ public CacheManager cacheManager() { when(cacheManager.createCache(anyString(), any())).thenAnswer(ic -> mock(Cache.class)); return cacheManager; } + + @Bean + public DynamicMenuStringResourceLoader dynamicMenuStringResourceLoader() { + return new DynamicMenuStringResourceLoader(); + } } public static class TestSyncopeWebApplication extends SyncopeWebApplication { @@ -165,12 +170,13 @@ public TestSyncopeWebApplication( final List userFormFinalizers, final List resources, final Cache loggedoutSessionIdCache, - final Cache destroyedSessionIdCache) { + final Cache destroyedSessionIdCache, + final DynamicMenuStringResourceLoader dynamicMenuStringResourceLoader) { super(props, lookup, serviceOps, resourceProvider, anyDirectoryPanelAdditionalActionsProvider, anyDirectoryPanelAdditionalActionLinksProvider, anyWizardBuilderAdditionalSteps, statusProvider, implementationInfoProvider, accessPolicyConfProvider, policyTabProviders, userFormFinalizers, - resources, loggedoutSessionIdCache, destroyedSessionIdCache, new DynamicMenuRegister()); + resources, loggedoutSessionIdCache, destroyedSessionIdCache, dynamicMenuStringResourceLoader); } public interface SyncopeServiceClient extends SyncopeService, Client { diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/IdRepoEnduserContext.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/IdRepoEnduserContext.java index 4eaaf1993e..6db50844ab 100644 --- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/IdRepoEnduserContext.java +++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/IdRepoEnduserContext.java @@ -25,7 +25,7 @@ import org.apache.syncope.client.enduser.rest.SecurityQuestionRestClient; import org.apache.syncope.client.enduser.rest.SyncopeRestClient; import org.apache.syncope.client.enduser.rest.UserSelfRestClient; -import org.apache.syncope.client.ui.commons.DynamicMenuRegister; +import org.apache.syncope.client.ui.commons.DynamicMenuStringResourceLoader; import org.apache.syncope.client.ui.commons.MIMETypesLoader; import org.apache.syncope.client.ui.commons.PreviewUtils; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; @@ -95,7 +95,7 @@ public UserSelfRestClient userSelfRestClient() { @ConditionalOnMissingBean @Bean - public DynamicMenuRegister dynamicMenuRegister() { - return new DynamicMenuRegister(); + public DynamicMenuStringResourceLoader dynamicMenuStringResourceLoader() { + return new DynamicMenuStringResourceLoader(); } } diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserApplication.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserApplication.java index 1747bd5610..21ef0d75c1 100644 --- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserApplication.java +++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserApplication.java @@ -22,7 +22,7 @@ import java.util.List; import java.util.Map; import org.apache.syncope.client.enduser.init.ClassPathScanImplementationLookup; -import org.apache.syncope.client.ui.commons.DynamicMenuRegister; +import org.apache.syncope.client.ui.commons.DynamicMenuStringResourceLoader; import org.apache.syncope.client.ui.commons.actuate.SyncopeCoreHealthIndicator; import org.apache.syncope.common.keymaster.client.api.ServiceOps; import org.apache.syncope.common.keymaster.client.api.model.NetworkService; @@ -64,9 +64,10 @@ public SyncopeWebApplication syncopeWebApplication( final ClassPathScanImplementationLookup lookup, final ServiceOps serviceOps, final List resources, - final DynamicMenuRegister dynamicMenuRegister) { + final DynamicMenuStringResourceLoader dynamicMenuStringResourceLoader) { - return new SyncopeWebApplication(resourceLoader, props, lookup, serviceOps, resources, dynamicMenuRegister); + return new SyncopeWebApplication( + resourceLoader, props, lookup, serviceOps, resources, dynamicMenuStringResourceLoader); } @ConditionalOnMissingBean diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeWebApplication.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeWebApplication.java index d41cfe9883..97dcf13ccb 100644 --- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeWebApplication.java +++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeWebApplication.java @@ -41,7 +41,6 @@ import org.apache.syncope.client.lib.SyncopeClientFactoryBean; import org.apache.syncope.client.ui.commons.BaseLogin; import org.apache.syncope.client.ui.commons.BaseWebApplication; -import org.apache.syncope.client.ui.commons.DynamicMenuRegister; import org.apache.syncope.client.ui.commons.DynamicMenuStringResourceLoader; import org.apache.syncope.client.ui.commons.SyncopeUIRequestCycleListener; import org.apache.syncope.client.ui.commons.annotations.ExtPage; @@ -94,7 +93,7 @@ public static SyncopeWebApplication get() { protected UserFormLayoutInfo customFormLayout; - protected final DynamicMenuRegister dynamicMenuRegister; + protected final DynamicMenuStringResourceLoader dynamicMenuStringResourceLoader; public SyncopeWebApplication( final ResourceLoader resourceLoader, @@ -102,7 +101,7 @@ public SyncopeWebApplication( final ClassPathScanImplementationLookup lookup, final ServiceOps serviceOps, final List resources, - final DynamicMenuRegister dynamicMenuRegister + final DynamicMenuStringResourceLoader dynamicMenuStringResourceLoader ) { this.resourceLoader = resourceLoader; @@ -110,8 +109,7 @@ public SyncopeWebApplication( this.lookup = lookup; this.serviceOps = serviceOps; this.resources = resources; - this.dynamicMenuRegister = dynamicMenuRegister; - + this.dynamicMenuStringResourceLoader = dynamicMenuStringResourceLoader; } protected SyncopeUIRequestCycleListener buildSyncopeUIRequestCycleListener() { @@ -214,20 +212,20 @@ public IResource getResource() { final List> amPageClasses = lookup.getAMPageClasses(); amPageClasses.forEach(claz -> { - dynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + dynamicMenuStringResourceLoader.register("menu." + claz.getSimpleName(), claz); }); final List> idmPageClasses = lookup.getIdMPageClasses(); idmPageClasses.forEach(claz -> { - dynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + dynamicMenuStringResourceLoader.register("menu." + claz.getSimpleName(), claz); }); final List> extPageClasses = lookup.getExtPageClasses(); extPageClasses.stream().filter(claz -> (claz.isAnnotationPresent(ExtPage.class))).forEach(claz -> { - dynamicMenuRegister.register("menu." + claz.getSimpleName(), claz); + dynamicMenuStringResourceLoader.register("menu." + claz.getSimpleName(), claz); }); - getResourceSettings().getStringResourceLoaders().add(new DynamicMenuStringResourceLoader(dynamicMenuRegister)); + getResourceSettings().getStringResourceLoaders().add(dynamicMenuStringResourceLoader); try (InputStream is = resourceLoader.getResource(props.getCustomFormLayout()).getInputStream()) { customFormLayout = MAPPER.readValue(is, new TypeReference<>() { diff --git a/client/idrepo/enduser/src/test/java/org/apache/syncope/client/enduser/AbstractTest.java b/client/idrepo/enduser/src/test/java/org/apache/syncope/client/enduser/AbstractTest.java index 44d7f59a12..64ac9d197f 100644 --- a/client/idrepo/enduser/src/test/java/org/apache/syncope/client/enduser/AbstractTest.java +++ b/client/idrepo/enduser/src/test/java/org/apache/syncope/client/enduser/AbstractTest.java @@ -40,7 +40,7 @@ import org.apache.syncope.client.lib.SyncopeAnonymousClient; import org.apache.syncope.client.lib.SyncopeClient; import org.apache.syncope.client.lib.SyncopeClientFactoryBean; -import org.apache.syncope.client.ui.commons.DynamicMenuRegister; +import org.apache.syncope.client.ui.commons.DynamicMenuStringResourceLoader; import org.apache.syncope.common.keymaster.client.api.DomainOps; import org.apache.syncope.common.keymaster.client.api.ServiceOps; import org.apache.syncope.common.keymaster.client.api.model.JPADomain; @@ -127,6 +127,11 @@ public ClassPathScanImplementationLookup classPathScanImplementationLookup() { lookup.load(); return lookup; } + + @Bean + public DynamicMenuStringResourceLoader dynamicMenuStringResourceLoader() { + return new DynamicMenuStringResourceLoader(); + } } public static class TestSyncopeWebApplication extends SyncopeWebApplication { @@ -136,9 +141,10 @@ public TestSyncopeWebApplication( final EnduserProperties props, final ClassPathScanImplementationLookup lookup, final ServiceOps serviceOps, - final List resources) { + final List resources, + final DynamicMenuStringResourceLoader dynamicMenuStringResourceLoader) { - super(resourceLoader, props, lookup, serviceOps, resources, new DynamicMenuRegister()); + super(resourceLoader, props, lookup, serviceOps, resources, dynamicMenuStringResourceLoader); } public interface SyncopeServiceClient extends SyncopeService, Client {