Class BaseTransformServiceImpl
- java.lang.Object
-
- com.commercetools.sync.services.impl.BaseTransformServiceImpl
-
public abstract class BaseTransformServiceImpl extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
CHUNK_SIZE
static java.lang.String
KEY_IS_NOT_SET_PLACE_HOLDER
protected ReferenceIdToKeyCache
referenceIdToKeyCache
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseTransformServiceImpl(com.commercetools.api.client.ProjectApiRoot ctpClient, ReferenceIdToKeyCache referenceIdToKeyCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<GraphQlQueryResource,java.util.Set<java.lang.String>>
buildMapOfRequestTypeToReferencedIds(java.util.Set<com.fasterxml.jackson.databind.JsonNode> references)
protected void
cacheResourceReferenceKeys(java.util.List<io.vrap.rmf.base.client.ApiHttpResponse<com.commercetools.api.models.graph_ql.GraphQLResponse>> graphQLResults)
protected void
cacheResourceReferenceKeys(java.util.List<io.vrap.rmf.base.client.ApiHttpResponse<com.commercetools.api.models.graph_ql.GraphQLResponse>> graphQLResults, GraphQlQueryResource requestType)
protected java.util.List<com.commercetools.api.models.graph_ql.GraphQLRequest>
createGraphQLRequests(java.util.List<java.util.List<java.lang.String>> chunkedIds, GraphQlQueryResource requestType)
protected java.util.concurrent.CompletableFuture<java.lang.Void>
fetchAndFillReferenceIdToKeyCache(java.util.Set<java.lang.String> ids, GraphQlQueryResource requestType)
protected com.commercetools.api.client.ProjectApiRoot
getCtpClient()
protected java.util.Set<java.lang.String>
getNonCachedReferenceIds(java.util.Set<java.lang.String> referenceIds)
protected java.util.Set<com.fasterxml.jackson.databind.JsonNode>
getNonCachedReferences(java.util.List<com.fasterxml.jackson.databind.JsonNode> references)
-
-
-
Field Detail
-
CHUNK_SIZE
public static final int CHUNK_SIZE
- See Also:
- Constant Field Values
-
KEY_IS_NOT_SET_PLACE_HOLDER
public static final java.lang.String KEY_IS_NOT_SET_PLACE_HOLDER
- See Also:
- Constant Field Values
-
referenceIdToKeyCache
protected final ReferenceIdToKeyCache referenceIdToKeyCache
-
-
Constructor Detail
-
BaseTransformServiceImpl
protected BaseTransformServiceImpl(@Nonnull com.commercetools.api.client.ProjectApiRoot ctpClient, @Nonnull ReferenceIdToKeyCache referenceIdToKeyCache)
-
-
Method Detail
-
getCtpClient
protected com.commercetools.api.client.ProjectApiRoot getCtpClient()
-
fetchAndFillReferenceIdToKeyCache
protected java.util.concurrent.CompletableFuture<java.lang.Void> fetchAndFillReferenceIdToKeyCache(@Nonnull java.util.Set<java.lang.String> ids, @Nonnull GraphQlQueryResource requestType)
-
buildMapOfRequestTypeToReferencedIds
protected java.util.Map<GraphQlQueryResource,java.util.Set<java.lang.String>> buildMapOfRequestTypeToReferencedIds(java.util.Set<com.fasterxml.jackson.databind.JsonNode> references)
-
getNonCachedReferenceIds
@Nonnull protected java.util.Set<java.lang.String> getNonCachedReferenceIds(@Nonnull java.util.Set<java.lang.String> referenceIds)
-
getNonCachedReferences
@Nonnull protected java.util.Set<com.fasterxml.jackson.databind.JsonNode> getNonCachedReferences(@Nonnull java.util.List<com.fasterxml.jackson.databind.JsonNode> references)
-
createGraphQLRequests
@Nonnull protected java.util.List<com.commercetools.api.models.graph_ql.GraphQLRequest> createGraphQLRequests(@Nonnull java.util.List<java.util.List<java.lang.String>> chunkedIds, @Nonnull GraphQlQueryResource requestType)
-
cacheResourceReferenceKeys
protected void cacheResourceReferenceKeys(@Nonnull java.util.List<io.vrap.rmf.base.client.ApiHttpResponse<com.commercetools.api.models.graph_ql.GraphQLResponse>> graphQLResults)
-
cacheResourceReferenceKeys
protected void cacheResourceReferenceKeys(@Nonnull java.util.List<io.vrap.rmf.base.client.ApiHttpResponse<com.commercetools.api.models.graph_ql.GraphQLResponse>> graphQLResults, @Nonnull GraphQlQueryResource requestType)
-
-