Search in sources :

Example 6 with IParticipantIdentifier

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

the class PDStorageManager method getAllContainedParticipantIDs.

@Nonnull
@ReturnsMutableCopy
public ICommonsSortedMap<IParticipantIdentifier, MutableInt> getAllContainedParticipantIDs(@Nonnull final EQueryMode eQueryMode) {
    // Map from ID to entity count
    final ICommonsSortedMap<IParticipantIdentifier, MutableInt> aTargetSet = new CommonsTreeMap<>();
    final Query aQuery = eQueryMode.getEffectiveQuery(new MatchAllDocsQuery());
    try {
        final ObjIntConsumer<Document> aConsumer = (aDoc, nDocID) -> {
            final IParticipantIdentifier aResolvedParticipantID = PDField.PARTICIPANT_ID.getDocValue(aDoc);
            aTargetSet.computeIfAbsent(aResolvedParticipantID, k -> new MutableInt(0)).inc();
        };
        final Collector aCollector = new AllDocumentsCollector(m_aLucene, aConsumer);
        searchAtomic(aQuery, aCollector);
    } catch (final IOException ex) {
        LOGGER.error("Error searching for documents with query " + aQuery, ex);
    }
    return aTargetSet;
}
Also used : Query(org.apache.lucene.search.Query) ScoreDoc(org.apache.lucene.search.ScoreDoc) IDocumentTypeIdentifier(com.helger.peppolid.IDocumentTypeIdentifier) FieldType(org.apache.lucene.document.FieldType) LoggerFactory(org.slf4j.LoggerFactory) CommonsTreeMap(com.helger.commons.collection.impl.CommonsTreeMap) CollectionHelper(com.helger.commons.collection.CollectionHelper) CheckForSigned(javax.annotation.CheckForSigned) PDIdentifier(com.helger.pd.businesscard.generic.PDIdentifier) Document(org.apache.lucene.document.Document) Locale(java.util.Locale) TotalHitCountCollector(org.apache.lucene.search.TotalHitCountCollector) PDField(com.helger.pd.indexer.storage.field.PDField) CGlobal(com.helger.commons.CGlobal) Occur(org.apache.lucene.search.BooleanClause.Occur) SimpleParticipantIdentifier(com.helger.peppolid.simple.participant.SimpleParticipantIdentifier) PDExtendedBusinessCard(com.helger.pd.indexer.businesscard.PDExtendedBusinessCard) IThrowingRunnable(com.helger.commons.callback.IThrowingRunnable) MatchAllDocsQuery(org.apache.lucene.search.MatchAllDocsQuery) AuditHelper(com.helger.photon.audit.AuditHelper) PDName(com.helger.pd.businesscard.generic.PDName) ICommonsList(com.helger.commons.collection.impl.ICommonsList) ICommonsMap(com.helger.commons.collection.impl.ICommonsMap) IndexSearcher(org.apache.lucene.search.IndexSearcher) PDBusinessEntity(com.helger.pd.businesscard.generic.PDBusinessEntity) ESuccess(com.helger.commons.state.ESuccess) ObjIntConsumer(java.util.function.ObjIntConsumer) Function(java.util.function.Function) IThrowingSupplier(com.helger.commons.functional.IThrowingSupplier) PDLucene(com.helger.pd.indexer.lucene.PDLucene) IPDStorageManager(com.helger.pd.indexer.mgr.IPDStorageManager) Store(org.apache.lucene.document.Field.Store) ICommonsSortedMap(com.helger.commons.collection.impl.ICommonsSortedMap) IntPoint(org.apache.lucene.document.IntPoint) AllDocumentsCollector(com.helger.pd.indexer.lucene.AllDocumentsCollector) ReturnsMutableCopy(com.helger.commons.annotation.ReturnsMutableCopy) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) TopDocs(org.apache.lucene.search.TopDocs) Logger(org.slf4j.Logger) CommonsArrayList(com.helger.commons.collection.impl.CommonsArrayList) MutableInt(com.helger.commons.mutable.MutableInt) StringHelper(com.helger.commons.string.StringHelper) PDBusinessCard(com.helger.pd.businesscard.generic.PDBusinessCard) PDTWebDateHelper(com.helger.commons.datetime.PDTWebDateHelper) IOException(java.io.IOException) Collector(org.apache.lucene.search.Collector) TopScoreDocCollector(org.apache.lucene.search.TopScoreDocCollector) ValueEnforcer(com.helger.commons.ValueEnforcer) IMutableStatisticsHandlerKeyedTimer(com.helger.commons.statistics.IMutableStatisticsHandlerKeyedTimer) Consumer(java.util.function.Consumer) StatisticsManager(com.helger.commons.statistics.StatisticsManager) TermQuery(org.apache.lucene.search.TermQuery) BooleanQuery(org.apache.lucene.search.BooleanQuery) Field(org.apache.lucene.document.Field) StopWatch(com.helger.commons.timing.StopWatch) CommonsLinkedHashMap(com.helger.commons.collection.impl.CommonsLinkedHashMap) TextField(org.apache.lucene.document.TextField) IndexOptions(org.apache.lucene.index.IndexOptions) Immutable(javax.annotation.concurrent.Immutable) PDContact(com.helger.pd.businesscard.generic.PDContact) Query(org.apache.lucene.search.Query) MatchAllDocsQuery(org.apache.lucene.search.MatchAllDocsQuery) TermQuery(org.apache.lucene.search.TermQuery) BooleanQuery(org.apache.lucene.search.BooleanQuery) MutableInt(com.helger.commons.mutable.MutableInt) TotalHitCountCollector(org.apache.lucene.search.TotalHitCountCollector) AllDocumentsCollector(com.helger.pd.indexer.lucene.AllDocumentsCollector) Collector(org.apache.lucene.search.Collector) TopScoreDocCollector(org.apache.lucene.search.TopScoreDocCollector) AllDocumentsCollector(com.helger.pd.indexer.lucene.AllDocumentsCollector) IOException(java.io.IOException) MatchAllDocsQuery(org.apache.lucene.search.MatchAllDocsQuery) Document(org.apache.lucene.document.Document) CommonsTreeMap(com.helger.commons.collection.impl.CommonsTreeMap) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) ReturnsMutableCopy(com.helger.commons.annotation.ReturnsMutableCopy) Nonnull(javax.annotation.Nonnull)

Example 7 with IParticipantIdentifier

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

the class AbstractPagePublicSearch method createParticipantDetails.

@Nonnull
protected HCNodeList createParticipantDetails(@Nonnull final Locale aDisplayLocale, @Nonnull final String sParticipantID, @Nonnull final IParticipantIdentifier aParticipantID, final boolean bIsLoggedInUserAdministrator) {
    final HCNodeList aDetails = new HCNodeList();
    // Search document matching participant ID
    final ICommonsList<PDStoredBusinessEntity> aResultDocs = PDMetaManager.getStorageMgr().getAllDocumentsOfParticipant(aParticipantID);
    // Group by participant ID
    final ICommonsMap<IParticipantIdentifier, ICommonsList<PDStoredBusinessEntity>> aGroupedDocs = PDStorageManager.getGroupedByParticipantID(aResultDocs);
    if (aGroupedDocs.isEmpty())
        LOGGER.error("No stored document matches participant identifier '" + sParticipantID + "' - cannot show details");
    else {
        if (aGroupedDocs.size() > 1)
            LOGGER.warn("Found " + aGroupedDocs.size() + " entries for participant identifier '" + sParticipantID + "' - weird");
        // Get the first one
        final ICommonsList<PDStoredBusinessEntity> aStoredEntities = aGroupedDocs.getFirstValue();
        // Details header
        {
            IHCNode aDetailsHeader = null;
            final boolean bIsPeppolDefault = aParticipantID.hasScheme(PeppolIdentifierFactory.INSTANCE.getDefaultParticipantIdentifierScheme());
            if (bIsPeppolDefault) {
                final IParticipantIdentifierScheme aIIA = ParticipantIdentifierSchemeManager.getSchemeOfIdentifier(aParticipantID);
                if (aIIA != null) {
                    final HCH1 aH1 = h1("Details for: " + aParticipantID.getValue());
                    if (StringHelper.hasText(aIIA.getSchemeAgency()))
                        aH1.addChild(small(" (" + aIIA.getSchemeAgency() + ")"));
                    aDetailsHeader = new BootstrapPageHeader().addChild(aH1);
                }
            }
            if (aDetailsHeader == null) {
                // Fallback
                aDetailsHeader = BootstrapWebPageUIHandler.INSTANCE.createPageHeader("Details for " + sParticipantID);
            }
            aDetails.addChild(aDetailsHeader);
        }
        final BootstrapTabBox aTabBox = new BootstrapTabBox();
        // Business information
        {
            final HCNodeList aOL = new HCNodeList();
            int nIndex = 1;
            for (final PDStoredBusinessEntity aStoredEntity : aStoredEntities) {
                final BootstrapCard aCard = aOL.addAndReturnChild(new BootstrapCard());
                aCard.addClass(CSS_CLASS_RESULT_PANEL);
                if (aStoredEntities.size() > 1)
                    aCard.createAndAddHeader().addChild("Business information entity " + nIndex);
                final BootstrapViewForm aViewForm = PDCommonUI.showBusinessInfoDetails(aStoredEntity, aDisplayLocale);
                aViewForm.addFormGroup(new BootstrapFormGroup().setLabel("Full Peppol participant ID").setCtrl(code(sParticipantID)));
                if (GlobalDebug.isDebugMode() || bIsLoggedInUserAdministrator) {
                    aViewForm.addChild(new HCHR());
                    aViewForm.addFormGroup(new BootstrapFormGroup().setLabel("[Debug] Creation DT").setCtrl(PDTToString.getAsString(aStoredEntity.getMetaData().getCreationDT(), aDisplayLocale)));
                    aViewForm.addFormGroup(new BootstrapFormGroup().setLabel("[Debug] Owner ID").setCtrl(code(aStoredEntity.getMetaData().getOwnerID())));
                    aViewForm.addFormGroup(new BootstrapFormGroup().setLabel("[Debug] Requesting Host").setCtrl(code(aStoredEntity.getMetaData().getRequestingHost())));
                }
                aCard.createAndAddBody().addChild(aViewForm);
                ++nIndex;
            }
            // Add whole list or just the first item?
            final IHCNode aTabLabel = span("Business information ").addChild(badgePrimary(aStoredEntities.size()));
            aTabBox.addTab("businessinfo", aTabLabel, aOL, true);
        }
        // Document types
        {
            final HCNodeList aDocTypeCtrl = new HCNodeList();
            final ICommonsList<String> aNames = new CommonsArrayList<>();
            for (final PDStoredBusinessEntity aStoredEntity : aStoredEntities) aNames.addAllMapped(aStoredEntity.names(), PDStoredMLName::getName);
            aDocTypeCtrl.addChild(info("The following document types are supported by " + _getImplodedMapped(", ", " and ", aNames, x -> "'" + x + "'") + ":"));
            HCOL aDocTypeOL = null;
            final ICommonsList<IDocumentTypeIdentifier> aDocTypeIDs = aResultDocs.getFirst().documentTypeIDs().getSorted(IDocumentTypeIdentifier.comparator());
            for (final IDocumentTypeIdentifier aDocTypeID : aDocTypeIDs) {
                if (aDocTypeOL == null)
                    aDocTypeOL = aDocTypeCtrl.addAndReturnChild(new HCOL());
                final HCLI aLI = aDocTypeOL.addItem();
                aLI.addChild(NiceNameUI.getDocumentTypeID(aDocTypeID));
            }
            if (aDocTypeOL == null)
                aDocTypeCtrl.addChild(warn("This participant does not support any document types!"));
            aTabBox.addTab("doctypes", span("Supported document types ").addChild(badgePrimary(aDocTypeIDs.size())), aDocTypeCtrl, false);
        }
        aDetails.addChild(aTabBox);
    }
    return aDetails;
}
Also used : HCH1(com.helger.html.hc.html.sections.HCH1) HCOL(com.helger.html.hc.html.grouping.HCOL) IDocumentTypeIdentifier(com.helger.peppolid.IDocumentTypeIdentifier) BootstrapWebPageUIHandler(com.helger.photon.bootstrap4.pages.BootstrapWebPageUIHandler) PDMetaManager(com.helger.pd.indexer.mgr.PDMetaManager) LoggerFactory(org.slf4j.LoggerFactory) Function(java.util.function.Function) NiceNameUI(com.helger.pd.publisher.nicename.NiceNameUI) PDCommonUI(com.helger.pd.publisher.ui.PDCommonUI) IHCNode(com.helger.html.hc.IHCNode) ParticipantIdentifierSchemeManager(com.helger.peppolid.peppol.pidscheme.ParticipantIdentifierSchemeManager) BootstrapPageHeader(com.helger.photon.bootstrap4.utils.BootstrapPageHeader) Nonempty(com.helger.commons.annotation.Nonempty) Locale(java.util.Locale) PDServerConfiguration(com.helger.pd.indexer.settings.PDServerConfiguration) IHasID(com.helger.commons.id.IHasID) EnumHelper(com.helger.commons.lang.EnumHelper) IParticipantIdentifierScheme(com.helger.peppolid.peppol.pidscheme.IParticipantIdentifierScheme) GlobalDebug(com.helger.commons.debug.GlobalDebug) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) PDTToString(com.helger.commons.datetime.PDTToString) BootstrapViewForm(com.helger.photon.bootstrap4.form.BootstrapViewForm) BootstrapTabBox(com.helger.photon.bootstrap4.nav.BootstrapTabBox) HCNodeList(com.helger.html.hc.impl.HCNodeList) PDStoredBusinessEntity(com.helger.pd.indexer.storage.PDStoredBusinessEntity) HCLI(com.helger.html.hc.html.grouping.HCLI) PDStorageManager(com.helger.pd.indexer.storage.PDStorageManager) BootstrapFormGroup(com.helger.photon.bootstrap4.form.BootstrapFormGroup) Logger(org.slf4j.Logger) CommonsArrayList(com.helger.commons.collection.impl.CommonsArrayList) PeppolIdentifierFactory(com.helger.peppolid.factory.PeppolIdentifierFactory) StringHelper(com.helger.commons.string.StringHelper) AbstractAppWebPage(com.helger.pd.publisher.ui.AbstractAppWebPage) Collection(java.util.Collection) ValueEnforcer(com.helger.commons.ValueEnforcer) BootstrapCard(com.helger.photon.bootstrap4.card.BootstrapCard) PDStoredMLName(com.helger.pd.indexer.storage.PDStoredMLName) ICommonsList(com.helger.commons.collection.impl.ICommonsList) HCHR(com.helger.html.hc.html.grouping.HCHR) ICommonsMap(com.helger.commons.collection.impl.ICommonsMap) DefaultCSSClassProvider(com.helger.html.css.DefaultCSSClassProvider) ICSSClassProvider(com.helger.html.css.ICSSClassProvider) ICommonsList(com.helger.commons.collection.impl.ICommonsList) BootstrapCard(com.helger.photon.bootstrap4.card.BootstrapCard) HCNodeList(com.helger.html.hc.impl.HCNodeList) HCHR(com.helger.html.hc.html.grouping.HCHR) HCH1(com.helger.html.hc.html.sections.HCH1) PDStoredMLName(com.helger.pd.indexer.storage.PDStoredMLName) BootstrapViewForm(com.helger.photon.bootstrap4.form.BootstrapViewForm) IDocumentTypeIdentifier(com.helger.peppolid.IDocumentTypeIdentifier) BootstrapTabBox(com.helger.photon.bootstrap4.nav.BootstrapTabBox) BootstrapPageHeader(com.helger.photon.bootstrap4.utils.BootstrapPageHeader) PDStoredBusinessEntity(com.helger.pd.indexer.storage.PDStoredBusinessEntity) IParticipantIdentifierScheme(com.helger.peppolid.peppol.pidscheme.IParticipantIdentifierScheme) HCOL(com.helger.html.hc.html.grouping.HCOL) HCLI(com.helger.html.hc.html.grouping.HCLI) BootstrapFormGroup(com.helger.photon.bootstrap4.form.BootstrapFormGroup) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) IHCNode(com.helger.html.hc.IHCNode) Nonnull(javax.annotation.Nonnull)

Example 8 with IParticipantIdentifier

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

the class PageSecureDeleteManually method fillContent.

@Override
protected void fillContent(final WebPageExecutionContext aWPEC) {
    final HCNodeList aNodeList = aWPEC.getNodeList();
    final IIdentifierFactory aIdentifierFactory = PDMetaManager.getIdentifierFactory();
    final FormErrorList aFormErrors = new FormErrorList();
    if (aWPEC.hasAction(CPageParam.ACTION_PERFORM)) {
        final String sParticipantID = aWPEC.params().getAsString(FIELD_PARTICIPANT_ID);
        final IParticipantIdentifier aParticipantID = aIdentifierFactory.parseParticipantIdentifier(sParticipantID);
        if (StringHelper.hasNoText(sParticipantID))
            aFormErrors.addFieldError(FIELD_PARTICIPANT_ID, "A participant ID must be provided.");
        else if (aParticipantID == null)
            aFormErrors.addFieldError(FIELD_PARTICIPANT_ID, "The provided participant ID is syntactically invalid.");
        if (aFormErrors.isEmpty()) {
            int nDeleted = 0;
            try {
                nDeleted = PDMetaManager.getStorageMgr().deleteEntry(aParticipantID, null, false);
            } catch (final IOException ex) {
                // ignore
                nDeleted = -1;
            }
            if (nDeleted > 0)
                aWPEC.postRedirectGetInternal(success("The participant ID '" + aParticipantID.getURIEncoded() + "' was deleted (" + nDeleted + " rows)"));
            else
                aWPEC.postRedirectGetInternal(error("Error deleting participant ID '" + aParticipantID.getURIEncoded() + "'"));
        }
    }
    final BootstrapForm aForm = aNodeList.addAndReturnChild(getUIHandler().createFormSelf(aWPEC));
    aForm.addFormGroup(new BootstrapFormGroup().setLabelMandatory("Participant ID").setCtrl(new HCEdit(new RequestField(FIELD_PARTICIPANT_ID, PeppolIdentifierHelper.DEFAULT_PARTICIPANT_SCHEME + CIdentifier.URL_SCHEME_VALUE_SEPARATOR))).setHelpText(span().addChild("Enter the fully qualified Peppol participant ID (including the scheme) you want to delete.\nExample identifier layout: ").addChild(code(aIdentifierFactory.createParticipantIdentifier(PeppolIdentifierHelper.DEFAULT_PARTICIPANT_SCHEME, "9999:test").getURIEncoded()))).setErrorList(aFormErrors.getListOfField(FIELD_PARTICIPANT_ID)));
    final BootstrapButtonToolbar aToolbar = aForm.addAndReturnChild(new BootstrapButtonToolbar(aWPEC));
    aToolbar.addHiddenField(CPageParam.PARAM_ACTION, CPageParam.ACTION_PERFORM);
    aToolbar.addSubmitButton("Delete from index", EDefaultIcon.DELETE);
}
Also used : HCNodeList(com.helger.html.hc.impl.HCNodeList) FormErrorList(com.helger.photon.core.form.FormErrorList) HCEdit(com.helger.html.hc.html.forms.HCEdit) IOException(java.io.IOException) BootstrapButtonToolbar(com.helger.photon.bootstrap4.buttongroup.BootstrapButtonToolbar) BootstrapFormGroup(com.helger.photon.bootstrap4.form.BootstrapFormGroup) IIdentifierFactory(com.helger.peppolid.factory.IIdentifierFactory) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) BootstrapForm(com.helger.photon.bootstrap4.form.BootstrapForm) RequestField(com.helger.photon.core.form.RequestField)

Example 9 with IParticipantIdentifier

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

the class IndexerResourceTest method testCreateAndDeleteParticipant.

@Test
public void testCreateAndDeleteParticipant() throws IOException {
    final AtomicInteger aIndex = new AtomicInteger(0);
    final PeppolIdentifierFactory aIF = PeppolIdentifierFactory.INSTANCE;
    // Create
    final int nCount = 4;
    CommonsTestHelper.testInParallel(nCount, () -> {
        final IParticipantIdentifier aPI = aIF.createParticipantIdentifierWithDefaultScheme("9915:test" + aIndex.getAndIncrement());
        final String sPayload = aPI.getURIPercentEncoded();
        LOGGER.info("PUT " + sPayload);
        final String sResponseMsg = m_aTarget.path("1.0").request().put(Entity.text(sPayload), String.class);
        assertEquals("", sResponseMsg);
    });
    LOGGER.info("waiting");
    ThreadHelper.sleep(2000);
    for (int i = 0; i < nCount; ++i) {
        final IParticipantIdentifier aPI = aIF.createParticipantIdentifierWithDefaultScheme("9915:test" + i);
        assertTrue(PDMetaManager.getStorageMgr().containsEntry(aPI, EQueryMode.ALL));
    }
    // Delete
    aIndex.set(0);
    CommonsTestHelper.testInParallel(nCount, () -> {
        final IParticipantIdentifier aPI = aIF.createParticipantIdentifierWithDefaultScheme("9915:test" + aIndex.getAndIncrement());
        final String sPI = aPI.getURIEncoded();
        LOGGER.info("DELETE " + sPI);
        final String sResponseMsg = m_aTarget.path("1.0").path(sPI).request().delete(String.class);
        assertEquals("", sResponseMsg);
    });
    LOGGER.info("waiting");
    ThreadHelper.sleep(2000);
    for (int i = 0; i < nCount; ++i) {
        final IParticipantIdentifier aPI = aIF.createParticipantIdentifierWithDefaultScheme("9915:test" + i);
        assertFalse(PDMetaManager.getStorageMgr().containsEntry(aPI, EQueryMode.ALL));
    }
    // Test with invalid URL encoded ID
    {
        final String sPayload = "iso6523-actorid-upis%3a%3a9915%3atest0%%%abc";
        LOGGER.info("CREATE " + sPayload);
        try {
            m_aTarget.path("1.0").request().put(Entity.text(sPayload), String.class);
            fail();
        } catch (final BadRequestException ex) {
        // Expected
        }
    }
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) BadRequestException(javax.ws.rs.BadRequestException) PeppolIdentifierFactory(com.helger.peppolid.factory.PeppolIdentifierFactory) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Test(org.junit.Test)

Example 10 with IParticipantIdentifier

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

the class IndexerResource method deleteParticipant.

@DELETE
@Path("{participantID}")
public Response deleteParticipant(@Context @Nonnull final HttpServletRequest aHttpServletRequest, @PathParam("participantID") @Nonnull final String sParticipantID) {
    final String sLogPrefix = "[deleteParticipant] ";
    final ClientCertificateValidationResult aResult = _checkClientCertificate(aHttpServletRequest, sLogPrefix);
    if (aResult.isFailure())
        return Response.status(Response.Status.FORBIDDEN).build();
    final String sRealParticipantID = _unifyPID(sParticipantID);
    if (LOGGER.isInfoEnabled())
        LOGGER.info(sLogPrefix + "'" + sRealParticipantID + "'");
    // Parse identifier
    final IIdentifierFactory aIdentifierFactory = PDMetaManager.getIdentifierFactory();
    final IParticipantIdentifier aPI = aIdentifierFactory.parseParticipantIdentifier(sRealParticipantID);
    if (aPI == null) {
        if (LOGGER.isErrorEnabled())
            LOGGER.error(sLogPrefix + "Failed to parse participant identifier '" + sRealParticipantID + "'");
        return Response.status(Status.BAD_REQUEST).build();
    }
    // Queue for handling
    if (PDMetaManager.getIndexerMgr().queueWorkItem(aPI, EIndexerWorkItemType.DELETE, aResult.getClientID(), _getRequestingHost(aHttpServletRequest)).isUnchanged()) {
        if (LOGGER.isInfoEnabled())
            LOGGER.info(sLogPrefix + "Ignoring duplicate DELETE request for '" + aPI.getURIEncoded() + "'");
    }
    // And done
    return Response.noContent().build();
}
Also used : IIdentifierFactory(com.helger.peppolid.factory.IIdentifierFactory) ClientCertificateValidationResult(com.helger.pd.indexer.clientcert.ClientCertificateValidationResult) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Path(javax.ws.rs.Path) DELETE(javax.ws.rs.DELETE)

Aggregations

IParticipantIdentifier (com.helger.peppolid.IParticipantIdentifier)218 Test (org.junit.Test)70 IDocumentTypeIdentifier (com.helger.peppolid.IDocumentTypeIdentifier)58 IIdentifierFactory (com.helger.peppolid.factory.IIdentifierFactory)57 ISMPServiceGroupManager (com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager)51 ISMPServiceGroup (com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroup)47 File (java.io.File)46 Nonnull (javax.annotation.Nonnull)43 ESimpleUserMessageSendResult (com.helger.phase4.sender.AbstractAS4UserMessageBuilder.ESimpleUserMessageSendResult)42 Element (org.w3c.dom.Element)41 SMPClientReadOnly (com.helger.smpclient.peppol.SMPClientReadOnly)40 AS4RawResponseConsumerWriteToFile (com.helger.phase4.dump.AS4RawResponseConsumerWriteToFile)38 AS4IncomingDumperFileBased (com.helger.phase4.dump.AS4IncomingDumperFileBased)35 AS4OutgoingDumperFileBased (com.helger.phase4.dump.AS4OutgoingDumperFileBased)35 SimpleParticipantIdentifier (com.helger.peppolid.simple.participant.SimpleParticipantIdentifier)30 CommonsArrayList (com.helger.commons.collection.impl.CommonsArrayList)24 ISMPServiceInformationManager (com.helger.phoss.smp.domain.serviceinfo.ISMPServiceInformationManager)24 SMPServerException (com.helger.phoss.smp.exception.SMPServerException)24 ISMPServiceInformation (com.helger.phoss.smp.domain.serviceinfo.ISMPServiceInformation)19 ICommonsList (com.helger.commons.collection.impl.ICommonsList)18