Class StatementClient


  • public class StatementClient
    extends Object
    Minimal xAPI Client featuring GET and POST Operations for LRS interop.
    • Constructor Detail

      • StatementClient

        public StatementClient​(LRS lrs)
        Constructor to create an xAPI Client
        Parameters:
        lrs - The Learning Record store to connect to
    • Method Detail

      • postStatement

        public List<UUID> postStatement​(Statement stmt)
        Method to post a single xAPI Statement to an LRS.
        Parameters:
        stmt - Statement to post to LRS
        Returns:
        List of IDs for created statement(s) from LRS
      • postStatements

        public List<UUID> postStatements​(List<Statement> stmts)
        Method to post a List of xAPI Statements to an LRS.
        Parameters:
        stmts - Statements to post to LRS
        Returns:
        List of IDs for created statement(s) from LRS
      • getStatements

        public List<Statement> getStatements​(StatementFilters filters,
                                             Integer max)
        Method to get Statements from LRS
        Parameters:
        filters - StatementFilters object to filter the query.
        max - Max total number of statements to retrieve regardless of `limit` size per query
        Returns:
        All statements that match filter
      • getStatements

        public List<Statement> getStatements​(StatementFilters filters)
        Wrapper for getStatements where `max` = `null` (unlimited).
        Parameters:
        filters - StatementFilters object to filter the query.
        Returns:
        All statements that match filter
      • getStatements

        public List<Statement> getStatements()
        Method to get Statements from LRS with no filters
        Returns:
        All statements