Class BulkIdResolver
- java.lang.Object
-
- de.captaingoldfish.scim.sdk.server.endpoints.bulkid.BulkIdResolver
-
public class BulkIdResolver extends Object
author Pascal Knueppel
created at: 21.08.2022 - 09:24
this class is used to resolve the bulkIds of different resources of a bulk request and to detect circular references
-
-
Constructor Summary
Constructors Constructor Description BulkIdResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddResolvedBulkId(String bulkId, String resourceId)will replace the bulkId references of all registered operations that do match the given bulkId with the given valueBulkIdResolverAbstractcreateNewBulkIdResolver(String operationBulkId, UriInfos operationUriInfo, String resourceString)analyzes the given resource for bulkId references and stores them and will also resolve them immediately if already possibleOptional<BulkIdResolverAbstract>getBulkIdResolver(String bulkId)gets an already created bulkId resolver for the given bulkId if presentbooleanisDuplicateBulkId(String bulkId)checks if the given bulkId was already resolved.booleanisOpenBulkIdReferences()
-
-
-
Method Detail
-
addResolvedBulkId
public void addResolvedBulkId(String bulkId, String resourceId)
will replace the bulkId references of all registered operations that do match the given bulkId with the given value- Parameters:
bulkId- the bulkId references that should be resolvedresourceId- the value that will replace the bulkId references
-
getBulkIdResolver
public Optional<BulkIdResolverAbstract> getBulkIdResolver(String bulkId)
gets an already created bulkId resolver for the given bulkId if present
-
createNewBulkIdResolver
public BulkIdResolverAbstract createNewBulkIdResolver(String operationBulkId, UriInfos operationUriInfo, String resourceString)
analyzes the given resource for bulkId references and stores them and will also resolve them immediately if already possible- Parameters:
operationBulkId- the bulkId of the bulk operation that represents the given resourceoperationUriInfo- the uri information of the currently accessed resource-typeresourceString- the resource itself
-
isOpenBulkIdReferences
public boolean isOpenBulkIdReferences()
- Returns:
- if there are still some bulkId references that are yet to be resolved
-
isDuplicateBulkId
public boolean isDuplicateBulkId(String bulkId)
checks if the given bulkId was already resolved. If this happens two operations from the bulk-request share the same bulkId
-
-