@Extensible @BrokerExtension public abstract class SCIMSubResourceTypeHandler extends java.lang.Object implements UnboundIDExtension, Reconfigurable<SCIMSubResourceTypeHandlerConfig>, ExampleUsageProvider
A SCIM sub-resource type is a child type of a SCIM resource type. Where a SCIM resource type strictly provides a view of a data store record (such as an LDAP directory server entry), a SCIM sub-resource type may expose arbitrary capabilities or data associated with a parent SCIM resource type.
A SCIM sub-resource type REST API endpoint is accessed as a child path of the parent SCIM resource. For example, a SCIM Sub-Resource Type Handler that provides an account state management API for a "User" SCIM resource type might be accessed via the path /scim/v2/Users/{resourceId}/account.
dsconfig create-scim-sub-resource-type-handler \ --type-name "{parent-resource-type} \ ---handler-name "{name}" \ --type third-party \ --set enabled:true \ --set "endpoint:{endpoint}" \ --set "extension-class:{class-name}" \ --set "extension-argument:{name=value}"where "{parent-resource-type}" is the name of the parent SCIM Resource Type (such as "Users"), "{name}" is the name to use for the SCIM Sub-Resource Type Handler instance, "{endpoint}" is the HTTP addressable endpoint of the SCIM sub-resource type relative to the base resource URL, "{class-name}" is the fully-qualified name of the Java class that extends
com.unboundid.directory.sdk.scim2.api.SCIMSubResourceTypeHandler
,
and "{name=value}" represents name-value pairs for any arguments to
provide to the SCIM Sub-Resource Type Handler. If multiple arguments should
be provided to the extension, then the
"--set extension-argument:{name=value}
" option should be
provided multiple times.Constructor and Description |
---|
SCIMSubResourceTypeHandler() |
Modifier and Type | Method and Description |
---|---|
ResultCode |
applyConfiguration(SCIMSubResourceTypeHandlerConfig config,
ArgumentParser parser,
java.util.List<java.lang.String> adminActionsRequired,
java.util.List<java.lang.String> messages)
Attempts to apply the configuration from the provided argument parser to
this extension.
|
com.unboundid.scim2.common.ScimResource |
create(SCIMCreateRequest request)
Handles SCIM create requests.
|
void |
defineConfigArguments(ArgumentParser parser)
Updates the provided argument parser to define any configuration arguments
which may be used by this extension.
|
void |
delete(SCIMDeleteRequest request)
Handles SCIM delete requests.
|
void |
finalizeHandler()
Performs any cleanup that might be necessary when this SCIM Sub-Resource
Type Handler is taken out of service.
|
abstract com.unboundid.scim2.common.types.SchemaResource |
getCoreSchema()
Gets the SCIM Sub-Resource Type's core schema.
|
java.util.Map<java.util.List<java.lang.String>,java.lang.String> |
getExamplesArgumentSets()
Retrieves a map containing examples of configurations that may be used for
this extension.
|
abstract java.lang.String[] |
getExtensionDescription()
Retrieves a human-readable description for this extension.
|
abstract java.lang.String |
getExtensionName()
Retrieves a human-readable name for this extension.
|
java.util.Map<com.unboundid.scim2.common.types.SchemaResource,java.lang.Boolean> |
getSchemaExtensions()
Gets the SCIM Sub-Resource Type's schema extensions, if any.
|
abstract void |
initializeHandler(SCIMServerContext serverContext,
SCIMSubResourceTypeHandlerConfig config,
ArgumentParser parser)
Initializes this SCIM Sub-Resource Type Handler.
|
boolean |
isConfigurationAcceptable(SCIMSubResourceTypeHandlerConfig config,
ArgumentParser parser,
java.util.List<java.lang.String> unacceptableReasons)
Indicates whether the configuration represented by the provided argument
parser is acceptable for use by this extension.
|
com.unboundid.scim2.common.ScimResource |
modify(SCIMModifyRequest request)
Handles SCIM modify requests.
|
com.unboundid.scim2.common.ScimResource |
replace(SCIMReplaceRequest request)
Handles SCIM replace requests.
|
com.unboundid.scim2.common.ScimResource |
retrieve(SCIMRetrieveRequest request)
Handles SCIM retrieve requests.
|
void |
search(SCIMSearchRequest request)
Handles SCIM search requests.
|
abstract boolean |
supportsOneToMany()
Indicates whether the SCIM Sub-Resource Type implemented by this handler
is supports one and only one sub-resource per parent resource or supports
multiple sub-resources per parent resource.
|
public SCIMSubResourceTypeHandler()
public abstract java.lang.String getExtensionName()
getExtensionName
in interface UnboundIDExtension
public abstract java.lang.String[] getExtensionDescription()
getExtensionDescription
in interface UnboundIDExtension
null
or an empty array if no description should be available.public void defineConfigArguments(ArgumentParser parser) throws ArgumentException
defineConfigArguments
in interface Configurable
parser
- The argument parser to be updated with the configuration
arguments which may be used by this extension.ArgumentException
- If a problem is encountered while updating the
provided argument parser.public java.util.Map<java.util.List<java.lang.String>,java.lang.String> getExamplesArgumentSets()
getExamplesArgumentSets
in interface ExampleUsageProvider
null
or empty if there should
not be any example argument sets.public boolean isConfigurationAcceptable(SCIMSubResourceTypeHandlerConfig config, ArgumentParser parser, java.util.List<java.lang.String> unacceptableReasons)
isConfigurationAcceptable
in interface Reconfigurable<SCIMSubResourceTypeHandlerConfig>
config
- The general configuration for this extension.parser
- The argument parser that has been used to
parse the proposed configuration for this
extension.unacceptableReasons
- A list to which messages may be added to
provide additional information about why the
provided configuration is not acceptable.true
if the configuration in the provided argument parser
appears to be acceptable, or false
if not.public ResultCode applyConfiguration(SCIMSubResourceTypeHandlerConfig config, ArgumentParser parser, java.util.List<java.lang.String> adminActionsRequired, java.util.List<java.lang.String> messages)
applyConfiguration
in interface Reconfigurable<SCIMSubResourceTypeHandlerConfig>
config
- The general configuration for this extension.parser
- The argument parser that has been used to
parse the new configuration for this
extension.adminActionsRequired
- A list to which messages may be added to
provide additional information about any
additional administrative actions that may
be required to apply some of the
configuration changes.messages
- A list to which messages may be added to
provide additional information about the
processing performed by this method.SUCCESS
should be
used to indicate that all processing completed successfully. Any
other result will indicate that a problem occurred during
processing.public abstract void initializeHandler(SCIMServerContext serverContext, SCIMSubResourceTypeHandlerConfig config, ArgumentParser parser) throws java.lang.Exception
serverContext
- A handle to the server context for the server in
which this extension is running.config
- The configuration for this SCIM Sub-Resource Type
Handler.parser
- The argument parser which has been initialized from
the configuration for this SCIM Sub-Resource Type
Handler.java.lang.Exception
- If a problem occurs while initializing this SCIM
Sub-Resource Type Handler.public void finalizeHandler()
public abstract com.unboundid.scim2.common.types.SchemaResource getCoreSchema()
null
.public java.util.Map<com.unboundid.scim2.common.types.SchemaResource,java.lang.Boolean> getSchemaExtensions()
By default, this method will return an empty map, indicating that no schema extensions are supported.
public abstract boolean supportsOneToMany()
public com.unboundid.scim2.common.ScimResource create(SCIMCreateRequest request) throws com.unboundid.scim2.common.exceptions.ScimException
By default, this method will throw a NotImplementedException
if
it is not overridden.
request
- A SCIM create request.com.unboundid.scim2.common.exceptions.ScimException
- If an error occurs.public com.unboundid.scim2.common.ScimResource retrieve(SCIMRetrieveRequest request) throws com.unboundid.scim2.common.exceptions.ScimException
By default, this method will throw a NotImplementedException
if
it is not overridden.
request
- A SCIM retrieve request.com.unboundid.scim2.common.exceptions.ScimException
- If an error occurs.public com.unboundid.scim2.common.ScimResource modify(SCIMModifyRequest request) throws com.unboundid.scim2.common.exceptions.ScimException
By default, this method will throw a NotImplementedException
if
it is not overridden.
request
- A SCIM modify request.com.unboundid.scim2.common.exceptions.ScimException
- If an error occurs.public com.unboundid.scim2.common.ScimResource replace(SCIMReplaceRequest request) throws com.unboundid.scim2.common.exceptions.ScimException
By default, this method will throw a NotImplementedException
if
it is not overridden.
request
- A SCIM replace request.com.unboundid.scim2.common.exceptions.ScimException
- If an error occurs.public void delete(SCIMDeleteRequest request) throws com.unboundid.scim2.common.exceptions.ScimException
By default, this method will throw a NotImplementedException
if
it is not overridden.
request
- A SCIM delete request.com.unboundid.scim2.common.exceptions.ScimException
- If an error occurs.public void search(SCIMSearchRequest request) throws com.unboundid.scim2.common.exceptions.ScimException
By default, this method will throw a NotImplementedException
if
it is not overridden.
request
- A SCIM search request.com.unboundid.scim2.common.exceptions.ScimException
- If an error occurs.