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 Details

    • BulkIdResolver

      public BulkIdResolver()
  • Method Details

    • 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 resolved
      resourceId - 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 resource
      operationUriInfo - the uri information of the currently accessed resource-type
      resourceString - 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