Class StoreAdapterPlugin

    • Method Detail

      • getExtensionDescription

        public abstract java.lang.String[] getExtensionDescription()
        Retrieves a human-readable description for this extension. Each element of the array that is returned will be considered a separate paragraph in generated documentation.
        Specified by:
        getExtensionDescription in interface UnboundIDExtension
        Returns:
        A human-readable description for this extension, or null or an empty array if no description should be available.
      • getExamplesArgumentSets

        public 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. The map key should be a list of sample arguments, and the corresponding value should be a description of the behavior that will be exhibited by the extension when used with that configuration.
        Specified by:
        getExamplesArgumentSets in interface ExampleUsageProvider
        Returns:
        A map containing examples of configurations that may be used for this extension. It may be null or empty if there should not be any example argument sets.
      • defineConfigArguments

        public void defineConfigArguments​(ArgumentParser parser)
                                   throws ArgumentException
        Updates the provided argument parser to define any configuration arguments which may be used by this extension. The argument parser may also be updated to define relationships between arguments (e.g., to specify required, exclusive, or dependent argument sets).
        Specified by:
        defineConfigArguments in interface Configurable
        Parameters:
        parser - The argument parser to be updated with the configuration arguments which may be used by this extension.
        Throws:
        ArgumentException - If a problem is encountered while updating the provided argument parser.
      • initializeStoreAdapterPlugin

        public void initializeStoreAdapterPlugin​(BrokerContext serverContext,
                                                 StoreAdapterPluginConfig config,
                                                 ArgumentParser parser)
                                          throws java.lang.Exception
        Initializes this store adapter plugin. Any initialization should be performed here. This method should generally store the BrokerContext in a class member so that it can be used elsewhere in the implementation.

        The default implementation is empty.

        Parameters:
        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.
        Throws:
        java.lang.Exception - If a problem occurs while initializing this store adapter plugin.
      • finalizeStoreAdapterPlugin

        public void finalizeStoreAdapterPlugin()
        This hook is called when the store adapter plugin is disabled or the PingAuthorize Server shuts down. Any clean-up of this store adapter plugin should be performed here.

        The default implementation is empty.

      • preCreate

        public void preCreate​(StorePreCreateRequestContext context)
                       throws com.unboundid.scim2.common.exceptions.ScimException
        This method is called before an entry is created in the native data store.
        Parameters:
        context - The store adapter request context.
        Throws:
        com.unboundid.scim2.common.exceptions.ScimException - If thrown, the operation will be aborted and a corresponding SCIM ErrorResponse will be returned to the client.
      • postCreate

        public void postCreate​(StorePostCreateRequestContext context)
                        throws com.unboundid.scim2.common.exceptions.ScimException
        This method is called after an entry is created in the native data store. This method will not be called if the create fails.
        Parameters:
        context - The store adapter request context.
        Throws:
        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.
      • preRetrieve

        public void preRetrieve​(StorePreRetrieveRequestContext context)
                         throws com.unboundid.scim2.common.exceptions.ScimException
        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.
        • To fetch an entry from a secondary store adapter for each primary store adapter entry obtained during a SCIM search.
        • To fetch an entry from the primary store adapter for each secondary store adapter entry obtained when a SCIM search filter is processed by a secondary store adapter.
        Parameters:
        context - The store adapter request context.
        Throws:
        com.unboundid.scim2.common.exceptions.ScimException - If thrown, the operation will be aborted and a corresponding SCIM ErrorResponse will be returned to the client.
      • postRetrieve

        public void postRetrieve​(StorePostRetrieveRequestContext context)
                          throws com.unboundid.scim2.common.exceptions.ScimException
        This method is called after an entry is retrieved from the native data store. This method will not be called if the retrieve fails.
        Parameters:
        context - The store adapter request context.
        Throws:
        com.unboundid.scim2.common.exceptions.ScimException - If thrown, a corresponding SCIM ErrorResponse will be returned to the client.
      • preUpdate

        public void preUpdate​(StorePreUpdateRequestContext context)
                       throws com.unboundid.scim2.common.exceptions.ScimException
        This method is called before an entry is updated in the native data store.
        Parameters:
        context - The store adapter request context.
        Throws:
        com.unboundid.scim2.common.exceptions.ScimException - If thrown, the operation will be aborted and a corresponding SCIM ErrorResponse will be returned to the client.
      • postUpdate

        public void postUpdate​(StorePostUpdateRequestContext context)
                        throws com.unboundid.scim2.common.exceptions.ScimException
        This method is called after an entry is updated in the native data store. This method will not be called if the update fails.
        Parameters:
        context - The store adapter request context.
        Throws:
        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.
      • preDelete

        public void preDelete​(StorePreDeleteRequestContext context)
                       throws com.unboundid.scim2.common.exceptions.ScimException
        This method is called before an entry is deleted in the native data store.
        Parameters:
        context - The store adapter request context.
        Throws:
        com.unboundid.scim2.common.exceptions.ScimException - If thrown, the operation will be aborted and a corresponding SCIM ErrorResponse will be returned to the client.
      • postDelete

        public void postDelete​(StorePostDeleteRequestContext context)
                        throws com.unboundid.scim2.common.exceptions.ScimException
        This method is called after an entry is deleted in the native data store. This method will not be called if the delete fails.
        Parameters:
        context - The store adapter request context.
        Throws:
        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.
      • preSearch

        public void preSearch​(StorePreSearchRequestContext context)
                       throws com.unboundid.scim2.common.exceptions.ScimException
        This method is called before searching for entries in the native data store.

        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 PingAuthorize Server.

        Parameters:
        context - The store adapter request context.
        Throws:
        com.unboundid.scim2.common.exceptions.ScimException - If thrown, the operation will be aborted and a corresponding SCIM ErrorResponse will be returned to the client.
      • postSearchEntry

        public void postSearchEntry​(StorePostSearchEntryContext context)
        This method is called for each entry found during a search in the native data store. This method will not be called if the search fails.

        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 PingAuthorize Server.

        Parameters:
        context - The store adapter request context.