public class ScimService extends Object implements ScimInterface
| Modifier and Type | Field and Description |
|---|---|
static URI |
ME_URI
The authenticated subject alias.
|
static javax.ws.rs.core.MediaType |
MEDIA_TYPE_SCIM_TYPE
The SCIM media type.
|
| Constructor and Description |
|---|
ScimService(javax.ws.rs.client.WebTarget baseTarget)
Create a new client instance to the SCIM 2 service provider at the
provided WebTarget.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends ScimResource> |
create(String endpoint,
T resource)
Create the provided new SCIM resource at the service provider.
|
<T extends ScimResource> |
createRequest(String endpoint,
T resource)
Build a request to 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 ScimResource> |
delete(T resource)
Delete a SCIM resource at the service provider.
|
void |
delete(URI url)
Delete a SCIM resource at the service provider.
|
DeleteRequestBuilder |
deleteRequest(String endpoint,
String id)
Build a request to delete a SCIM resource at the service provider.
|
<T extends ScimResource> |
deleteRequest(T resource)
Build a request to delete a SCIM resource at the service provider.
|
DeleteRequestBuilder |
deleteRequest(URI url)
Build a request to delete a SCIM resource at the service provider.
|
ResourceTypeResource |
getResourceType(String name)
Retrieve a known resource type supported by the service provider.
|
ListResponse<ResourceTypeResource> |
getResourceTypes()
Retrieve the resource types supported by the service provider.
|
SchemaResource |
getSchema(String id)
Retrieve a known schema supported by the service provider.
|
ListResponse<SchemaResource> |
getSchemas()
Retrieve the schemas supported by the service provider.
|
ServiceProviderConfigResource |
getServiceProviderConfig()
Retrieve the service provider configuration.
|
<T extends ScimResource> |
modify(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> |
modify(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. |
ModifyRequestBuilder.Typed |
modifyRequest(String endpoint,
String id)
Modify a SCIM resource by updating one or more attributes using a sequence
of operations to "
add", "remove", or "replace" values. |
<T extends ScimResource> |
modifyRequest(T resource)
Modify a SCIM resource by updating one or more attributes using a sequence
of operations to "
add", "remove", or "replace" values. |
ModifyRequestBuilder.Typed |
modifyRequest(URI url)
Modify a SCIM resource by updating one or more attributes using a sequence
of operations to "
add", "remove", or "replace" values. |
<T extends ScimResource> |
replace(T resource)
Modify a SCIM resource by replacing the resource's attributes at the
service provider.
|
<T extends ScimResource> |
replaceRequest(T resource)
Build a request to modify a SCIM resource by replacing the resource's
attributes at the service provider.
|
<T extends ScimResource> |
replaceRequest(URI uri,
T resource)
Build a request to modify a SCIM resource by replacing the resource's
attributes at the service provider.
|
<T extends ScimResource> |
retrieve(String endpoint,
String id,
Class<T> cls)
Retrieve a known SCIM resource from the service provider.
|
<T extends ScimResource> |
retrieve(T resource)
Retrieve a known SCIM resource from the service provider.
|
<T extends ScimResource> |
retrieve(URI url,
Class<T> cls)
Retrieve a known SCIM resource from the service provider.
|
RetrieveRequestBuilder.Typed |
retrieveRequest(String endpoint,
String id)
Build a request to retrieve a known SCIM resource from the service
provider.
|
<T extends ScimResource> |
retrieveRequest(T resource)
Build a request to retrieve a known SCIM resource from the service
provider.
|
RetrieveRequestBuilder.Typed |
retrieveRequest(URI url)
Build a request to retrieve a known SCIM resource from the service
provider.
|
<T extends ScimResource> |
search(String endpoint,
String filter,
Class<T> clazz)
Search for SCIM resources matching the SCIM filter provided.
|
SearchRequestBuilder |
searchRequest(String endpoint)
Build a request to query and retrieve resources of a single resource type
from the service provider.
|
public static final javax.ws.rs.core.MediaType MEDIA_TYPE_SCIM_TYPE
public ScimService(javax.ws.rs.client.WebTarget baseTarget)
baseTarget - The web target for the base URI of the SCIM 2 service
provider.public ServiceProviderConfigResource getServiceProviderConfig() throws ScimException
getServiceProviderConfig in interface ScimInterfaceScimException - if an error occurs.public ListResponse<ResourceTypeResource> getResourceTypes() throws ScimException
getResourceTypes in interface ScimInterfaceScimException - if an error occurs.public ResourceTypeResource getResourceType(String name) throws ScimException
getResourceType in interface ScimInterfacename - The name of the resource type.ScimException - if an error occurs.public ListResponse<SchemaResource> getSchemas() throws ScimException
getSchemas in interface ScimInterfaceScimException - if an error occurs.public SchemaResource getSchema(String id) throws ScimException
getSchema in interface ScimInterfaceid - The schema URN.ScimException - if an error occurs.public <T extends ScimResource> T create(String endpoint, T resource) throws ScimException
create in interface ScimInterfaceT - The Java type of the resource.endpoint - The resource endpoint such as: "Users" or "Groups" as
defined by the associated resource type.resource - The new resource to create.ScimException - if an error occurs.public <T extends ScimResource> T retrieve(String endpoint, String id, Class<T> cls) throws ScimException
retrieve in interface ScimInterfaceT - The Java type of the resource.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.ScimException - if an error occurs.public <T extends ScimResource> T retrieve(URI url, Class<T> cls) throws ScimException
T - The Java type of the resource.url - The URL of the resource to retrieve.cls - The Java class object used to determine the type to return.ScimException - if an error occurs.public <T extends ScimResource> T retrieve(T resource) throws ScimException
retrieve in interface ScimInterfaceT - The Java type of the resource.resource - The resource to retrieve.ScimException - if an error occurs.public <T extends ScimResource> T replace(T resource) throws ScimException
replace in interface ScimInterfaceT - The Java type of the resource.resource - The previously retrieved and revised resource.ScimException - if an error occurs.public void delete(String endpoint, String id) throws ScimException
delete in interface ScimInterfaceendpoint - 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).ScimException - if an error occurs.public void delete(URI url) throws ScimException
url - The URL of the resource to delete.ScimException - if an error occurs.public <T extends ScimResource> void delete(T resource) throws ScimException
delete in interface ScimInterfaceT - The Java type of the resource.resource - The resource to delete.ScimException - if an error occurs.public <T extends ScimResource> CreateRequestBuilder<T> createRequest(String endpoint, T resource)
T - The Java type of the resource.endpoint - The resource endpoint such as: "Users" or "Groups" as
defined by the associated resource type.resource - The new resource to create.public RetrieveRequestBuilder.Typed retrieveRequest(String endpoint, String id)
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).public RetrieveRequestBuilder.Typed retrieveRequest(URI url)
url - The URL of the resource to retrieve.public <T extends ScimResource> RetrieveRequestBuilder.Generic<T> retrieveRequest(T resource)
T - The Java type of the resource.resource - The resource to retrieve.public SearchRequestBuilder searchRequest(String endpoint)
endpoint - The resource endpoint such as: "Users" or "Groups" as
defined by the associated resource type.public <T extends ScimResource> ReplaceRequestBuilder<T> replaceRequest(URI uri, T resource)
T - The Java type of the resource.uri - The URL of the resource to modify.resource - The resource to replace.public <T extends ScimResource> ReplaceRequestBuilder<T> replaceRequest(T resource)
T - The Java type of the resource.resource - The previously retrieved and revised resource.public <T extends ScimResource> T modify(String endpoint, String id, PatchRequest patchRequest, Class<T> clazz) throws ScimException
add", "remove", or "replace" values. The service provider
configuration maybe used to discover service provider support for PATCH.modify in interface ScimInterfaceT - The Java type of the resource.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.ScimException - if an error occurs.public ModifyRequestBuilder.Typed modifyRequest(String endpoint, String id)
add", "remove", or "replace" values. The service provider
configuration maybe used to discover service provider support for PATCH.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).public ModifyRequestBuilder.Typed modifyRequest(URI url)
add", "remove", or "replace" values. The service provider
configuration maybe used to discover service provider support for PATCH.url - The URL of the resource to modify.public <T extends ScimResource> T modify(T resource, PatchRequest patchRequest) throws ScimException
add", "remove", or "replace" values. The service provider
configuration maybe used to discover service provider support for PATCH.modify in interface ScimInterfaceT - The Java type of the resource.resource - The resource to modify.patchRequest - the patch request to use for the update.ScimException - if an error occurs.public <T extends ScimResource> ModifyRequestBuilder.Generic<T> modifyRequest(T resource)
add", "remove", or "replace" values. The service provider
configuration maybe used to discover service provider support for PATCH.T - The Java type of the resource.resource - The resource to modify.public DeleteRequestBuilder deleteRequest(String endpoint, String id) throws ScimException
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).ScimException - if an error occurs.public DeleteRequestBuilder deleteRequest(URI url) throws ScimException
url - The URL of the resource to delete.ScimException - if an error occurs.public <T extends ScimResource> DeleteRequestBuilder deleteRequest(T resource) throws ScimException
T - The Java type of the resource.resource - The resource to delete.ScimException - if an error occurs.public <T extends ScimResource> ListResponse<T> search(String endpoint, String filter, Class<T> clazz) throws ScimException
search in interface ScimInterfaceT - The SCIM resource type to return a list of.endpoint - a SCIM resource type endpoint.filter - a SCIM filter string.clazz - the class representing the type of the SCIM resource.ScimException - if an error occurs.Copyright © 2015–2021 Ping Identity Corporation. All rights reserved.