Class ScimRequestBuilder

  • All Implemented Interfaces:
    AutoCloseable

    public class ScimRequestBuilder
    extends Object
    implements AutoCloseable
    author Pascal Knueppel
    created at: 07.12.2019 - 23:08

    this class can be used to build any type of request for SCIM
    • Constructor Detail

    • Method Detail

      • create

        public <T extends ResourceNodeCreateBuilder<T> create​(Class<T> type,
                                                                String endpoint)
        builds a create builder class based on the given type
        Parameters:
        type - the type that should be created
        endpoint - the endpoint path to the resource e.g. "/Users" or "/Groups"
        Returns:
        a create-request builder for the given resource type
      • get

        public <T extends ResourceNodeGetBuilder<T> get​(Class<T> type,
                                                          String endpoint,
                                                          String resourceId)
        builds a get builder class based on the given type
        Parameters:
        type - the type that should be created
        endpoint - the endpoint path to the resource e.g. "/Users" or "/Groups"
        resourceId - the id of the resource that should be returned (may be null if the endpoint path already contains the id)
        Returns:
        a get-request builder for the given resource type
      • delete

        public <T extends ResourceNodeDeleteBuilder<T> delete​(Class<T> type,
                                                                String endpoint,
                                                                String resourceId)
        builds a delete builder class based on the given type
        Parameters:
        type - the type that should be created
        endpoint - the endpoint path to the resource e.g. "/Users" or "/Groups"
        resourceId - the id of the resource that should be returned (may be null if the endpoint path already contains the id)
        Returns:
        a delete-request builder for the given resource type
      • update

        public <T extends ResourceNodeUpdateBuilder<T> update​(Class<T> type,
                                                                String endpoint,
                                                                String resourceId)
        builds an update builder class based on the given type
        Parameters:
        type - the type that should be created
        endpoint - the endpoint path to the resource e.g. "/Users" or "/Groups"
        resourceId - the id of the resource that should be returned (may be null if the endpoint path already contains the id)
        Returns:
        a update-request builder for the given resource type
      • list

        public <T extends ResourceNodeListBuilder<T> list​(Class<T> type,
                                                            String endpoint)
        builds an update builder class based on the given type
        Parameters:
        type - the type that should be created
        endpoint - the endpoint path to the resource e.g. "/Users" or "/Groups"
        Returns:
        a update-request builder for the given resource type
      • bulk

        public BulkBuilder bulk()
        builds an bulk request builder
        Returns:
        a bulk-request builder
      • patch

        public <T extends ResourceNodePatchBuilder<T> patch​(Class<T> type,
                                                              String endpoint,
                                                              String resourceId)
        builds a patch request builder
        Parameters:
        type - the type that should be created
        endpoint - the endpoint path to the resource e.g. "/Users" or "/Groups"
        resourceId - the id of the resource that should be returned (may be null if the endpoint path already contains the id)
        Returns:
        a patch-request builder
      • close

        public void close()
        closes the underlying apache http client. If the http client is closed this request builder is still usable. The next request will simply be executed with a new http client instance
        Specified by:
        close in interface AutoCloseable