Class BulkIdResolverAbstract<T extends com.fasterxml.jackson.databind.JsonNode>
java.lang.Object
de.captaingoldfish.scim.sdk.server.endpoints.bulkid.BulkIdResolverAbstract<T>
public abstract class BulkIdResolverAbstract<T extends com.fasterxml.jackson.databind.JsonNode>
extends Object
author Pascal Knueppel
created at: 21.08.2022 - 13:47
created at: 21.08.2022 - 13:47
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<String,List<BulkIdReferenceWrapper>> contains all bulkId reference of theresource.protected final Stringthe bulkId that is representing this bulk operation detailscontains all referenced bulkIds from this operation.protected final Tthe resource object that might contain some bulkId referencesprotected final UriInfosthe uri information of the currently accessed resource-type -
Constructor Summary
ConstructorsConstructorDescriptionBulkIdResolverAbstract(String operationBulkId, UriInfos uriInfos, T resource) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckForBulkIdReferenceValidity(String bulkIdReferenceValue) protected final booleancontainsBulkIdReference(com.fasterxml.jackson.databind.JsonNode jsonNode) verifies if the given node does even contain a bulkIdprotected voidthis method will retrieve all bulkId references present within theresourceobjectprotected abstract List<BulkIdReferenceWrapper>this method must return the bulkId references from the resource that are based on the complex-node bulkId specificationprotected abstract List<BulkIdReferenceWrapper>this method must return the bulkId references from the resource that are based on the simple-node bulkId specificationthe bulkId that is representing this bulk operation detailscontains all referenced bulkIds from this operation.the resource object that might contain some bulkId references<R extends ScimObjectNode>
RgetResource(Class<R> type) the uri information of the currently accessed resource-typefinal booleanfinal booleanchecks if this operation contains a self-referencebooleana bulk operation may be processed several times if bulkIds need to be resolved.final voidreplaceBulkIdNode(String bulkId, String value) will replace the values marked with the given bulkId by the given value
-
Field Details
-
operationBulkId
the bulkId that is representing this bulk operation details -
uriInfos
the uri information of the currently accessed resource-type -
resource
the resource object that might contain some bulkId references -
referencedBulkIds
contains all referenced bulkIds from this operation. Resolved elements will be removed from this set -
bulkIdReferences
contains all bulkId reference of theresource. Since it might be possible that a bulkId reference is used to reference the same resource in different places we use this map for linking these entries from bulkId to found entries. Resolved elements will be removed from this map
-
-
Constructor Details
-
BulkIdResolverAbstract
-
-
Method Details
-
findAllBulkIdReferences
protected void findAllBulkIdReferences()this method will retrieve all bulkId references present within theresourceobject -
getComplexBulkIdNodes
this method must return the bulkId references from the resource that are based on the complex-node bulkId specification- Returns:
- the bulkId references that were found within the resource
-
getDirectBulkIdNodes
this method must return the bulkId references from the resource that are based on the simple-node bulkId specification- Returns:
- the bulkId references that were found within the resource
-
replaceBulkIdNode
will replace the values marked with the given bulkId by the given value- Parameters:
bulkId- the bulkId that should be replacedvalue- the value that should replace the bulkId reference
-
hasAnyBulkIdReferences
public final boolean hasAnyBulkIdReferences()- Returns:
- if any bulkId references have been found
-
getUnresolvedBulkIds
- Returns:
- the bulkIds that have not been resolved yet
-
hasSelfReference
public final boolean hasSelfReference()checks if this operation contains a self-reference -
containsBulkIdReference
protected final boolean containsBulkIdReference(com.fasterxml.jackson.databind.JsonNode jsonNode) verifies if the given node does even contain a bulkId -
checkForBulkIdReferenceValidity
-
getResource
-
getOperationBulkId
the bulkId that is representing this bulk operation details -
getUriInfos
the uri information of the currently accessed resource-type -
getResource
the resource object that might contain some bulkId references -
getReferencedBulkIds
contains all referenced bulkIds from this operation. Resolved elements will be removed from this set -
isHadSuccessInLastRun
public boolean isHadSuccessInLastRun()a bulk operation may be processed several times if bulkIds need to be resolved. In order to find unresolvable bulkIds we need to investigate each operation and must try to resolve the contained bulkIds. If an operation will be processed the second third or fourth time it must have set this boolean set to true otherwise we will assume that this operation contains an unresolvable bulkId.
-