Search in sources :

Example 71 with IJsonObject

use of com.helger.json.IJsonObject in project phoss-smp by phax.

the class SMPStatusProvider method getStatusDisabledData.

@Nonnull
@ReturnsMutableCopy
public static IJsonObject getStatusDisabledData() {
    final IJsonObject aStatusData = new JsonObject();
    aStatusData.add("status.enabled", false);
    return aStatusData;
}
Also used : IJsonObject(com.helger.json.IJsonObject) IJsonObject(com.helger.json.IJsonObject) JsonObject(com.helger.json.JsonObject) ReturnsMutableCopy(com.helger.commons.annotation.ReturnsMutableCopy) Nonnull(javax.annotation.Nonnull)

Example 72 with IJsonObject

use of com.helger.json.IJsonObject in project phoss-smp by phax.

the class APIExecutorQueryGetBusinessCard method invokeAPI.

public void invokeAPI(@Nonnull final IAPIDescriptor aAPIDescriptor, @Nonnull @Nonempty final String sPath, @Nonnull final Map<String, String> aPathVariables, @Nonnull final IRequestWebScopeWithoutResponse aRequestScope, @Nonnull final UnifiedResponse aUnifiedResponse) throws Exception {
    final String sPathServiceGroupID = aPathVariables.get(SMPRestFilter.PARAM_SERVICE_GROUP_ID);
    final ISMPServerAPIDataProvider aDataProvider = new SMPRestDataProvider(aRequestScope, sPathServiceGroupID);
    // Is the remote query API disabled?
    if (SMPServerConfiguration.isRestRemoteQueryAPIDisabled()) {
        throw new SMPPreconditionFailedException("The remote query API is disabled. getRemoteBusinessCard will not be executed", aDataProvider.getCurrentURI());
    }
    final IIdentifierFactory aIF = SMPMetaManager.getIdentifierFactory();
    final ESMPAPIType eAPIType = SMPServerConfiguration.getRESTType().getAPIType();
    final IParticipantIdentifier aParticipantID = aIF.parseParticipantIdentifier(sPathServiceGroupID);
    if (aParticipantID == null) {
        throw SMPBadRequestException.failedToParseSG(sPathServiceGroupID, aDataProvider.getCurrentURI());
    }
    final SMPQueryParams aQueryParams = SMPQueryParams.create(eAPIType, aParticipantID);
    final ZonedDateTime aQueryDT = PDTFactory.getCurrentZonedDateTimeUTC();
    final StopWatch aSW = StopWatch.createdStarted();
    final String sLogPrefix = "[QueryAPI] ";
    LOGGER.info(sLogPrefix + "BusinessCard of '" + aParticipantID.getURIEncoded() + "' is queried using SMP API '" + eAPIType + "' from '" + aQueryParams.getSMPHostURI() + "'");
    IJsonObject aJson = null;
    final String sBCURL = aQueryParams.getSMPHostURI().toString() + "/businesscard/" + aParticipantID.getURIEncoded();
    LOGGER.info(sLogPrefix + "Querying BC from '" + sBCURL + "'");
    byte[] aData;
    try (HttpClientManager aHttpClientMgr = new HttpClientManager()) {
        final HttpGet aGet = new HttpGet(sBCURL);
        aData = aHttpClientMgr.execute(aGet, new ResponseHandlerByteArray());
    } catch (final Exception ex) {
        aData = null;
    }
    if (aData == null)
        LOGGER.warn(sLogPrefix + "No Business Card is available for that participant.");
    else {
        final PDBusinessCard aBC = PDBusinessCardHelper.parseBusinessCard(aData, (Charset) null);
        if (aBC == null) {
            LOGGER.error(sLogPrefix + "Failed to parse BC:\n" + new String(aData, StandardCharsets.UTF_8));
        } else {
            // Business Card found
            aJson = aBC.getAsJson();
        }
    }
    aSW.stop();
    if (aJson == null) {
        LOGGER.error(sLogPrefix + "Failed to perform the BusinessCard SMP lookup");
        aUnifiedResponse.setStatus(CHttp.HTTP_NOT_FOUND);
    } else {
        LOGGER.info(sLogPrefix + "Succesfully finished BusinessCard lookup lookup after " + aSW.getMillis() + " milliseconds");
        aJson.add("queryDateTime", DateTimeFormatter.ISO_ZONED_DATE_TIME.format(aQueryDT));
        aJson.add("queryDurationMillis", aSW.getMillis());
        final String sRet = new JsonWriter(JsonWriterSettings.DEFAULT_SETTINGS_FORMATTED).writeAsString(aJson);
        aUnifiedResponse.setContentAndCharset(sRet, StandardCharsets.UTF_8).setMimeType(CMimeType.APPLICATION_JSON).enableCaching(1 * CGlobal.SECONDS_PER_HOUR);
    }
}
Also used : PDBusinessCard(com.helger.pd.businesscard.generic.PDBusinessCard) ResponseHandlerByteArray(com.helger.httpclient.response.ResponseHandlerByteArray) HttpGet(org.apache.http.client.methods.HttpGet) JsonWriter(com.helger.json.serialize.JsonWriter) SMPBadRequestException(com.helger.phoss.smp.exception.SMPBadRequestException) SMPPreconditionFailedException(com.helger.phoss.smp.exception.SMPPreconditionFailedException) ESMPAPIType(com.helger.peppol.sml.ESMPAPIType) StopWatch(com.helger.commons.timing.StopWatch) SMPPreconditionFailedException(com.helger.phoss.smp.exception.SMPPreconditionFailedException) HttpClientManager(com.helger.httpclient.HttpClientManager) ZonedDateTime(java.time.ZonedDateTime) IJsonObject(com.helger.json.IJsonObject) ISMPServerAPIDataProvider(com.helger.phoss.smp.restapi.ISMPServerAPIDataProvider) IIdentifierFactory(com.helger.peppolid.factory.IIdentifierFactory) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier)

Example 73 with IJsonObject

use of com.helger.json.IJsonObject in project phoss-smp by phax.

the class APIExecutorQueryGetDocTypes method invokeAPI.

public void invokeAPI(@Nonnull final IAPIDescriptor aAPIDescriptor, @Nonnull @Nonempty final String sPath, @Nonnull final Map<String, String> aPathVariables, @Nonnull final IRequestWebScopeWithoutResponse aRequestScope, @Nonnull final UnifiedResponse aUnifiedResponse) throws Exception {
    final String sPathServiceGroupID = aPathVariables.get(SMPRestFilter.PARAM_SERVICE_GROUP_ID);
    final ISMPServerAPIDataProvider aDataProvider = new SMPRestDataProvider(aRequestScope, sPathServiceGroupID);
    // Is the remote query API disabled?
    if (SMPServerConfiguration.isRestRemoteQueryAPIDisabled()) {
        throw new SMPPreconditionFailedException("The remote query API is disabled. getRemoteDocTypes will not be executed", aDataProvider.getCurrentURI());
    }
    final IIdentifierFactory aIF = SMPMetaManager.getIdentifierFactory();
    final ESMPAPIType eAPIType = SMPServerConfiguration.getRESTType().getAPIType();
    final IParticipantIdentifier aParticipantID = aIF.parseParticipantIdentifier(sPathServiceGroupID);
    if (aParticipantID == null) {
        throw SMPBadRequestException.failedToParseSG(sPathServiceGroupID, aDataProvider.getCurrentURI());
    }
    final SMPQueryParams aQueryParams = SMPQueryParams.create(eAPIType, aParticipantID);
    final boolean bQueryBusinessCard = aRequestScope.params().getAsBoolean("businessCard", false);
    final boolean bXMLSchemaValidation = aRequestScope.params().getAsBoolean("xmlSchemaValidation", true);
    final ZonedDateTime aQueryDT = PDTFactory.getCurrentZonedDateTimeUTC();
    final StopWatch aSW = StopWatch.createdStarted();
    final String sLogPrefix = "[QueryAPI] ";
    LOGGER.info(sLogPrefix + "Document types of '" + aParticipantID.getURIEncoded() + "' are queried using SMP API '" + eAPIType + "' from '" + aQueryParams.getSMPHostURI() + "'; XSD validation=" + bXMLSchemaValidation);
    ICommonsSortedMap<String, String> aSGHrefs = null;
    switch(eAPIType) {
        case PEPPOL:
            {
                final SMPClientReadOnly aSMPClient = new SMPClientReadOnly(aQueryParams.getSMPHostURI());
                aSMPClient.setXMLSchemaValidation(bXMLSchemaValidation);
                // Get all HRefs and sort them by decoded URL
                final com.helger.xsds.peppol.smp1.ServiceGroupType aSG = aSMPClient.getServiceGroupOrNull(aParticipantID);
                // Map from cleaned URL to original URL
                if (aSG != null && aSG.getServiceMetadataReferenceCollection() != null) {
                    aSGHrefs = new CommonsTreeMap<>();
                    for (final com.helger.xsds.peppol.smp1.ServiceMetadataReferenceType aSMR : aSG.getServiceMetadataReferenceCollection().getServiceMetadataReference()) {
                        // Decoded href is important for unification
                        final String sHref = CIdentifier.createPercentDecoded(aSMR.getHref());
                        if (aSGHrefs.put(sHref, aSMR.getHref()) != null)
                            LOGGER.warn(sLogPrefix + "The ServiceGroup list contains the duplicate URL '" + sHref + "'");
                    }
                }
                break;
            }
        case OASIS_BDXR_V1:
            {
                aSGHrefs = new CommonsTreeMap<>();
                final BDXRClientReadOnly aBDXR1Client = new BDXRClientReadOnly(aQueryParams.getSMPHostURI());
                aBDXR1Client.setXMLSchemaValidation(bXMLSchemaValidation);
                // Get all HRefs and sort them by decoded URL
                final com.helger.xsds.bdxr.smp1.ServiceGroupType aSG = aBDXR1Client.getServiceGroupOrNull(aParticipantID);
                // Map from cleaned URL to original URL
                if (aSG != null && aSG.getServiceMetadataReferenceCollection() != null) {
                    aSGHrefs = new CommonsTreeMap<>();
                    for (final com.helger.xsds.bdxr.smp1.ServiceMetadataReferenceType aSMR : aSG.getServiceMetadataReferenceCollection().getServiceMetadataReference()) {
                        // Decoded href is important for unification
                        final String sHref = CIdentifier.createPercentDecoded(aSMR.getHref());
                        if (aSGHrefs.put(sHref, aSMR.getHref()) != null)
                            LOGGER.warn(sLogPrefix + "The ServiceGroup list contains the duplicate URL '" + sHref + "'");
                    }
                }
                break;
            }
    }
    IJsonObject aJson = null;
    if (aSGHrefs != null)
        aJson = SMPJsonResponse.convert(eAPIType, aParticipantID, aSGHrefs, aIF);
    if (bQueryBusinessCard) {
        final String sBCURL = aQueryParams.getSMPHostURI().toString() + "/businesscard/" + aParticipantID.getURIEncoded();
        LOGGER.info(sLogPrefix + "Querying BC from '" + sBCURL + "'");
        byte[] aData;
        try (HttpClientManager aHttpClientMgr = new HttpClientManager()) {
            final HttpGet aGet = new HttpGet(sBCURL);
            aData = aHttpClientMgr.execute(aGet, new ResponseHandlerByteArray());
        } catch (final Exception ex) {
            aData = null;
        }
        if (aData == null)
            LOGGER.warn(sLogPrefix + "No Business Card is available for that participant.");
        else {
            final PDBusinessCard aBC = PDBusinessCardHelper.parseBusinessCard(aData, (Charset) null);
            if (aBC == null) {
                LOGGER.error(sLogPrefix + "Failed to parse BC:\n" + new String(aData, StandardCharsets.UTF_8));
            } else {
                // Business Card found
                if (aJson == null)
                    aJson = new JsonObject();
                aJson.addJson("businessCard", aBC.getAsJson());
            }
        }
    }
    aSW.stop();
    if (aJson == null) {
        LOGGER.error(sLogPrefix + "Failed to perform the SMP lookup");
        aUnifiedResponse.setStatus(CHttp.HTTP_NOT_FOUND);
    } else {
        LOGGER.info(sLogPrefix + "Succesfully finished lookup lookup after " + aSW.getMillis() + " milliseconds");
        aJson.add("queryDateTime", DateTimeFormatter.ISO_ZONED_DATE_TIME.format(aQueryDT));
        aJson.add("queryDurationMillis", aSW.getMillis());
        final String sRet = new JsonWriter(JsonWriterSettings.DEFAULT_SETTINGS_FORMATTED).writeAsString(aJson);
        aUnifiedResponse.setContentAndCharset(sRet, StandardCharsets.UTF_8).setMimeType(CMimeType.APPLICATION_JSON).enableCaching(1 * CGlobal.SECONDS_PER_HOUR);
    }
}
Also used : SMPClientReadOnly(com.helger.smpclient.peppol.SMPClientReadOnly) PDBusinessCard(com.helger.pd.businesscard.generic.PDBusinessCard) ResponseHandlerByteArray(com.helger.httpclient.response.ResponseHandlerByteArray) HttpGet(org.apache.http.client.methods.HttpGet) IJsonObject(com.helger.json.IJsonObject) JsonObject(com.helger.json.JsonObject) HttpClientManager(com.helger.httpclient.HttpClientManager) ZonedDateTime(java.time.ZonedDateTime) IJsonObject(com.helger.json.IJsonObject) ISMPServerAPIDataProvider(com.helger.phoss.smp.restapi.ISMPServerAPIDataProvider) IIdentifierFactory(com.helger.peppolid.factory.IIdentifierFactory) BDXRClientReadOnly(com.helger.smpclient.bdxr1.BDXRClientReadOnly) JsonWriter(com.helger.json.serialize.JsonWriter) CommonsTreeMap(com.helger.commons.collection.impl.CommonsTreeMap) SMPBadRequestException(com.helger.phoss.smp.exception.SMPBadRequestException) SMPPreconditionFailedException(com.helger.phoss.smp.exception.SMPPreconditionFailedException) ESMPAPIType(com.helger.peppol.sml.ESMPAPIType) StopWatch(com.helger.commons.timing.StopWatch) SMPPreconditionFailedException(com.helger.phoss.smp.exception.SMPPreconditionFailedException) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier)

Example 74 with IJsonObject

use of com.helger.json.IJsonObject in project ph-commons by phax.

the class SettingsPersistenceJson method readSettings.

@Nonnull
public ISettings readSettings(@Nonnull @WillClose final InputStream aIS) {
    ValueEnforcer.notNull(aIS, "InputStream");
    // Create the settings object
    final ISettings aSettings = m_aSettingsFactory.apply(getReadSettingsName());
    // Read the properties file from the input stream
    final IJsonObject aProps = JsonReader.builder().source(aIS, m_aCharset).customizeCallback(aParser -> {
        aParser.setRequireStringQuotes(false);
        aParser.setAlwaysUseBigNumber(true);
    }).readAsObject();
    if (aProps != null)
        for (final Map.Entry<String, IJson> aEntry : aProps) _recursiveReadSettings(aEntry.getKey(), aEntry.getValue(), aSettings);
    return aSettings;
}
Also used : ESuccess(com.helger.commons.state.ESuccess) StreamHelper(com.helger.commons.io.stream.StreamHelper) WillClose(javax.annotation.WillClose) ISettingsPersistence(com.helger.settings.exchange.ISettingsPersistence) LoggerFactory(org.slf4j.LoggerFactory) IJsonObject(com.helger.json.IJsonObject) CollectionHelper(com.helger.commons.collection.CollectionHelper) ISettings(com.helger.settings.ISettings) JsonWriterSettings(com.helger.json.serialize.JsonWriterSettings) Charset(java.nio.charset.Charset) Nonempty(com.helger.commons.annotation.Nonempty) Map(java.util.Map) JsonReader(com.helger.json.serialize.JsonReader) Nonnull(javax.annotation.Nonnull) ISettingsFactory(com.helger.settings.factory.ISettingsFactory) OutputStream(java.io.OutputStream) Logger(org.slf4j.Logger) IOException(java.io.IOException) JsonObject(com.helger.json.JsonObject) JsonWriter(com.helger.json.serialize.JsonWriter) ValueEnforcer(com.helger.commons.ValueEnforcer) TypeConverter(com.helger.commons.typeconvert.TypeConverter) IJson(com.helger.json.IJson) Comparator(java.util.Comparator) InputStream(java.io.InputStream) IJsonObject(com.helger.json.IJsonObject) ISettings(com.helger.settings.ISettings) Nonnull(javax.annotation.Nonnull)

Example 75 with IJsonObject

use of com.helger.json.IJsonObject in project peppol-practical by phax.

the class APISMPQueryGetDocTypes method rateLimitedInvokeAPI.

@Override
protected void rateLimitedInvokeAPI(@Nonnull final IAPIDescriptor aAPIDescriptor, @Nonnull @Nonempty final String sPath, @Nonnull final Map<String, String> aPathVariables, @Nonnull final IRequestWebScopeWithoutResponse aRequestScope, @Nonnull final UnifiedResponse aUnifiedResponse) throws Exception {
    final ISMLConfigurationManager aSMLConfigurationMgr = PPMetaManager.getSMLConfigurationMgr();
    final String sSMLID = aPathVariables.get(PPAPI.PARAM_SML_ID);
    final boolean bSMLAutoDetect = ISMLConfigurationManager.ID_AUTO_DETECT.equals(sSMLID);
    ISMLConfiguration aSML = aSMLConfigurationMgr.getSMLInfoOfID(sSMLID);
    if (aSML == null && !bSMLAutoDetect)
        throw new APIParamException("Unsupported SML ID '" + sSMLID + "' provided.");
    final String sParticipantID = aPathVariables.get(PPAPI.PARAM_PARTICIPANT_ID);
    final IParticipantIdentifier aPID = SimpleIdentifierFactory.INSTANCE.parseParticipantIdentifier(sParticipantID);
    if (aPID == null)
        throw new APIParamException("Invalid participant ID '" + sParticipantID + "' provided.");
    final boolean bQueryBusinessCard = aRequestScope.params().getAsBoolean("businessCard", false);
    final boolean bXMLSchemaValidation = aRequestScope.params().getAsBoolean("xmlSchemaValidation", true);
    final boolean bVerifySignature = aRequestScope.params().getAsBoolean("verifySignature", true);
    final ZonedDateTime aQueryDT = PDTFactory.getCurrentZonedDateTimeUTC();
    final StopWatch aSW = StopWatch.createdStarted();
    SMPQueryParams aQueryParams = null;
    if (bSMLAutoDetect) {
        for (final ISMLConfiguration aCurSML : aSMLConfigurationMgr.getAllSorted()) {
            aQueryParams = SMPQueryParams.createForSML(aCurSML, aPID.getScheme(), aPID.getValue(), false);
            if (aQueryParams == null)
                continue;
            try {
                InetAddress.getByName(aQueryParams.getSMPHostURI().getHost());
                // Found it
                aSML = aCurSML;
                break;
            } catch (final UnknownHostException ex) {
            // continue
            }
        }
        // Ensure to go into the exception handler
        if (aSML == null)
            throw new HttpResponseException(CHttp.HTTP_NOT_FOUND, "The participant identifier '" + sParticipantID + "' could not be found in any SML.");
    } else {
        aQueryParams = SMPQueryParams.createForSML(aSML, aPID.getScheme(), aPID.getValue(), true);
    }
    if (aQueryParams == null)
        throw new APIParamException("Failed to resolve participant ID '" + sParticipantID + "' for the provided SML '" + aSML.getID() + "'");
    final IParticipantIdentifier aParticipantID = aQueryParams.getParticipantID();
    LOGGER.info("[API] Document types of '" + aParticipantID.getURIEncoded() + "' are queried using SMP API '" + aQueryParams.getSMPAPIType() + "' from '" + aQueryParams.getSMPHostURI() + "' using SML '" + aSML.getID() + "'; XSD validation=" + bXMLSchemaValidation + "; signature verification=" + bVerifySignature);
    ICommonsSortedMap<String, String> aSGHrefs = null;
    switch(aQueryParams.getSMPAPIType()) {
        case PEPPOL:
            {
                final SMPClientReadOnly aSMPClient = new SMPClientReadOnly(aQueryParams.getSMPHostURI());
                aSMPClient.setXMLSchemaValidation(bXMLSchemaValidation);
                aSMPClient.setVerifySignature(bVerifySignature);
                // Get all HRefs and sort them by decoded URL
                final com.helger.xsds.peppol.smp1.ServiceGroupType aSG = aSMPClient.getServiceGroupOrNull(aParticipantID);
                // Map from cleaned URL to original URL
                if (aSG != null && aSG.getServiceMetadataReferenceCollection() != null) {
                    aSGHrefs = new CommonsTreeMap<>();
                    for (final com.helger.xsds.peppol.smp1.ServiceMetadataReferenceType aSMR : aSG.getServiceMetadataReferenceCollection().getServiceMetadataReference()) {
                        // Decoded href is important for unification
                        final String sHref = CIdentifier.createPercentDecoded(aSMR.getHref());
                        if (aSGHrefs.put(sHref, aSMR.getHref()) != null)
                            LOGGER.warn("[API] The ServiceGroup list contains the duplicate URL '" + sHref + "'");
                    }
                }
                break;
            }
        case OASIS_BDXR_V1:
            {
                aSGHrefs = new CommonsTreeMap<>();
                final BDXRClientReadOnly aBDXR1Client = new BDXRClientReadOnly(aQueryParams.getSMPHostURI());
                aBDXR1Client.setXMLSchemaValidation(bXMLSchemaValidation);
                aBDXR1Client.setVerifySignature(bVerifySignature);
                // Get all HRefs and sort them by decoded URL
                final com.helger.xsds.bdxr.smp1.ServiceGroupType aSG = aBDXR1Client.getServiceGroupOrNull(aParticipantID);
                // Map from cleaned URL to original URL
                if (aSG != null && aSG.getServiceMetadataReferenceCollection() != null) {
                    aSGHrefs = new CommonsTreeMap<>();
                    for (final com.helger.xsds.bdxr.smp1.ServiceMetadataReferenceType aSMR : aSG.getServiceMetadataReferenceCollection().getServiceMetadataReference()) {
                        // Decoded href is important for unification
                        final String sHref = CIdentifier.createPercentDecoded(aSMR.getHref());
                        if (aSGHrefs.put(sHref, aSMR.getHref()) != null)
                            LOGGER.warn("[API] The ServiceGroup list contains the duplicate URL '" + sHref + "'");
                    }
                }
                break;
            }
    }
    IJsonObject aJson = null;
    if (aSGHrefs != null)
        aJson = SMPJsonResponseExt.convert(aQueryParams.getSMPAPIType(), aParticipantID, aSGHrefs, aQueryParams.getIF());
    if (bQueryBusinessCard) {
        final String sBCURL = aQueryParams.getSMPHostURI().toString() + "/businesscard/" + aParticipantID.getURIEncoded();
        LOGGER.info("[API] Querying BC from '" + sBCURL + "'");
        byte[] aData;
        try (HttpClientManager aHttpClientMgr = new HttpClientManager()) {
            final HttpGet aGet = new HttpGet(sBCURL);
            aData = aHttpClientMgr.execute(aGet, new ResponseHandlerByteArray());
        } catch (final Exception ex) {
            aData = null;
        }
        if (aData == null)
            LOGGER.warn("[API] No Business Card is available for that participant.");
        else {
            final PDBusinessCard aBC = PDBusinessCardHelper.parseBusinessCard(aData, StandardCharsets.UTF_8);
            if (aBC == null) {
                LOGGER.error("[API] Failed to parse BC:\n" + new String(aData));
            } else {
                // Business Card found
                if (aJson == null)
                    aJson = new JsonObject();
                aJson.addJson("businessCard", aBC.getAsJson());
            }
        }
    }
    aSW.stop();
    if (aJson == null) {
        LOGGER.error("[API] Failed to perform the SMP lookup");
        aUnifiedResponse.setStatus(CHttp.HTTP_NOT_FOUND);
    } else {
        LOGGER.info("[API] Succesfully finished lookup lookup after " + aSW.getMillis() + " milliseconds");
        aJson.add("queryDateTime", DateTimeFormatter.ISO_ZONED_DATE_TIME.format(aQueryDT));
        aJson.add("queryDurationMillis", aSW.getMillis());
        final String sRet = new JsonWriter(JsonWriterSettings.DEFAULT_SETTINGS_FORMATTED).writeAsString(aJson);
        aUnifiedResponse.setContentAndCharset(sRet, StandardCharsets.UTF_8).setMimeType(CMimeType.APPLICATION_JSON).enableCaching(3 * CGlobal.SECONDS_PER_HOUR);
    }
}
Also used : SMPClientReadOnly(com.helger.smpclient.peppol.SMPClientReadOnly) PDBusinessCard(com.helger.pd.businesscard.generic.PDBusinessCard) ResponseHandlerByteArray(com.helger.httpclient.response.ResponseHandlerByteArray) HttpGet(org.apache.http.client.methods.HttpGet) ISMLConfiguration(com.helger.peppol.domain.ISMLConfiguration) IJsonObject(com.helger.json.IJsonObject) JsonObject(com.helger.json.JsonObject) HttpResponseException(org.apache.http.client.HttpResponseException) ISMLConfigurationManager(com.helger.peppol.app.mgr.ISMLConfigurationManager) HttpClientManager(com.helger.httpclient.HttpClientManager) ZonedDateTime(java.time.ZonedDateTime) IJsonObject(com.helger.json.IJsonObject) UnknownHostException(java.net.UnknownHostException) BDXRClientReadOnly(com.helger.smpclient.bdxr1.BDXRClientReadOnly) JsonWriter(com.helger.json.serialize.JsonWriter) CommonsTreeMap(com.helger.commons.collection.impl.CommonsTreeMap) HttpResponseException(org.apache.http.client.HttpResponseException) UnknownHostException(java.net.UnknownHostException) StopWatch(com.helger.commons.timing.StopWatch) SMPQueryParams(com.helger.peppol.domain.SMPQueryParams) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier)

Aggregations

IJsonObject (com.helger.json.IJsonObject)79 JsonObject (com.helger.json.JsonObject)44 Nonnull (javax.annotation.Nonnull)41 IJsonArray (com.helger.json.IJsonArray)22 JsonArray (com.helger.json.JsonArray)19 Test (org.junit.Test)15 JsonWriter (com.helger.json.serialize.JsonWriter)12 IJson (com.helger.json.IJson)10 Map (java.util.Map)10 StopWatch (com.helger.commons.timing.StopWatch)9 IParticipantIdentifier (com.helger.peppolid.IParticipantIdentifier)9 ZonedDateTime (java.time.ZonedDateTime)9 CommonsArrayList (com.helger.commons.collection.impl.CommonsArrayList)7 IError (com.helger.commons.error.IError)7 PDBusinessCard (com.helger.pd.businesscard.generic.PDBusinessCard)5 IDocumentTypeIdentifier (com.helger.peppolid.IDocumentTypeIdentifier)5 Nullable (javax.annotation.Nullable)5 Nonempty (com.helger.commons.annotation.Nonempty)4 ReturnsMutableCopy (com.helger.commons.annotation.ReturnsMutableCopy)3 CommonsLinkedHashMap (com.helger.commons.collection.impl.CommonsLinkedHashMap)3