diff --git a/phoss-smp-webapp/src/main/java/com/helger/phoss/smp/ui/secure/AbstractPageSecureEndpoint.java b/phoss-smp-webapp/src/main/java/com/helger/phoss/smp/ui/secure/AbstractPageSecureEndpoint.java index f3525bca..ae121b37 100644 --- a/phoss-smp-webapp/src/main/java/com/helger/phoss/smp/ui/secure/AbstractPageSecureEndpoint.java +++ b/phoss-smp-webapp/src/main/java/com/helger/phoss/smp/ui/secure/AbstractPageSecureEndpoint.java @@ -420,7 +420,7 @@ protected void showSelectedObject (@Nonnull final WebPageExecutionContext aWPEC, aForm.addFormGroup (new BootstrapFormGroup ().setLabel ("Service Group") .setCtrl (new HCA (createViewURL (aWPEC, CMenuSecure.MENU_SERVICE_GROUPS, - aSelectedObject.getServiceGroup ())).addChild (aSelectedObject.getServiceGroupID ()))); + aSelectedObject.getServiceGroupID ())).addChild (aSelectedObject.getServiceGroupID ()))); // Document type identifier { diff --git a/phoss-smp-webapp/src/main/java/com/helger/phoss/smp/ui/secure/PageSecureEndpointTree.java b/phoss-smp-webapp/src/main/java/com/helger/phoss/smp/ui/secure/PageSecureEndpointTree.java index 24b3f326..2a83c616 100644 --- a/phoss-smp-webapp/src/main/java/com/helger/phoss/smp/ui/secure/PageSecureEndpointTree.java +++ b/phoss-smp-webapp/src/main/java/com/helger/phoss/smp/ui/secure/PageSecureEndpointTree.java @@ -16,6 +16,8 @@ */ package com.helger.phoss.smp.ui.secure; +import java.util.Comparator; + import javax.annotation.Nonnull; import com.helger.commons.annotation.Nonempty; @@ -35,8 +37,8 @@ import com.helger.html.hc.impl.HCTextNode; import com.helger.peppolid.IDocumentTypeIdentifier; import com.helger.peppolid.IParticipantIdentifier; +import com.helger.peppolid.factory.IIdentifierFactory; import com.helger.phoss.smp.domain.SMPMetaManager; -import com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroup; import com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager; import com.helger.phoss.smp.domain.serviceinfo.ISMPEndpoint; import com.helger.phoss.smp.domain.serviceinfo.ISMPProcess; @@ -71,6 +73,7 @@ protected void showListOfExistingObjects (@Nonnull final WebPageExecutionContext final HCNodeList aNodeList = aWPEC.getNodeList (); final ISMPServiceGroupManager aServiceGroupMgr = SMPMetaManager.getServiceGroupMgr (); final ISMPServiceInformationManager aServiceInfoMgr = SMPMetaManager.getServiceInformationMgr (); + final IIdentifierFactory aIdentifierFactory = SMPMetaManager.getIdentifierFactory (); final BootstrapButtonToolbar aToolbar = new BootstrapButtonToolbar (aWPEC); aToolbar.addButton ("Create new Endpoint", createCreateURL (aWPEC), EDefaultIcon.NEW); @@ -79,23 +82,23 @@ protected void showListOfExistingObjects (@Nonnull final WebPageExecutionContext aNodeList.addChild (aToolbar); // Create list of service groups - final ICommonsMap > aMap = new CommonsHashMap <> (); - aServiceInfoMgr.forEachSMPServiceInformation (x -> aMap.computeIfAbsent (x.getServiceGroup (), + final ICommonsMap > aMap = new CommonsHashMap <> (); + aServiceInfoMgr.forEachSMPServiceInformation (x -> aMap.computeIfAbsent (x.getServiceGroupID (), k -> new CommonsArrayList <> ()).add (x)); final HCUL aULSG = new HCUL (); - final ICommonsList aServiceGroups = aServiceGroupMgr.getAllSMPServiceGroups () - .getSortedInline (ISMPServiceGroup.comparator ()); - for (final ISMPServiceGroup aServiceGroup : aServiceGroups) + final ICommonsList aServiceGroupIDs = aServiceGroupMgr.getAllSMPServiceGroupIDs () + .getSorted (Comparator.naturalOrder ()); + for (final String sServiceGroupID : aServiceGroupIDs) { // Print service group - final IParticipantIdentifier aParticipantID = aServiceGroup.getParticipantIdentifier (); + final IParticipantIdentifier aParticipantID = aIdentifierFactory.parseParticipantIdentifier (sServiceGroupID); final HCLI aLISG = aULSG.addAndReturnItem (new HCA (createViewURL (aWPEC, CMenuSecure.MENU_SERVICE_GROUPS, - aServiceGroup)).addChild (aParticipantID.getURIEncoded ())); + sServiceGroupID)).addChild (sServiceGroupID)); final HCUL aULDT = new HCUL (); - final ICommonsList aServiceInfos = aMap.get (aServiceGroup); + final ICommonsList aServiceInfos = aMap.get (sServiceGroupID); if (aServiceInfos != null) { for (final ISMPServiceInformation aServiceInfo : aServiceInfos.getSortedInline (ISMPServiceInformation.comparator ()))