| Returns the user Application directory.
    | The difference between :func:`get_user_application_data_directory`
        and :func:`get_system_application_data_directory` definitions is that :func:`get_user_application_data_directory` definition
        will append :attr:`foundations.globals.constants.Constants.provider_directory`
        and :attr:`foundations.globals.constants.Constants.application_directory` attributes values to the path returned.
    | If the user Application directory is not available, the function will fallback to system temporary directory.

    Examples directories::

        - 'C:\\Users\\$USER\\AppData\\Roaming\\Provider\\Application' on Windows 7.
        - 'C:\\Documents and Settings\\$USER\\Application Data\\Provider\\Application' on Windows XP.
        - '/Users/$USER/Library/Preferences/Provider/Application' on Mac Os X.
        - '/home/$USER/.Provider/Application' on Linux.

    :return: User Application directory.
    :rtype: unicode

def get_user_application_data_directory():
    """
    | Returns the user Application directory.
    | The difference between :func:`get_user_application_data_directory`
        and :func:`get_system_application_data_directory` definitions is that :func:`get_user_application_data_directory` definition
        will append :attr:`foundations.globals.constants.Constants.provider_directory`
        and :attr:`foundations.globals.constants.Constants.application_directory` attributes values to the path returned.
    | If the user Application directory is not available, the function will fallback to system temporary directory.

    Examples directories::

        - 'C:\\Users\\$USER\\AppData\\Roaming\\Provider\\Application' on Windows 7.
        - 'C:\\Documents and Settings\\$USER\\Application Data\\Provider\\Application' on Windows XP.
        - '/Users/$USER/Library/Preferences/Provider/Application' on Mac Os X.
        - '/home/$USER/.Provider/Application' on Linux.

    :return: User Application directory.
    :rtype: unicode
    """

    system_application_data_directory = get_system_application_data_directory()
    if not foundations.common.path_exists(system_application_data_directory):
        LOGGER.error(
            "!> Undefined or non existing system Application data directory, using 'HOME' directory as fallback!")
        system_application_data_directory = Environment("HOME").get_value()

    if not foundations.common.path_exists(system_application_data_directory):
        temporary_directory = get_temporary_directory()
        LOGGER.error("!> Undefined or non existing 'HOME' directory, using system temporary directory as fallback!")
        system_application_data_directory = temporary_directory

    return os.path.join(system_application_data_directory, Constants.provider_directory,
                        Constants.application_directory)