Interface UserTrackingService


public interface UserTrackingService
Provides annotation capabilities, possibly to the engage tools, possibly to other services.
  • Method Details

    • addUserFootprint

      UserAction addUserFootprint(UserAction a, UserSession session) throws UserTrackingException
      Adds a new annotation to the database and returns the event with an updated annotationId, to make sure the annotationId stays unique
      Parameters:
      a - The UserAction that will be added to the database
      session - The UserSession associated with this footprint
      Returns:
      the updated annotation, with a new ID. NULL if there are errors while adding the annotation.
      Throws:
      UserTrackingException - if the user tracking service encounters an error
    • addUserTrackingEvent

      UserAction addUserTrackingEvent(UserAction a, UserSession session) throws UserTrackingException
      Adds a new tracking event to the database and returns the event with an updated annotationId, to make sure the annotationId stays unique
      Parameters:
      a - The UserAction that will be added to the database
      session - The UserSession associated with this footprint
      Returns:
      the updated annotation, with a new ID. NULL if there are errors while adding the annotation.
      Throws:
      UserTrackingException - if the user tracking service encounters an error
    • getUserActions

      UserActionList getUserActions(int offset, int limit) throws UserTrackingException
      Returns annotations
      Parameters:
      offset - the offset
      limit - the limit
      Returns:
      the annotation list
      Throws:
      UserTrackingException - if the user tracking service encounters an error
    • getUserActionsByType

      UserActionList getUserActionsByType(String key, int offset, int limit) throws UserTrackingException
      Returns annotations of a given key
      Parameters:
      key - The annotation key
      offset - the offset
      limit - the limit
      Returns:
      the annotation list
      Throws:
      UserTrackingException - if the user tracking service encounters an error
    • getUserActionsByDay

      UserActionList getUserActionsByDay(String day, int offset, int limit) throws UserTrackingException
      Returns annotations of a given day (YYYYMMDD)
      Parameters:
      day - The day in the format of YYYYMMDD
      offset - the offset
      limit - the limit
      Returns:
      the annotation list
      Throws:
      UserTrackingException - if the user tracking service encounters an error
    • getUserActionsByTypeAndDay

      UserActionList getUserActionsByTypeAndDay(String key, String day, int offset, int limit) throws UserTrackingException
      Returns annotations of a given key and day
      Parameters:
      key - the annotation key
      day - the day
      offset - the offset
      limit - the limit
      Returns:
      the annotation list
      Throws:
      UserTrackingException - if the user tracking service encounters an error
    • getUserActionsByTypeAndMediapackageId

      UserActionList getUserActionsByTypeAndMediapackageId(String key, String mediapackageId, int offset, int limit) throws UserTrackingException
      Returns annotations of a given key and mediapackage id
      Parameters:
      key - the annotation key
      mediapackageId - the mediapackage id
      offset - the offset
      limit - the limit
      Returns:
      the annotation list
      Throws:
      UserTrackingException - if the user tracking service encounters an error
    • getUserActionsByTypeAndMediapackageIdByDate

      UserActionList getUserActionsByTypeAndMediapackageIdByDate(String key, String mediapackageId, int offset, int limit) throws UserTrackingException
      Returns annotations of a given key and mediapackage id ordered by date.
      Parameters:
      key - the annotation key
      mediapackageId - the mediapackage id
      offset - the offset
      limit - the limit
      Returns:
      the annotation list
      Throws:
      UserTrackingException - if the user tracking service encounters an error
    • getUserActionsByTypeAndMediapackageIdByDescendingDate

      UserActionList getUserActionsByTypeAndMediapackageIdByDescendingDate(String key, String mediapackageId, int offset, int limit) throws UserTrackingException
      Returns annotations of a given key and mediapackage id ordered descending by date.
      Parameters:
      key - the annotation key
      mediapackageId - the mediapackage id
      offset - the offset
      limit - the limit
      Returns:
      the annotation list
      Throws:
      UserTrackingException - if the user tracking service encounters an error
    • getViews

      int getViews(String mediapackageId) throws UserTrackingException
      Returns the views of a mediapackage
      Parameters:
      mediapackageId - the mediapackeId
      Returns:
      the views
      Throws:
      UserTrackingException - if the user tracking service encounters an error
    • getReport

      Report getReport(String from, String to, int offset, int limit) throws UserTrackingException, ParseException
      Returns a report
      Parameters:
      from - The from day key
      to - The to day key
      offset - the offset
      limit - the limit
      Returns:
      the report
      Throws:
      UserTrackingException - if the user tracking service encounters an error
      ParseException
    • getReport

      Report getReport(int offset, int limit) throws UserTrackingException
      Returns a report
      Parameters:
      offset - the offset
      limit - the limit
      Returns:
      the report
      Throws:
      UserTrackingException - if the user tracking service encounters an error
    • getFootprints

      FootprintList getFootprints(String mediapackageId, String userId) throws UserTrackingException
      Returns a list of footprints, if a userId is passed only the footprints of that user are returned.
      Parameters:
      mediapackageId - The mediapackageId
      userId - The userId is optional
      Returns:
      the footprintList
      Throws:
      UserTrackingException - if the user tracking service encounters an error
    • getUserAction

      UserAction getUserAction(Long id) throws UserTrackingException, org.opencastproject.util.NotFoundException
      Get a single user action by its identifier.
      Parameters:
      id - the user action identifier
      Returns:
      the user action
      Throws:
      UserTrackingException - if the user tracking service encounters an error
      org.opencastproject.util.NotFoundException - if the no user action with this identifier exists
    • getUserTrackingEnabled

      boolean getUserTrackingEnabled()
      Returns the flag turning user tracking on or off. Turning user tracking off disables the detailed information gathering, but does *not* disable footprint gathering.
      Returns:
      True if detailed user tracking should be gathered, false otherwise