public class ResourcePreparer<T extends com.bettercloud.scim2.common.ScimResource>
extends java.lang.Object
| Constructor and Description |
|---|
ResourcePreparer(ResourceTypeDefinition resourceType,
java.lang.String attributesString,
java.lang.String excludedAttributesString,
java.net.URI baseUri)
Create a new ResourcePreparer for preparing returned resources for a
SCIM operation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
setResourceTypeAndLocation(T returnedResource)
Sets the meta.resourceType and meta.location metadata attribute values.
|
com.bettercloud.scim2.common.GenericScimResource |
trimCreatedResource(T returnedResource,
T requestResource)
Trim attributes of the resources returned from a create operation based on
schema as well as the request resource and request parameters.
|
com.bettercloud.scim2.common.GenericScimResource |
trimModifiedResource(T returnedResource,
java.lang.Iterable<com.bettercloud.scim2.common.messages.PatchOperation> patchOperations)
Trim attributes of the resources returned from a modify operation based on
schema as well as the patch request and request parameters.
|
com.bettercloud.scim2.common.GenericScimResource |
trimReplacedResource(T returnedResource,
T requestResource)
Trim attributes of the resources returned from a replace operation based on
schema as well as the request resource and request parameters.
|
com.bettercloud.scim2.common.GenericScimResource |
trimRetrievedResource(T returnedResource)
Trim attributes of the resources returned from a search or retrieve
operation based on schema and the request parameters.
|
public ResourcePreparer(ResourceTypeDefinition resourceType, java.lang.String attributesString, java.lang.String excludedAttributesString, java.net.URI baseUri) throws com.bettercloud.scim2.common.exceptions.BadRequestException
resourceType - The resource type definition for resources to prepare.attributesString - The attributes query param.excludedAttributesString - The excludedAttributes query param.baseUri - The resource type base URI.com.bettercloud.scim2.common.exceptions.BadRequestException - This will be thrown if an attribute is not valid.public com.bettercloud.scim2.common.GenericScimResource trimRetrievedResource(T returnedResource)
returnedResource - The resource to return.public com.bettercloud.scim2.common.GenericScimResource trimCreatedResource(T returnedResource, T requestResource)
returnedResource - The resource to return.requestResource - The resource in the create request or
null if not available.public com.bettercloud.scim2.common.GenericScimResource trimReplacedResource(T returnedResource, T requestResource)
returnedResource - The resource to return.requestResource - The resource in the replace request or
null if not available.public com.bettercloud.scim2.common.GenericScimResource trimModifiedResource(T returnedResource, java.lang.Iterable<com.bettercloud.scim2.common.messages.PatchOperation> patchOperations)
returnedResource - The resource to return.patchOperations - The operations in the patch request or
null if not available.public void setResourceTypeAndLocation(T returnedResource)
returnedResource - The resource to set the attributes.