public class SCIMService extends Object
| Constructor and Description |
|---|
SCIMService(URI baseUrl)
Constructs a new SCIMService.
|
SCIMService(URI baseUrl,
org.glassfish.jersey.client.ClientConfig clientConfig)
Constructs a new SCIMService from a url and a hersey client config.
|
SCIMService(URI baseUrl,
OAuthToken oAuthToken)
Constructs a new SCIMService with OAuth authentication support
using the provided credentials.
|
SCIMService(URI baseUrl,
String username,
String password)
Constructs a new SCIMService with basic authentication support
using the provided credentials.
|
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.MediaType |
getAcceptType()
Retrieves the accept media type that should be used when reading data from
the SCIM service provider.
|
URI |
getBaseURL()
Retrieves the SCIM Service Provider URL.
|
javax.ws.rs.core.MediaType |
getContentType()
Retrieves the content media type that should be used when writing data to
the SCIM service provider.
|
<R extends BaseResource> |
getEndpoint(ResourceDescriptor resourceDescriptor,
ResourceFactory<R> resourceFactory)
Returns a SCIMEndpoint with the current settings that can be used to
invoke CRUD operations.
|
SCIMEndpoint<BaseResource> |
getEndpoint(String endpointPath)
Returns a SCIMEndpoint for the specified endpoint.
|
<R extends BaseResource> |
getEndpoint(String endpointPath,
ResourceFactory<R> resourceFactory)
Returns a SCIMEndpoint for the specified endpoint.
|
SCIMEndpoint<GroupResource> |
getGroupEndpoint()
Returns a SCIMEndpoint for the Groups endpoint defined in the core schema.
|
SCIMEndpoint<GroupResource> |
getGroupEndpoint(String groupResourceName,
String groupsEndpointName)
Returns a SCIMEndpoint for the Groups endpoint defined in the core schema
with a custom group resource name and groups endpoint name.
|
ResourceDescriptor |
getResourceDescriptor(String resourceName,
String schema)
Retrieves the ResourceDescriptor for the specified resource from the
SCIM service provider.
|
ResourceDescriptor |
getResourceDescriptorForEndpoint(String endpoint)
Retrieves the ResourceDescriptor for the specified endpoint from the
SCIM service provider.
|
SCIMEndpoint<ResourceDescriptor> |
getResourceSchemaEndpoint()
Returns a SCIMEndpoint for the Schemas endpoint.
|
ServiceProviderConfig |
getServiceProviderConfig()
Retrieves the Service Provider Config from the SCIM service provider.
|
String |
getUserAgent()
Retrieves the user-agent string that will be used in the HTTP request
headers.
|
SCIMEndpoint<UserResource> |
getUserEndpoint()
Returns a SCIMEndpoint for the Users endpoint defined in the core schema.
|
SCIMEndpoint<UserResource> |
getUserEndpoint(String userResourceName,
String usersEndpointName)
Returns a SCIMEndpoint for the Users endpoint defined in the core schema
with a custom user resource name and users endpoint name.
|
boolean |
isOverrideDelete()
Whether to override DELETE operations with POST.
|
boolean |
isOverridePatch()
Whether to override PATCH operations with POST.
|
boolean |
isOverridePut()
Whether to override PUT operations with POST.
|
boolean |
isUseUrlSuffix()
Whether to use URL suffix to specify the desired response data format
(ie.
|
BulkResponse |
processBulkRequest(List<BulkOperation> operations)
Invoke a bulk request.
|
BulkResponse |
processBulkRequest(List<BulkOperation> operations,
int failOnErrors)
Invoke a bulk request.
|
void |
setAcceptType(javax.ws.rs.core.MediaType acceptType)
Sets the accept media type that should be used when reading data from
the SCIM service provider.
|
void |
setContentType(javax.ws.rs.core.MediaType contentType)
Sets the content media type that should be used when writing data to
the SCIM service provider.
|
void |
setOverrideDelete(boolean overrideDelete)
Sets whether to override DELETE operations with POST.
|
void |
setOverridePatch(boolean overridePatch)
Sets whether to override PATCH operations with POST.
|
void |
setOverridePut(boolean overridePut)
Sets whether to override PUT operations with POST.
|
void |
setUserAgent(String userAgent)
Sets the user-agent string to use in the request headers.
|
void |
setUseUrlSuffix(boolean useUrlSuffix)
Sets whether to use URL suffix to specify the desired response data format
(ie.
|
public SCIMService(URI baseUrl, org.glassfish.jersey.client.ClientConfig clientConfig)
baseUrl - The SCIM Service Provider URL.clientConfig - The client config object.public SCIMService(URI baseUrl)
baseUrl - The SCIM Service Provider URL.public SCIMService(URI baseUrl, OAuthToken oAuthToken)
baseUrl - The SCIM Service Provider URL.oAuthToken - The OAuth token.public SCIMService(URI baseUrl, String username, String password)
baseUrl - The SCIM Service Provider URL.username - The username.password - The password.public <R extends BaseResource> SCIMEndpoint<R> getEndpoint(ResourceDescriptor resourceDescriptor, ResourceFactory<R> resourceFactory)
R - The type of SCIM resource instances.resourceDescriptor - The ResourceDescriptor of the endpoint.resourceFactory - The ResourceFactory that should be used to
create SCIM resource instances.public SCIMEndpoint<BaseResource> getEndpoint(String endpointPath) throws SCIMException
endpointPath - SCIM endpoint relative path, e.g. "Users".SCIMException - for an invalid endpoint pathpublic <R extends BaseResource> SCIMEndpoint<R> getEndpoint(String endpointPath, ResourceFactory<R> resourceFactory) throws SCIMException
R - the type of SCIM resource instances.endpointPath - SCIM endpoint relative path, e.g. "Users".resourceFactory - The ResourceFactory that should be used to
create SCIM resource instances.SCIMException - for an invalid endpoint path.public SCIMEndpoint<UserResource> getUserEndpoint()
public SCIMEndpoint<UserResource> getUserEndpoint(String userResourceName, String usersEndpointName)
userResourceName - Provide a custom user resource name.usersEndpointName - Provide a custom users endpoint name.public SCIMEndpoint<GroupResource> getGroupEndpoint()
public SCIMEndpoint<GroupResource> getGroupEndpoint(String groupResourceName, String groupsEndpointName)
groupResourceName - Provide a custom group resource name.groupsEndpointName - Provide a custom groups endpoint name.public SCIMEndpoint<ResourceDescriptor> getResourceSchemaEndpoint()
public ResourceDescriptor getResourceDescriptor(String resourceName, String schema) throws SCIMException
resourceName - The name of the resource.schema - The schema URN of the resource or null
to match only based on the name of the resource.null if none are found.SCIMException - If the ResourceDescriptor could not be read.public ResourceDescriptor getResourceDescriptorForEndpoint(String endpoint) throws SCIMException
endpoint - The name of the SCIM endpoint, e.g. "Users".null if none are found.SCIMException - If the ResourceDescriptor could not be read.public ServiceProviderConfig getServiceProviderConfig() throws SCIMException
SCIMException - If the Service Provider Config could not be read.public BulkResponse processBulkRequest(List<BulkOperation> operations) throws SCIMException
operations - The operations to be performed.SCIMException - If the request fails.public BulkResponse processBulkRequest(List<BulkOperation> operations, int failOnErrors) throws SCIMException
operations - The operations to be performed.failOnErrors - The number of errors that the service provider will
accept before the operation is terminated and an
error response is returned. A value of -1 indicates
the the service provider will continue to perform
as many operations as possible without regard to
failures.SCIMException - If the request fails.public URI getBaseURL()
public javax.ws.rs.core.MediaType getContentType()
public void setContentType(javax.ws.rs.core.MediaType contentType)
contentType - he content media type that should be used when writing
data to the SCIM service provider.public javax.ws.rs.core.MediaType getAcceptType()
public void setAcceptType(javax.ws.rs.core.MediaType acceptType)
acceptType - The accept media type that should be used when reading
data from the SCIM service provider.public String getUserAgent()
public void setUserAgent(String userAgent)
userAgent - The user-agent string that should be used.public boolean isOverrideDelete()
true to override DELETE operations with POST or
false to use the DELETE method.public void setOverrideDelete(boolean overrideDelete)
overrideDelete - true to override DELETE operations with
POST or false to use the DELETE method.public boolean isOverridePatch()
true to override PATCH operations with POST or
false to use the PATCH method.public void setOverridePatch(boolean overridePatch)
overridePatch - true to override PATCH operations with
POST or false to use the PATCH method.public boolean isOverridePut()
true to override PUT operations with POST or
false to use the PUT method.public void setOverridePut(boolean overridePut)
overridePut - true to override PUT operations with
POST or false to use the PUT method.public boolean isUseUrlSuffix()
true to use URL suffix to specify the desired response
data format or false to use the HTTP Accept Header.public void setUseUrlSuffix(boolean useUrlSuffix)
useUrlSuffix - true to use URL suffix to specify the desired
response data format or false to use the HTTP
Accept Header.Copyright © 2011–2016 UnboundID. All rights reserved.