Class UserTrackingServiceImpl

java.lang.Object
org.opencastproject.usertracking.impl.UserTrackingServiceImpl
All Implemented Interfaces:
org.opencastproject.usertracking.api.UserTrackingService, org.osgi.service.cm.ManagedService

public class UserTrackingServiceImpl extends Object implements org.opencastproject.usertracking.api.UserTrackingService, org.osgi.service.cm.ManagedService
Implementation of org.opencastproject.usertracking.api.UserTrackingService
See Also:
  • UserTrackingService
  • Field Details

    • PERSISTENCE_UNIT

      public static final String PERSISTENCE_UNIT
      JPA persistence unit name
      See Also:
    • FOOTPRINT_KEY

      public static final String FOOTPRINT_KEY
      See Also:
    • DETAILED_TRACKING

      public static final String DETAILED_TRACKING
      See Also:
    • IP_LOGGING

      public static final String IP_LOGGING
      See Also:
    • USER_LOGGING

      public static final String USER_LOGGING
      See Also:
    • SESSION_LOGGING

      public static final String SESSION_LOGGING
      See Also:
    • emf

      protected javax.persistence.EntityManagerFactory emf
      The factory used to generate the entity manager
    • dbSessionFactory

      protected org.opencastproject.db.DBSessionFactory dbSessionFactory
    • db

      protected org.opencastproject.db.DBSession db
  • Constructor Details

    • UserTrackingServiceImpl

      public UserTrackingServiceImpl()
  • Method Details

    • setDBSessionFactory

      public void setDBSessionFactory(org.opencastproject.db.DBSessionFactory dbSessionFactory)
    • activate

      public void activate()
      Activation callback to be executed once all dependencies are set
    • updated

      public void updated(Dictionary props) throws org.osgi.service.cm.ConfigurationException
      Specified by:
      updated in interface org.osgi.service.cm.ManagedService
      Throws:
      org.osgi.service.cm.ConfigurationException
    • getViews

      public int getViews(String mediapackageId)
      Specified by:
      getViews in interface org.opencastproject.usertracking.api.UserTrackingService
    • addUserFootprint

      public org.opencastproject.usertracking.api.UserAction addUserFootprint(org.opencastproject.usertracking.api.UserAction action, org.opencastproject.usertracking.api.UserSession session) throws org.opencastproject.usertracking.api.UserTrackingException
      Specified by:
      addUserFootprint in interface org.opencastproject.usertracking.api.UserTrackingService
      Throws:
      org.opencastproject.usertracking.api.UserTrackingException
    • addUserTrackingEvent

      public org.opencastproject.usertracking.api.UserAction addUserTrackingEvent(org.opencastproject.usertracking.api.UserAction a, org.opencastproject.usertracking.api.UserSession session) throws org.opencastproject.usertracking.api.UserTrackingException
      Specified by:
      addUserTrackingEvent in interface org.opencastproject.usertracking.api.UserTrackingService
      Throws:
      org.opencastproject.usertracking.api.UserTrackingException
    • getUserActions

      public org.opencastproject.usertracking.api.UserActionList getUserActions(int offset, int limit)
      Specified by:
      getUserActions in interface org.opencastproject.usertracking.api.UserTrackingService
    • getUserActionsByType

      public org.opencastproject.usertracking.api.UserActionList getUserActionsByType(String type, int offset, int limit)
      Specified by:
      getUserActionsByType in interface org.opencastproject.usertracking.api.UserTrackingService
    • getUserActionsByTypeAndMediapackageId

      public org.opencastproject.usertracking.api.UserActionList getUserActionsByTypeAndMediapackageId(String type, String mediapackageId, int offset, int limit)
      Specified by:
      getUserActionsByTypeAndMediapackageId in interface org.opencastproject.usertracking.api.UserTrackingService
    • getUserActionsByTypeAndDay

      public org.opencastproject.usertracking.api.UserActionList getUserActionsByTypeAndDay(String type, String day, int offset, int limit)
      Specified by:
      getUserActionsByTypeAndDay in interface org.opencastproject.usertracking.api.UserTrackingService
    • getUserActionsByTypeAndMediapackageIdByDate

      public org.opencastproject.usertracking.api.UserActionList getUserActionsByTypeAndMediapackageIdByDate(String type, String mediapackageId, int offset, int limit)
      Specified by:
      getUserActionsByTypeAndMediapackageIdByDate in interface org.opencastproject.usertracking.api.UserTrackingService
    • getUserActionsByTypeAndMediapackageIdByDescendingDate

      public org.opencastproject.usertracking.api.UserActionList getUserActionsByTypeAndMediapackageIdByDescendingDate(String type, String mediapackageId, int offset, int limit)
      Specified by:
      getUserActionsByTypeAndMediapackageIdByDescendingDate in interface org.opencastproject.usertracking.api.UserTrackingService
    • getUserActionsByDay

      public org.opencastproject.usertracking.api.UserActionList getUserActionsByDay(String day, int offset, int limit)
      Specified by:
      getUserActionsByDay in interface org.opencastproject.usertracking.api.UserTrackingService
    • getReport

      public org.opencastproject.usertracking.api.Report getReport(int offset, int limit)
      Specified by:
      getReport in interface org.opencastproject.usertracking.api.UserTrackingService
    • getReport

      public org.opencastproject.usertracking.api.Report getReport(String from, String to, int offset, int limit) throws ParseException
      Specified by:
      getReport in interface org.opencastproject.usertracking.api.UserTrackingService
      Throws:
      ParseException
    • getFootprints

      public org.opencastproject.usertracking.api.FootprintList getFootprints(String mediapackageId, String userId)
      Specified by:
      getFootprints in interface org.opencastproject.usertracking.api.UserTrackingService
    • getUserAction

      public org.opencastproject.usertracking.api.UserAction getUserAction(Long id) throws org.opencastproject.usertracking.api.UserTrackingException, org.opencastproject.util.NotFoundException
      Specified by:
      getUserAction in interface org.opencastproject.usertracking.api.UserTrackingService
      Throws:
      org.opencastproject.usertracking.api.UserTrackingException
      org.opencastproject.util.NotFoundException
      See Also:
      • UserTrackingService.getUserAction(java.lang.Long)
    • getUserTrackingEnabled

      public boolean getUserTrackingEnabled()
      Specified by:
      getUserTrackingEnabled in interface org.opencastproject.usertracking.api.UserTrackingService
      See Also:
      • UserTrackingService.getUserTrackingEnabled()