Search in sources :

Example 51 with IParticipantIdentifier

use of com.helger.peppolid.IParticipantIdentifier in project phoss-smp by phax.

the class PageSecureServiceGroupMigrationInbound method validateAndSaveInputParameters.

@Override
protected void validateAndSaveInputParameters(@Nonnull final WebPageExecutionContext aWPEC, @Nullable final ISMPParticipantMigration aSelectedObject, @Nonnull final FormErrorList aFormErrors, @Nonnull final EWebPageFormAction eFormAction) {
    final ISMPServiceGroupManager aServiceGroupMgr = SMPMetaManager.getServiceGroupMgr();
    final IIdentifierFactory aIdentifierFactory = SMPMetaManager.getIdentifierFactory();
    final ISMPSettings aSettings = SMPMetaManager.getSettings();
    final ISMPParticipantMigrationManager aParticipantMigrationMgr = SMPMetaManager.getParticipantMigrationMgr();
    final String sMigrationKey = aWPEC.params().getAsStringTrimmed(FIELD_MIGRATION_KEY);
    final String sParticipantIDScheme = aWPEC.params().getAsStringTrimmed(FIELD_PARTICIPANT_ID_SCHEME);
    final String sParticipantIDValue = aWPEC.params().getAsStringTrimmed(FIELD_PARTICIPANT_ID_VALUE);
    IParticipantIdentifier aParticipantID = null;
    final String sOwningUserID = aWPEC.params().getAsStringTrimmed(FIELD_OWNING_USER_ID);
    final IUser aOwningUser = PhotonSecurityManager.getUserMgr().getUserOfID(sOwningUserID);
    final String sExtension = aWPEC.params().getAsStringTrimmed(FIELD_EXTENSION);
    // validations
    if (StringHelper.hasNoText(sMigrationKey))
        aFormErrors.addFieldError(FIELD_MIGRATION_KEY, "The migration key must not be empty!");
    else if (!SMPParticipantMigration.isValidMigrationKey(sMigrationKey))
        aFormErrors.addFieldError(FIELD_MIGRATION_KEY, "The migration key is not valid. Please verify the received code is correct.");
    if (aIdentifierFactory.isParticipantIdentifierSchemeMandatory() && StringHelper.hasNoText(sParticipantIDScheme))
        aFormErrors.addFieldError(FIELD_PARTICIPANT_ID_SCHEME, "Participant ID scheme must not be empty!");
    else if (StringHelper.hasNoText(sParticipantIDValue))
        aFormErrors.addFieldError(FIELD_PARTICIPANT_ID_VALUE, "Participant ID value must not be empty!");
    else {
        aParticipantID = aIdentifierFactory.createParticipantIdentifier(sParticipantIDScheme, sParticipantIDValue);
        if (aParticipantID == null)
            aFormErrors.addFieldError(FIELD_PARTICIPANT_ID_VALUE, "The provided participant ID has an invalid syntax!");
        else if (aServiceGroupMgr.getSMPServiceGroupOfID(aParticipantID) != null)
            aFormErrors.addFieldError(FIELD_PARTICIPANT_ID_VALUE, "Another service group for the same participant ID is already present (may be case insensitive)!");
    }
    if (StringHelper.hasNoText(sOwningUserID))
        aFormErrors.addFieldError(FIELD_OWNING_USER_ID, "Owning User must not be empty!");
    else if (aOwningUser == null)
        aFormErrors.addFieldError(FIELD_OWNING_USER_ID, "Provided owning user does not exist!");
    if (StringHelper.hasText(sExtension)) {
        final IMicroDocument aDoc = MicroReader.readMicroXML(sExtension);
        if (aDoc == null)
            aFormErrors.addFieldError(FIELD_EXTENSION, "The extension must be XML content.");
    }
    final HCNodeList aRedirectNotes = new HCNodeList();
    if (aFormErrors.isEmpty()) {
        // create the Service Group locally
        try {
            final ManageParticipantIdentifierServiceCaller aCaller = new ManageParticipantIdentifierServiceCaller(aSettings.getSMLInfo());
            aCaller.setSSLSocketFactory(SMPKeyManager.getInstance().createSSLContext().getSocketFactory());
            // SML call
            aCaller.migrate(aParticipantID, sMigrationKey, SMPServerConfiguration.getSMLSMPID());
            LOGGER.info("Successfully migrated '" + aParticipantID.getURIEncoded() + "' in the SML to this SMP using migration key '" + sMigrationKey + "'");
            aRedirectNotes.addChild(success("Successfully migrated '" + aParticipantID.getURIEncoded() + "' in SML to this SMP using migration key ").addChild(code(sMigrationKey)));
        } catch (final Exception ex) {
            LOGGER.error("Error invoking migrate on SML", ex);
            // Use a global field error here, to avoid that users must enter the
            // values over and over in case of error
            aFormErrors.add(SingleError.builderError().errorText("Failed to confirm the migration for participant '" + aParticipantID.getURIEncoded() + "' in SML, hence the migration failed." + " Please check the participant identifier and the migration key.\n" + BootstrapTechnicalUI.getTechnicalDetailsString(ex, CSMPServer.DEFAULT_LOCALE)).build());
            if (false)
                aWPEC.postRedirectGetInternal(error("Failed to confirm the migration for participant '" + aParticipantID.getURIEncoded() + "' in SML, hence the migration failed." + " Please check the participant identifier and the migration key.").addChild(SMPCommonUI.getTechnicalDetailsUI(ex)));
        }
    }
    if (aFormErrors.isEmpty()) {
        // Now create the service group locally (it was already checked that the
        // PID is available on this SMP)
        ISMPServiceGroup aSG = null;
        Exception aCaughtEx = null;
        try {
            // Do NOT create in SMK/SML
            aSG = aServiceGroupMgr.createSMPServiceGroup(aOwningUser.getID(), aParticipantID, sExtension, false);
        } catch (final Exception ex) {
            aCaughtEx = ex;
        }
        if (aSG != null) {
            aRedirectNotes.addChild(success("The new SMP Service Group for participant '" + aParticipantID.getURIEncoded() + "' was successfully created."));
        } else {
            aRedirectNotes.addChild(error("Error creating the new SMP Service Group for participant '" + aParticipantID.getURIEncoded() + "'.").addChild(SMPCommonUI.getTechnicalDetailsUI(aCaughtEx)));
        }
        // Remember internally
        if (aParticipantMigrationMgr.createInboundParticipantMigration(aParticipantID, sMigrationKey) != null) {
            aRedirectNotes.addChild(success().addChild(div("The participant migration for '" + aParticipantID.getURIEncoded() + "' with migration key ").addChild(code(sMigrationKey)).addChild(" was successfully performed.")).addChild(div("Please inform the source SMP that the migration was successful.")));
        } else {
            aRedirectNotes.addChild(error("Failed to store the participant migration for '" + aParticipantID.getURIEncoded() + "'."));
        }
        aWPEC.postRedirectGetInternal(aRedirectNotes);
    }
}
Also used : ISMPServiceGroupManager(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager) HCNodeList(com.helger.html.hc.impl.HCNodeList) ISMPSettings(com.helger.phoss.smp.settings.ISMPSettings) ISMPServiceGroup(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroup) IUser(com.helger.photon.security.user.IUser) ISMPParticipantMigrationManager(com.helger.phoss.smp.domain.pmigration.ISMPParticipantMigrationManager) PDTToString(com.helger.commons.datetime.PDTToString) IMicroDocument(com.helger.xml.microdom.IMicroDocument) IIdentifierFactory(com.helger.peppolid.factory.IIdentifierFactory) ManageParticipantIdentifierServiceCaller(com.helger.peppol.smlclient.ManageParticipantIdentifierServiceCaller) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier)

Example 52 with IParticipantIdentifier

use of com.helger.peppolid.IParticipantIdentifier in project phoss-smp by phax.

the class PageSecureRedirect method isActionAllowed.

@Override
protected boolean isActionAllowed(@Nonnull final WebPageExecutionContext aWPEC, @Nonnull final EWebPageFormAction eFormAction, @Nullable final ISMPRedirect aSelectedObject) {
    if (eFormAction == EWebPageFormAction.VIEW || eFormAction == EWebPageFormAction.COPY || eFormAction == EWebPageFormAction.EDIT || eFormAction == EWebPageFormAction.DELETE) {
        final IIdentifierFactory aIdentifierFactory = SMPMetaManager.getIdentifierFactory();
        final String sServiceGroupID = aWPEC.params().getAsString(FIELD_SERVICE_GROUP_ID);
        final IParticipantIdentifier aServiceGroupID = aIdentifierFactory.parseParticipantIdentifier(sServiceGroupID);
        final ISMPServiceGroup aServiceGroup = SMPMetaManager.getServiceGroupMgr().getSMPServiceGroupOfID(aServiceGroupID);
        if (aServiceGroup != null) {
            final String sDocTypeID = aWPEC.params().getAsString(FIELD_DOCTYPE_ID);
            final IDocumentTypeIdentifier aDocTypeID = aIdentifierFactory.parseDocumentTypeIdentifier(sDocTypeID);
            if (aDocTypeID != null) {
                aWPEC.getRequestScope().attrs().putIn(ATTR_SERVICE_GROUP, aServiceGroup);
                aWPEC.getRequestScope().attrs().putIn(ATTR_DOCTYPE_ID, aDocTypeID);
                return true;
            }
        }
        return false;
    }
    return super.isActionAllowed(aWPEC, eFormAction, aSelectedObject);
}
Also used : ISMPServiceGroup(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroup) IDocumentTypeIdentifier(com.helger.peppolid.IDocumentTypeIdentifier) IIdentifierFactory(com.helger.peppolid.factory.IIdentifierFactory) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier)

Example 53 with IParticipantIdentifier

use of com.helger.peppolid.IParticipantIdentifier in project phoss-smp by phax.

the class PageSecureRedirect method getSelectedObject.

@Override
@Nullable
protected ISMPRedirect getSelectedObject(@Nonnull final WebPageExecutionContext aWPEC, @Nullable final String sID) {
    final IIdentifierFactory aIdentifierFactory = SMPMetaManager.getIdentifierFactory();
    final String sServiceGroupID = aWPEC.params().getAsString(FIELD_SERVICE_GROUP_ID);
    final IParticipantIdentifier aServiceGroupID = aIdentifierFactory.parseParticipantIdentifier(sServiceGroupID);
    final ISMPServiceGroup aServiceGroup = SMPMetaManager.getServiceGroupMgr().getSMPServiceGroupOfID(aServiceGroupID);
    if (aServiceGroup != null) {
        final String sDocTypeID = aWPEC.params().getAsString(FIELD_DOCTYPE_ID);
        final IDocumentTypeIdentifier aDocTypeID = aIdentifierFactory.parseDocumentTypeIdentifier(sDocTypeID);
        if (aDocTypeID != null) {
            final ISMPRedirectManager aRedirectMgr = SMPMetaManager.getRedirectMgr();
            return aRedirectMgr.getSMPRedirectOfServiceGroupAndDocumentType(aServiceGroup, aDocTypeID);
        }
    }
    return null;
}
Also used : ISMPRedirectManager(com.helger.phoss.smp.domain.redirect.ISMPRedirectManager) ISMPServiceGroup(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroup) IDocumentTypeIdentifier(com.helger.peppolid.IDocumentTypeIdentifier) IIdentifierFactory(com.helger.peppolid.factory.IIdentifierFactory) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Nullable(javax.annotation.Nullable)

Example 54 with IParticipantIdentifier

use of com.helger.peppolid.IParticipantIdentifier in project phoss-smp by phax.

the class PageSecureServiceGroupMigrationOutbound method showInputForm.

@Override
protected void showInputForm(@Nonnull final WebPageExecutionContext aWPEC, @Nullable final ISMPParticipantMigration aSelectedObject, @Nonnull final BootstrapForm aForm, final boolean bIsFormSubmitted, @Nonnull final EWebPageFormAction eFormAction, @Nonnull final FormErrorList aFormErrors) {
    final Locale aDisplayLocale = aWPEC.getDisplayLocale();
    final ISMPParticipantMigrationManager aParticipantMigrationMgr = SMPMetaManager.getParticipantMigrationMgr();
    // State is filtered below
    final ICommonsList<ISMPParticipantMigration> aExistingOutgoingMigrations = aParticipantMigrationMgr.getAllOutboundParticipantMigrations(null);
    // Get all participant identifiers for which NO new migration can be
    // initiated (because they were already migrated or migration is currently
    // in progress)
    final ICommonsSet<IParticipantIdentifier> aPIDsThatCannotBeUsed = new CommonsHashSet<>();
    aPIDsThatCannotBeUsed.addAllMapped(aExistingOutgoingMigrations, x -> x.getState().preventsNewMigration(), ISMPParticipantMigration::getParticipantIdentifier);
    // Filter out all for which it makes no sense
    final HCServiceGroupSelect aSGSelect = new HCServiceGroupSelect(new RequestField(FIELD_PARTICIPANT_ID), aDisplayLocale, x -> aPIDsThatCannotBeUsed.containsNone(y -> x.getParticipantIdentifier().hasSameContent(y)));
    if (!aSGSelect.containsAnyServiceGroup()) {
        aForm.addChild(warn("No Service Group on this SMP can currently be migrated."));
    } else {
        aForm.addChild(getUIHandler().createActionHeader("Start a Participant Migration from this SMP to another SMP"));
        aForm.addFormGroup(new BootstrapFormGroup().setLabelMandatory("Service Group").setCtrl(aSGSelect).setHelpText("Select the Service Group to migrate to another SMP. Each Service Group can only be migrated once from this SMP. Only Service Groups registered to the SML can be migrated.").setErrorList(aFormErrors.getListOfField(FIELD_PARTICIPANT_ID)));
    }
}
Also used : Locale(java.util.Locale) HCOL(com.helger.html.hc.html.grouping.HCOL) WebPageExecutionContext(com.helger.photon.uicore.page.WebPageExecutionContext) EDefaultIcon(com.helger.photon.uicore.icon.EDefaultIcon) ISMPSettings(com.helger.phoss.smp.settings.ISMPSettings) LoggerFactory(org.slf4j.LoggerFactory) BootstrapButtonToolbar(com.helger.photon.bootstrap4.buttongroup.BootstrapButtonToolbar) AbstractBootstrapWebPageActionHandlerDelete(com.helger.photon.bootstrap4.pages.handler.AbstractBootstrapWebPageActionHandlerDelete) FormErrorList(com.helger.photon.core.form.FormErrorList) BootstrapForm(com.helger.photon.bootstrap4.form.BootstrapForm) IIdentifierFactory(com.helger.peppolid.factory.IIdentifierFactory) ICommonsIterable(com.helger.commons.collection.impl.ICommonsIterable) HCServiceGroupSelect(com.helger.phoss.smp.ui.secure.hc.HCServiceGroupSelect) Nonempty(com.helger.commons.annotation.Nonempty) BootstrapDataTables(com.helger.photon.bootstrap4.uictrls.datatables.BootstrapDataTables) Locale(java.util.Locale) HCA(com.helger.html.hc.html.textlevel.HCA) BootstrapDTColAction(com.helger.photon.bootstrap4.uictrls.datatables.BootstrapDTColAction) CPageParam(com.helger.photon.uicore.css.CPageParam) ISMPParticipantMigrationManager(com.helger.phoss.smp.domain.pmigration.ISMPParticipantMigrationManager) SMPCommonUI(com.helger.phoss.smp.ui.SMPCommonUI) PDTToString(com.helger.commons.datetime.PDTToString) BootstrapViewForm(com.helger.photon.bootstrap4.form.BootstrapViewForm) BootstrapTabBox(com.helger.photon.bootstrap4.nav.BootstrapTabBox) IHCCell(com.helger.html.hc.html.tabular.IHCCell) EWebPageFormAction(com.helger.photon.uicore.page.EWebPageFormAction) BootstrapButton(com.helger.photon.bootstrap4.button.BootstrapButton) ICommonsList(com.helger.commons.collection.impl.ICommonsList) DTCol(com.helger.photon.uictrls.datatables.column.DTCol) ISMPServiceGroupManager(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager) ManageParticipantIdentifierServiceCaller(com.helger.peppol.smlclient.ManageParticipantIdentifierServiceCaller) ICommonsSet(com.helger.commons.collection.impl.ICommonsSet) DataTables(com.helger.photon.uictrls.datatables.DataTables) HCRow(com.helger.html.hc.html.tabular.HCRow) EValidity(com.helger.commons.state.EValidity) AbstractSMPWebPageForm(com.helger.phoss.smp.ui.AbstractSMPWebPageForm) IHCNode(com.helger.html.hc.IHCNode) EParticipantMigrationState(com.helger.phoss.smp.domain.pmigration.EParticipantMigrationState) SMPKeyManager(com.helger.phoss.smp.security.SMPKeyManager) EDTColType(com.helger.photon.uictrls.datatables.column.EDTColType) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) ISimpleURL(com.helger.commons.url.ISimpleURL) HCNodeList(com.helger.html.hc.impl.HCNodeList) BootstrapWarnBox(com.helger.photon.bootstrap4.alert.BootstrapWarnBox) BootstrapFormGroup(com.helger.photon.bootstrap4.form.BootstrapFormGroup) Logger(org.slf4j.Logger) StringHelper(com.helger.commons.string.StringHelper) ISMPParticipantMigration(com.helger.phoss.smp.domain.pmigration.ISMPParticipantMigration) HCTable(com.helger.html.hc.html.tabular.HCTable) SMPMetaManager(com.helger.phoss.smp.domain.SMPMetaManager) RequestField(com.helger.photon.core.form.RequestField) CommonsHashSet(com.helger.commons.collection.impl.CommonsHashSet) SMPServerConfiguration(com.helger.phoss.smp.SMPServerConfiguration) ESortOrder(com.helger.commons.compare.ESortOrder) AbstractBootstrapWebPageActionHandlerWithQuery(com.helger.photon.bootstrap4.pages.handler.AbstractBootstrapWebPageActionHandlerWithQuery) ISMPParticipantMigration(com.helger.phoss.smp.domain.pmigration.ISMPParticipantMigration) HCServiceGroupSelect(com.helger.phoss.smp.ui.secure.hc.HCServiceGroupSelect) ISMPParticipantMigrationManager(com.helger.phoss.smp.domain.pmigration.ISMPParticipantMigrationManager) BootstrapFormGroup(com.helger.photon.bootstrap4.form.BootstrapFormGroup) CommonsHashSet(com.helger.commons.collection.impl.CommonsHashSet) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) RequestField(com.helger.photon.core.form.RequestField)

Example 55 with IParticipantIdentifier

use of com.helger.peppolid.IParticipantIdentifier in project phoss-smp by phax.

the class ISMPBusinessCardManagerFuncTest method testBusinessCard.

@Test
public void testBusinessCard() throws SMPServerException {
    final ISMPBusinessCardManager aBusinessCardMgr = SMPMetaManager.getBusinessCardMgr();
    final String sUserID = CSecurity.USER_ADMINISTRATOR_ID;
    if (SMPMetaManager.getInstance().getBackendConnectionState().isFalse()) {
        // Failed to get DB connection. E.g. MySQL down or misconfigured.
        return;
    }
    final SMPBusinessCardEntity aEntity1 = new SMPBusinessCardEntity();
    aEntity1.names().add(new SMPBusinessCardName("Test entity", null));
    aEntity1.setCountryCode("AT");
    final SMPBusinessCardEntity aEntity2 = new SMPBusinessCardEntity();
    aEntity2.names().add(new SMPBusinessCardName("Test entity2", null));
    aEntity2.setCountryCode("AT");
    aEntity2.setGeographicalInformation("Address here");
    aEntity2.identifiers().add(new SMPBusinessCardIdentifier("gln", "1234567890123"));
    aEntity2.websiteURIs().add("https://www.peppol-directory.org/fake");
    aEntity2.contacts().add(new SMPBusinessCardContact("support", "Unit test support", null, "support@peppol.eu"));
    aEntity2.setAdditionalInformation("Bla foo fasel");
    aEntity2.setRegistrationDate(PDTFactory.getCurrentLocalDate());
    final SMPBusinessCardEntity aEntity3 = new SMPBusinessCardEntity();
    aEntity3.names().add(new SMPBusinessCardName("Test entity3", null));
    aEntity3.setCountryCode("AT");
    aEntity3.setAdditionalInformation("Entity 3");
    final IParticipantIdentifier aPI1 = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme("9999:junittest1");
    final IParticipantIdentifier aPI2 = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme("9999:junittest2");
    final ISMPServiceGroupManager aSGMgr = SMPMetaManager.getServiceGroupMgr();
    final ISMPServiceGroup aSG = aSGMgr.createSMPServiceGroup(sUserID, aPI1, null, true);
    assertNotNull(aSG);
    ISMPBusinessCard aBusinessCard = null;
    try {
        final long nBCCount = aBusinessCardMgr.getSMPBusinessCardCount();
        // Create new one
        aBusinessCard = aBusinessCardMgr.createOrUpdateSMPBusinessCard(aPI1, new CommonsArrayList<>(aEntity1));
        assertEquals(aPI1, aBusinessCard.getParticipantIdentifier());
        assertEquals(1, aBusinessCard.getEntityCount());
        assertEquals(nBCCount + 1, aBusinessCardMgr.getSMPBusinessCardCount());
        assertEquals(aBusinessCard, aBusinessCardMgr.getSMPBusinessCardOfServiceGroup(aSG));
        assertEquals(aBusinessCard, aBusinessCardMgr.getSMPBusinessCardOfID(aSG.getParticipantIdentifier()));
        // Update existing
        aBusinessCard = aBusinessCardMgr.createOrUpdateSMPBusinessCard(aPI1, new CommonsArrayList<>(aEntity1, aEntity2));
        assertEquals(aPI1, aBusinessCard.getParticipantIdentifier());
        assertEquals(2, aBusinessCard.getEntityCount());
        // Must not have changed
        assertEquals(nBCCount + 1, aBusinessCardMgr.getSMPBusinessCardCount());
        assertEquals(aBusinessCard, aBusinessCardMgr.getSMPBusinessCardOfServiceGroup(aSG));
        assertEquals(aBusinessCard, aBusinessCardMgr.getSMPBusinessCardOfID(aSG.getParticipantIdentifier()));
        // Add second one
        final ISMPServiceGroup aSG2 = aSGMgr.createSMPServiceGroup(sUserID, aPI2, null, true);
        assertNotNull(aSG2);
        ISMPBusinessCard aBusinessCard2 = null;
        try {
            aBusinessCard2 = aBusinessCardMgr.createOrUpdateSMPBusinessCard(aPI2, new CommonsArrayList<>(aEntity3));
            assertEquals(aPI2, aBusinessCard2.getParticipantIdentifier());
            assertEquals(1, aBusinessCard2.getEntityCount());
            assertEquals(nBCCount + 2, aBusinessCardMgr.getSMPBusinessCardCount());
            assertEquals(aBusinessCard2, aBusinessCardMgr.getSMPBusinessCardOfServiceGroup(aSG2));
            assertEquals(aBusinessCard2, aBusinessCardMgr.getSMPBusinessCardOfID(aSG2.getParticipantIdentifier()));
            // Cleanup
            assertTrue(aBusinessCardMgr.deleteSMPBusinessCard(aBusinessCard2).isChanged());
            assertEquals(nBCCount + 1, aBusinessCardMgr.getSMPBusinessCardCount());
            assertTrue(aBusinessCardMgr.deleteSMPBusinessCard(aBusinessCard).isChanged());
            assertEquals(nBCCount + 0, aBusinessCardMgr.getSMPBusinessCardCount());
            assertTrue(aSGMgr.deleteSMPServiceGroupNoEx(aPI2, true).isChanged());
            assertTrue(aSGMgr.deleteSMPServiceGroupNoEx(aPI1, true).isChanged());
        } finally {
            // Real cleanup
            aBusinessCardMgr.deleteSMPBusinessCard(aBusinessCard2);
            aSGMgr.deleteSMPServiceGroupNoEx(aPI2, true);
        }
    } finally {
        // Real cleanup
        aBusinessCardMgr.deleteSMPBusinessCard(aBusinessCard);
        aSGMgr.deleteSMPServiceGroupNoEx(aPI1, true);
    }
}
Also used : ISMPServiceGroupManager(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager) ISMPServiceGroup(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroup) CommonsArrayList(com.helger.commons.collection.impl.CommonsArrayList) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Test(org.junit.Test)

Aggregations

IParticipantIdentifier (com.helger.peppolid.IParticipantIdentifier)227 Test (org.junit.Test)70 IDocumentTypeIdentifier (com.helger.peppolid.IDocumentTypeIdentifier)63 IIdentifierFactory (com.helger.peppolid.factory.IIdentifierFactory)59 ISMPServiceGroupManager (com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager)51 Nonnull (javax.annotation.Nonnull)49 ISMPServiceGroup (com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroup)47 File (java.io.File)47 SMPClientReadOnly (com.helger.smpclient.peppol.SMPClientReadOnly)44 ESimpleUserMessageSendResult (com.helger.phase4.sender.AbstractAS4UserMessageBuilder.ESimpleUserMessageSendResult)43 Element (org.w3c.dom.Element)42 AS4RawResponseConsumerWriteToFile (com.helger.phase4.dump.AS4RawResponseConsumerWriteToFile)38 AS4IncomingDumperFileBased (com.helger.phase4.dump.AS4IncomingDumperFileBased)36 AS4OutgoingDumperFileBased (com.helger.phase4.dump.AS4OutgoingDumperFileBased)36 SimpleParticipantIdentifier (com.helger.peppolid.simple.participant.SimpleParticipantIdentifier)31 CommonsArrayList (com.helger.commons.collection.impl.CommonsArrayList)27 ISMPServiceInformationManager (com.helger.phoss.smp.domain.serviceinfo.ISMPServiceInformationManager)24 SMPServerException (com.helger.phoss.smp.exception.SMPServerException)24 ICommonsList (com.helger.commons.collection.impl.ICommonsList)21 ISMPServiceInformation (com.helger.phoss.smp.domain.serviceinfo.ISMPServiceInformation)19