Class ResourceTypeHandler
- java.lang.Object
-
- de.captaingoldfish.scim.sdk.server.endpoints.ResourceHandler<ResourceType>
-
- de.captaingoldfish.scim.sdk.server.endpoints.handler.ResourceTypeHandler
-
public class ResourceTypeHandler extends ResourceHandler<ResourceType>
author Pascal Knueppel
created at: 17.10.2019 - 22:44
the resourceType handler for the resourceType endpoint that will provide the different resources
-
-
Constructor Summary
Constructors Constructor Description ResourceTypeHandler(ResourceTypeFactory resourceTypeFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceTypecreateResource(ResourceType resource, Context context)creating of resource types not supportedvoiddeleteResource(String id, Context context)deleting of resource types not supportedResourceTypegetResource(String id, List<SchemaAttribute> attributes, List<SchemaAttribute> excludedAttributes, Context context)extract a resource by its idPartialListResponselistResources(long startIndex, int count, FilterNode filter, SchemaAttribute sortBy, SortOrder sortOrder, List<SchemaAttribute> attributes, List<SchemaAttribute> excludedAttributes, Context context)queries several resources based on the following valuesResourceTypeupdateResource(ResourceType resourceToUpdate, Context context)updating of resource types not supported-
Methods inherited from class de.captaingoldfish.scim.sdk.server.endpoints.ResourceHandler
getChangePasswordSupported, getMaxResults, getRequestValidator, getSchema, getSchemaExtensions, getType, isChangePasswordSupported, setSchema, setSchemaExtensions
-
-
-
-
Constructor Detail
-
ResourceTypeHandler
public ResourceTypeHandler(ResourceTypeFactory resourceTypeFactory)
-
-
Method Detail
-
createResource
public ResourceType createResource(ResourceType resource, Context context)
creating of resource types not supported- Specified by:
createResourcein classResourceHandler<ResourceType>- Parameters:
resource- the resource to storecontext- the current request context that holds additional useful information. This object is never null- Returns:
- the stored resource with additional meta information as id, created, lastModified timestamps etc.
-
getResource
public ResourceType getResource(String id, List<SchemaAttribute> attributes, List<SchemaAttribute> excludedAttributes, Context context)
extract a resource by its id- Specified by:
getResourcein classResourceHandler<ResourceType>- Parameters:
id- the id of the resource to returnattributes- the attributes that should be returned to the client. If the client sends this parameter the evaluation of these parameters might help to improve database performance by omitting unnecessary table joinsexcludedAttributes- the attributes that should NOT be returned to the client. If the client send this parameter the evaluation of these parameters might help to improve database performance by omitting unnecessary table joinscontext- the current request context that holds additional useful information. This object is never null- Returns:
- the found resource
-
listResources
public PartialListResponse listResources(long startIndex, int count, FilterNode filter, SchemaAttribute sortBy, SortOrder sortOrder, List<SchemaAttribute> attributes, List<SchemaAttribute> excludedAttributes, Context context)
queries several resources based on the following values- Specified by:
listResourcesin classResourceHandler<ResourceType>- Parameters:
startIndex- the start index that has a minimum value of 1. So the given startIndex here will never be lower than 1count- the number of entries that should be returned to the client. The minimum value of this value is 0.filter- the parsed filter expression if the client has given a filtersortBy- the attribute value that should be used for sortingsortOrder- the sort orderattributes- the attributes that should be returned to the client. If the client sends this parameter the evaluation of these parameters might help to improve database performance by omitting unnecessary table joinsexcludedAttributes- the attributes that should NOT be returned to the client. If the client send this parameter the evaluation of these parameters might help to improve database performance by omitting unnecessary table joinscontext- the current request context that holds additional useful information. This object is never null- Returns:
- a list of several resources and a total results value. You may choose to leave the totalResults value blank but this might lead to erroneous results on the client side
-
updateResource
public ResourceType updateResource(ResourceType resourceToUpdate, Context context)
updating of resource types not supported- Specified by:
updateResourcein classResourceHandler<ResourceType>- Parameters:
resourceToUpdate- the resource that should override an existing onecontext- the current request context that holds additional useful information. This object is never null- Returns:
- the updated resource with the values changed and a new lastModified value
-
deleteResource
public void deleteResource(String id, Context context)
deleting of resource types not supported- Specified by:
deleteResourcein classResourceHandler<ResourceType>- Parameters:
id- the id of the resource to deletecontext- the current request context that holds additional useful information. This object is never null
-
-