@Extensible @BrokerExtension @ThreadSafety(level=INTERFACE_THREADSAFE) public abstract class StoreAdapterPlugin extends java.lang.Object implements UnboundIDExtension, Configurable, ExampleUsageProvider
The Store Adapter Plugin is defined in the configuration and then referenced by a Store Adapter configuration object.
Constructor and Description |
---|
StoreAdapterPlugin()
Creates a new instance of this store adapter plugin.
|
Modifier and Type | Method and Description |
---|---|
void |
defineConfigArguments(com.unboundid.util.args.ArgumentParser parser)
Updates the provided argument parser to define any configuration arguments
which may be used by this extension.
|
void |
finalizeStoreAdapterPlugin()
This hook is called when the store adapter plugin is disabled or the Broker
shuts down.
|
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.
|
void |
initializeStoreAdapterPlugin(BrokerContext serverContext,
StoreAdapterPluginConfig config,
com.unboundid.util.args.ArgumentParser parser)
Initializes this store adapter plugin.
|
void |
postCreate(StorePostCreateRequestContext context)
This method is called after an entry is created in the native data store.
|
void |
postDelete(StorePostDeleteRequestContext context)
This method is called after an entry is deleted in the native data
store.
|
void |
postRetrieve(StorePostRetrieveRequestContext context)
This method is called after an entry is retrieved from the native data
store.
|
void |
postSearchEntry(StorePostSearchEntryContext context)
This method is called for each entry found during a search in the native
data store.
|
void |
postUpdate(StorePostUpdateRequestContext context)
This method is called after an entry is updated in the native data
store.
|
void |
preCreate(StorePreCreateRequestContext context)
This method is called before an entry is created in the native data store.
|
void |
preDelete(StorePreDeleteRequestContext context)
This method is called before an entry is deleted in the native data
store.
|
void |
preRetrieve(StorePreRetrieveRequestContext context)
This method is called before an entry is retrieved from the native data
store in the following cases:
To fetch an entry for a SCIM retrieve operation.
|
void |
preSearch(StorePreSearchRequestContext context)
This method is called before searching for entries in the native data
store.
|
void |
preUpdate(StorePreUpdateRequestContext context)
This method is called before an entry is updated in the native data
store.
|
public StoreAdapterPlugin()
initializeStoreAdapterPlugin(com.unboundid.directory.sdk.broker.types.BrokerContext, com.unboundid.directory.sdk.broker.config.StoreAdapterPluginConfig, com.unboundid.util.args.ArgumentParser)
method.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 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 void defineConfigArguments(com.unboundid.util.args.ArgumentParser parser) throws com.unboundid.util.args.ArgumentException
defineConfigArguments
in interface Configurable
parser
- The argument parser to be updated with the configuration
arguments which may be used by this extension.com.unboundid.util.args.ArgumentException
- If a problem is encountered while updating the
provided argument parser.public void initializeStoreAdapterPlugin(BrokerContext serverContext, StoreAdapterPluginConfig config, com.unboundid.util.args.ArgumentParser parser) throws java.lang.Exception
BrokerContext
in a class member so that it can be used elsewhere in
the implementation.
The default implementation is empty.
serverContext
- A handle to the server context for the server in
which this extension is running. Extensions should
typically store this in a class member.config
- The general configuration for this object.parser
- The argument parser which has been initialized from
the configuration for this store adapter plugin.java.lang.Exception
- If a problem occurs while initializing this store
adapter plugin.public void finalizeStoreAdapterPlugin()
The default implementation is empty.
public void preCreate(StorePreCreateRequestContext context) throws com.unboundid.scim2.common.exceptions.ScimException
context
- The store adapter request context.com.unboundid.scim2.common.exceptions.ScimException
- If thrown, the operation will be aborted and a
corresponding SCIM ErrorResponse will be returned to
the client.public void postCreate(StorePostCreateRequestContext context) throws com.unboundid.scim2.common.exceptions.ScimException
context
- The store adapter request context.com.unboundid.scim2.common.exceptions.ScimException
- If thrown, a corresponding SCIM ErrorResponse will be
returned to the client. No attempt is made to roll
back the committed create operation.public void preRetrieve(StorePreRetrieveRequestContext context) throws com.unboundid.scim2.common.exceptions.ScimException
context
- The store adapter request context.com.unboundid.scim2.common.exceptions.ScimException
- If thrown, the operation will be aborted and a
corresponding SCIM ErrorResponse will be returned to
the client.public void postRetrieve(StorePostRetrieveRequestContext context) throws com.unboundid.scim2.common.exceptions.ScimException
context
- The store adapter request context.com.unboundid.scim2.common.exceptions.ScimException
- If thrown, a corresponding SCIM ErrorResponse will be
returned to the client.public void preUpdate(StorePreUpdateRequestContext context) throws com.unboundid.scim2.common.exceptions.ScimException
context
- The store adapter request context.com.unboundid.scim2.common.exceptions.ScimException
- If thrown, the operation will be aborted and a
corresponding SCIM ErrorResponse will be returned to
the client.public void postUpdate(StorePostUpdateRequestContext context) throws com.unboundid.scim2.common.exceptions.ScimException
context
- The store adapter request context.com.unboundid.scim2.common.exceptions.ScimException
- If thrown, a corresponding SCIM ErrorResponse will be
returned to the client. No attempt is made to roll
back the committed update operation.public void preDelete(StorePreDeleteRequestContext context) throws com.unboundid.scim2.common.exceptions.ScimException
context
- The store adapter request context.com.unboundid.scim2.common.exceptions.ScimException
- If thrown, the operation will be aborted and a
corresponding SCIM ErrorResponse will be returned to
the client.public void postDelete(StorePostDeleteRequestContext context) throws com.unboundid.scim2.common.exceptions.ScimException
context
- The store adapter request context.com.unboundid.scim2.common.exceptions.ScimException
- If thrown, a corresponding SCIM ErrorResponse will be
returned to the client. No attempt is made to roll
back the committed delete operation.public void preSearch(StorePreSearchRequestContext context) throws com.unboundid.scim2.common.exceptions.ScimException
Note that the contract for store adapter searches allows the store adapter to return a superset of entries matching the original search filter. The results from the store adapter are subsequently filtered by the Broker.
context
- The store adapter request context.com.unboundid.scim2.common.exceptions.ScimException
- If thrown, the operation will be aborted and a
corresponding SCIM ErrorResponse will be returned to
the client.public void postSearchEntry(StorePostSearchEntryContext context)
Note that the contract for store adapter searches allows the store adapter to return a superset of entries matching the original search filter. The results from the store adapter are subsequently filtered by the Broker.
context
- The store adapter request context.