Package com.unboundid.scim2.client
Interface ScimInterface
-
- All Known Implementing Classes:
ScimService
public interface ScimInterface
Interface providing a way to create, retrieve, update and delete SCIM resources.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends ScimResource>
Tcreate(String endpoint, T resource)Create the provided new SCIM resource at the service provider.voiddelete(String endpoint, String id)Delete a SCIM resource at the service provider.<T extends ScimResource>
voiddelete(T resource)Delete a SCIM resource at the service provider.ResourceTypeResourcegetResourceType(String name)Retrieve a known resource type supported by the service provider.ListResponse<ResourceTypeResource>getResourceTypes()Retrieve the resource types supported by the service provider.SchemaResourcegetSchema(String id)Retrieve a known schema supported by the service provider.ListResponse<SchemaResource>getSchemas()Retrieve the schemas supported by the service provider.ServiceProviderConfigResourcegetServiceProviderConfig()Retrieve the service provider configuration.<T extends ScimResource>
Tmodify(String endpoint, String id, PatchRequest patchRequest, Class<T> clazz)Modify a SCIM resource by updating one or more attributes using a sequence of operations to "add", "remove", or "replace" values.<T extends ScimResource>
Tmodify(T resource, PatchRequest patchRequest)Modify a SCIM resource by updating one or more attributes using a sequence of operations to "add", "remove", or "replace" values.<T extends ScimResource>
Treplace(T resource)Modify a SCIM resource by replacing the resource's attributes at the service provider.<T extends ScimResource>
Tretrieve(String endpoint, String id, Class<T> cls)Retrieve a known SCIM resource from the service provider.<T extends ScimResource>
Tretrieve(T resource)Retrieve a known SCIM resource from the service provider.<T extends ScimResource>
ListResponse<T>search(String endpoint, String filter, Class<T> clazz)Search for SCIM resources matching the SCIM filter provided.
-
-
-
Method Detail
-
getServiceProviderConfig
@NotNull ServiceProviderConfigResource getServiceProviderConfig() throws ScimException
Retrieve the service provider configuration.- Returns:
- the service provider configuration.
- Throws:
ScimException- if an error occurs.
-
getResourceTypes
@NotNull ListResponse<ResourceTypeResource> getResourceTypes() throws ScimException
Retrieve the resource types supported by the service provider.- Returns:
- The list of resource types supported by the service provider.
- Throws:
ScimException- if an error occurs.
-
getResourceType
@NotNull ResourceTypeResource getResourceType(@NotNull String name) throws ScimException
Retrieve a known resource type supported by the service provider.- Parameters:
name- The name of the resource type.- Returns:
- The resource type with the provided name.
- Throws:
ScimException- if an error occurs.
-
getSchemas
@NotNull ListResponse<SchemaResource> getSchemas() throws ScimException
Retrieve the schemas supported by the service provider.- Returns:
- The list of schemas supported by the service provider.
- Throws:
ScimException- if an error occurs.
-
getSchema
@NotNull SchemaResource getSchema(@NotNull String id) throws ScimException
Retrieve a known schema supported by the service provider.- Parameters:
id- The schema URN.- Returns:
- The resource type with the provided URN.
- Throws:
ScimException- if an error occurs.
-
create
@NotNull <T extends ScimResource> T create(@NotNull String endpoint, @NotNull T resource) throws ScimException
Create the provided new SCIM resource at the service provider.- Type Parameters:
T- The Java type of the resource.- Parameters:
endpoint- The resource endpoint such as: "Users" or "Groups" as defined by the associated resource type.resource- The new resource to create.- Returns:
- The successfully create SCIM resource.
- Throws:
ScimException- if an error occurs.
-
retrieve
@NotNull <T extends ScimResource> T retrieve(@NotNull String endpoint, @NotNull String id, @NotNull Class<T> cls) throws ScimException
Retrieve a known SCIM resource from the service provider.- Type Parameters:
T- The Java type of the resource.- Parameters:
endpoint- The resource endpoint such as: "Users" or "Groups" as defined by the associated resource type.id- The resource identifier (for example the value of the "id" attribute).cls- The Java class object used to determine the type to return.- Returns:
- The successfully retrieved SCIM resource.
- Throws:
ScimException- if an error occurs.
-
retrieve
@NotNull <T extends ScimResource> T retrieve(@NotNull T resource) throws ScimException
Retrieve a known SCIM resource from the service provider. If the service provider supports resource versioning and the resource has not been modified, the provided resource will be returned.- Type Parameters:
T- The Java type of the resource.- Parameters:
resource- The resource to retrieve.- Returns:
- The successfully retrieved SCIM resource.
- Throws:
ScimException- if an error occurs.
-
replace
@NotNull <T extends ScimResource> T replace(@NotNull T resource) throws ScimException
Modify a SCIM resource by replacing the resource's attributes at the service provider. If the service provider supports resource versioning, the resource will only be modified if it has not been modified since it was retrieved.- Type Parameters:
T- The Java type of the resource.- Parameters:
resource- The previously retrieved and revised resource.- Returns:
- The successfully replaced SCIM resource.
- Throws:
ScimException- if an error occurs.
-
modify
@NotNull <T extends ScimResource> T modify(@NotNull String endpoint, @NotNull String id, @NotNull PatchRequest patchRequest, @NotNull Class<T> clazz) throws ScimException
Modify a SCIM resource by updating one or more attributes using a sequence of operations to "add", "remove", or "replace" values. The service provider configuration may be used to discover service provider support for PATCH.- Type Parameters:
T- The Java type of the resource.- Parameters:
endpoint- The resource endpoint such as: "Users" or "Groups" as defined by the associated resource type.id- The resource identifier (for example the value of the "id" attribute).patchRequest- The patch request to use for the update.clazz- The class of the SCIM resource.- Returns:
- The modified resource.
- Throws:
ScimException- if an error occurs.
-
modify
@NotNull <T extends ScimResource> T modify(@NotNull T resource, @NotNull PatchRequest patchRequest) throws ScimException
Modify a SCIM resource by updating one or more attributes using a sequence of operations to "add", "remove", or "replace" values. The service provider configuration may be used to discover service provider support for PATCH.- Type Parameters:
T- The Java type of the resource.- Parameters:
resource- The resource to modify.patchRequest- the patch request to use for the update.- Returns:
- The modified resource.
- Throws:
ScimException- if an error occurs.
-
delete
void delete(@NotNull String endpoint, @NotNull String id) throws ScimException
Delete a SCIM resource at the service provider.- Parameters:
endpoint- The resource endpoint such as: "Users" or "Groups" as defined by the associated resource type.id- The resource identifier (for example the value of the "id" attribute).- Throws:
ScimException- if an error occurs.
-
delete
<T extends ScimResource> void delete(@NotNull T resource) throws ScimException
Delete a SCIM resource at the service provider.- Type Parameters:
T- The Java type of the resource.- Parameters:
resource- The resource to delete.- Throws:
ScimException- if an error occurs.
-
search
@NotNull <T extends ScimResource> ListResponse<T> search(@NotNull String endpoint, @Nullable String filter, @NotNull Class<T> clazz) throws ScimException
Search for SCIM resources matching the SCIM filter provided.- Type Parameters:
T- The SCIM resource type to return a list of.- Parameters:
endpoint- a SCIM resource type endpoint.filter- a SCIM filter string.clazz- the class representing the type of the SCIM resource.- Returns:
- a List of ScimResource objects matching the provided filter.
- Throws:
ScimException- if an error occurs.
-
-