Interface ProviderExtension


  • public interface ProviderExtension
    This interface is intended to be implemented by an application which wants to customize the behavior of a Provider implementation. A ProviderExtension instance is bind to all specific Providers supporting the provider extension and for which Provider#getId equals ProviderExtension#getId. Each Provider can be bind to either 0 or 1 ProviderExtension at any given time and in case the condition above holds for more than one ProviderExtension, then the instance with the highest service ranking is selected.
    • Method Detail

      • getId

        java.lang.String getId()
        Unique ID for this provider extension, used to bind a Provider with the current ProviderExtension instance.
        Returns:
        the provider extension identifier
      • mapUserId

        java.lang.String mapUserId​(java.lang.String userId,
                                   java.util.Map<java.lang.String,​java.lang.Object> props)
        Map the provider's user identifier to a unique CRX user identifier.
        Parameters:
        userId - provider's user identifier
        props - map of all provider's properties for the user identifier
        Returns:
        the user identifier or null in order to leave the implementation to the referenced Provider
        See Also:
        Provider.mapUserId(String, java.util.Map)
      • getUserFolderPath

        java.lang.String getUserFolderPath​(java.lang.String userId,
                                           java.lang.String clientId,
                                           java.util.Map<java.lang.String,​java.lang.Object> props)
        Return the node path where the user should be created
        Parameters:
        userId - provider's user identifier
        clientId - client identifier
        props - map of all provider's properties for this user identifier
        Returns:
        relative path to store this user within /home/users or null in order to leave the implementation to the referenced Provider