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 com.unboundid.scim2.common.ScimResource>
Tcreate(String endpoint, T resource)
Create the provided new SCIM resource at the service provider.void
delete(String endpoint, String id)
Delete a SCIM resource at the service provider.<T extends com.unboundid.scim2.common.ScimResource>
voiddelete(T resource)
Delete a SCIM resource at the service provider.com.unboundid.scim2.common.types.ResourceTypeResource
getResourceType(String name)
Retrieve a known resource type supported by the service provider.com.unboundid.scim2.common.messages.ListResponse<com.unboundid.scim2.common.types.ResourceTypeResource>
getResourceTypes()
Retrieve the resource types supported by the service provider.com.unboundid.scim2.common.types.SchemaResource
getSchema(String id)
Retrieve a known schema supported by the service provider.com.unboundid.scim2.common.messages.ListResponse<com.unboundid.scim2.common.types.SchemaResource>
getSchemas()
Retrieve the schemas supported by the service provider.com.unboundid.scim2.common.types.ServiceProviderConfigResource
getServiceProviderConfig()
Retrieve the service provider configuration.<T extends com.unboundid.scim2.common.ScimResource>
Tmodify(String endpoint, String id, com.unboundid.scim2.common.messages.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 com.unboundid.scim2.common.ScimResource>
Tmodify(T resource, com.unboundid.scim2.common.messages.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 com.unboundid.scim2.common.ScimResource>
Treplace(T resource)
Modify a SCIM resource by replacing the resource's attributes at the service provider.<T extends com.unboundid.scim2.common.ScimResource>
Tretrieve(String endpoint, String id, Class<T> cls)
Retrieve a known SCIM resource from the service provider.<T extends com.unboundid.scim2.common.ScimResource>
Tretrieve(T resource)
Retrieve a known SCIM resource from the service provider.<T extends com.unboundid.scim2.common.ScimResource>
com.unboundid.scim2.common.messages.ListResponse<T>search(String endpoint, String filter, Class<T> clazz)
Search for SCIM resources matching the SCIM filter provided.
-
-
-
Method Detail
-
getServiceProviderConfig
com.unboundid.scim2.common.types.ServiceProviderConfigResource getServiceProviderConfig() throws com.unboundid.scim2.common.exceptions.ScimException
Retrieve the service provider configuration.- Returns:
- the service provider configuration.
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurs.
-
getResourceTypes
com.unboundid.scim2.common.messages.ListResponse<com.unboundid.scim2.common.types.ResourceTypeResource> getResourceTypes() throws com.unboundid.scim2.common.exceptions.ScimException
Retrieve the resource types supported by the service provider.- Returns:
- The list of resource types supported by the service provider.
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurs.
-
getResourceType
com.unboundid.scim2.common.types.ResourceTypeResource getResourceType(String name) throws com.unboundid.scim2.common.exceptions.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:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurs.
-
getSchemas
com.unboundid.scim2.common.messages.ListResponse<com.unboundid.scim2.common.types.SchemaResource> getSchemas() throws com.unboundid.scim2.common.exceptions.ScimException
Retrieve the schemas supported by the service provider.- Returns:
- The list of schemas supported by the service provider.
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurs.
-
getSchema
com.unboundid.scim2.common.types.SchemaResource getSchema(String id) throws com.unboundid.scim2.common.exceptions.ScimException
Retrieve a known schema supported by the service provider.- Parameters:
id
- The schema URN.- Returns:
- The resource type with the provided URN.
- Throws:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurs.
-
create
<T extends com.unboundid.scim2.common.ScimResource> T create(String endpoint, T resource) throws com.unboundid.scim2.common.exceptions.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:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurs.
-
retrieve
<T extends com.unboundid.scim2.common.ScimResource> T retrieve(String endpoint, String id, Class<T> cls) throws com.unboundid.scim2.common.exceptions.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:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurs.
-
retrieve
<T extends com.unboundid.scim2.common.ScimResource> T retrieve(T resource) throws com.unboundid.scim2.common.exceptions.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:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurs.
-
replace
<T extends com.unboundid.scim2.common.ScimResource> T replace(T resource) throws com.unboundid.scim2.common.exceptions.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:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurs.
-
modify
<T extends com.unboundid.scim2.common.ScimResource> T modify(String endpoint, String id, com.unboundid.scim2.common.messages.PatchRequest patchRequest, Class<T> clazz) throws com.unboundid.scim2.common.exceptions.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 maybe 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:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurs.
-
modify
<T extends com.unboundid.scim2.common.ScimResource> T modify(T resource, com.unboundid.scim2.common.messages.PatchRequest patchRequest) throws com.unboundid.scim2.common.exceptions.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 maybe 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:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurs.
-
delete
void delete(String endpoint, String id) throws com.unboundid.scim2.common.exceptions.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:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurs.
-
delete
<T extends com.unboundid.scim2.common.ScimResource> void delete(T resource) throws com.unboundid.scim2.common.exceptions.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:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurs.
-
search
<T extends com.unboundid.scim2.common.ScimResource> com.unboundid.scim2.common.messages.ListResponse<T> search(String endpoint, String filter, Class<T> clazz) throws com.unboundid.scim2.common.exceptions.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:
com.unboundid.scim2.common.exceptions.ScimException
- if an error occurs.
-
-