Interface DataStoreProvider


  • @SupportedAll
    public interface DataStoreProvider
    Interface used for storing & retrieving information. Also used to search user.
    • Method Detail

      • getBinaryAttribute

        byte[][] getBinaryAttribute​(String userID,
                                    String attrName)
                             throws DataStoreProviderException
        Gets user binary attribute.
        Parameters:
        userID - ID value for the user.
        attrName - Name of the attribute whose value to be retrieved.
        Returns:
        Set of the values for the attribute.
        Throws:
        DataStoreProviderException - if an error occurred.
      • getBinaryAttributes

        Map<String,​byte[][]> getBinaryAttributes​(String userID,
                                                       Set<String> attrNames)
                                                throws DataStoreProviderException
        Gets user binary attributes.
        Parameters:
        userID - ID value for the user.
        attrNames - The Set of attribute names.
        Returns:
        Map of specified attributes. Map key is the attribute name and value is the attribute value Set.
        Throws:
        DataStoreProviderException - if an error occurred.
      • isUsernameUniversalId

        default boolean isUsernameUniversalId​(String username)
                                       throws DataStoreProviderException
        Checks if the given username is of the universal ID format.
        Parameters:
        username - The user's ID (either just the username, or a universal ID)
        Returns:
        true if the username is a universal ID, otherwise false.
        Throws:
        DataStoreProviderException
      • convertUserIdToUniversalId

        default String convertUserIdToUniversalId​(String userId,
                                                  String realm)
        Converts the provided user ID to universal ID if it wasn't in the universal ID format already.
        Parameters:
        userId - The user's ID (either just the username, or a universal ID).
        realm - The realm the user belongs to.
        Returns:
        The user's universal ID.