Interface UserTrackingService
- All Known Implementing Classes:
UserTrackingServiceImpl
public interface UserTrackingService
Provides annotation capabilities, possibly to the engage tools, possibly to other services.
-
Method Summary
Modifier and TypeMethodDescriptionaddUserFootprint(UserAction a, UserSession session) Adds a new annotation to the database and returns the event with an updated annotationId, to make sure the annotationId stays uniqueaddUserTrackingEvent(UserAction a, UserSession session) Adds a new tracking event to the database and returns the event with an updated annotationId, to make sure the annotationId stays uniquegetFootprints(String mediapackageId, String userId) Returns a list of footprints, if a userId is passed only the footprints of that user are returned.getReport(int offset, int limit) Returns a reportReturns a reportgetUserAction(Long id) Get a single user action by its identifier.getUserActions(int offset, int limit) Returns annotationsgetUserActionsByDay(String day, int offset, int limit) Returns annotations of a given day (YYYYMMDD)getUserActionsByType(String key, int offset, int limit) Returns annotations of a given keygetUserActionsByTypeAndDay(String key, String day, int offset, int limit) Returns annotations of a given key and daygetUserActionsByTypeAndMediapackageId(String key, String mediapackageId, int offset, int limit) Returns annotations of a given key and mediapackage idgetUserActionsByTypeAndMediapackageIdByDate(String key, String mediapackageId, int offset, int limit) Returns annotations of a given key and mediapackage id ordered by date.getUserActionsByTypeAndMediapackageIdByDescendingDate(String key, String mediapackageId, int offset, int limit) Returns annotations of a given key and mediapackage id ordered descending by date.booleanReturns the flag turning user tracking on or off.intReturns the views of a mediapackage
-
Method Details
-
addUserFootprint
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 databasesession- 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
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 databasesession- 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
Returns annotations- Parameters:
offset- the offsetlimit- the limit- Returns:
- the annotation list
- Throws:
UserTrackingException- if the user tracking service encounters an error
-
getUserActionsByType
Returns annotations of a given key- Parameters:
key- The annotation keyoffset- the offsetlimit- the limit- Returns:
- the annotation list
- Throws:
UserTrackingException- if the user tracking service encounters an error
-
getUserActionsByDay
Returns annotations of a given day (YYYYMMDD)- Parameters:
day- The day in the format of YYYYMMDDoffset- the offsetlimit- 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 keyday- the dayoffset- the offsetlimit- 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 keymediapackageId- the mediapackage idoffset- the offsetlimit- 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 keymediapackageId- the mediapackage idoffset- the offsetlimit- 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 keymediapackageId- the mediapackage idoffset- the offsetlimit- the limit- Returns:
- the annotation list
- Throws:
UserTrackingException- if the user tracking service encounters an error
-
getViews
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 keyto- The to day keyoffset- the offsetlimit- the limit- Returns:
- the report
- Throws:
UserTrackingException- if the user tracking service encounters an errorParseException
-
getReport
Returns a report- Parameters:
offset- the offsetlimit- the limit- Returns:
- the report
- Throws:
UserTrackingException- if the user tracking service encounters an error
-
getFootprints
Returns a list of footprints, if a userId is passed only the footprints of that user are returned.- Parameters:
mediapackageId- The mediapackageIduserId- The userId is optional- Returns:
- the footprintList
- Throws:
UserTrackingException- if the user tracking service encounters an error
-
getUserAction
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 errorNotFoundException- 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
-