Class ParentalControlUsageService

java.lang.Object
org.eblocker.server.http.service.ParentalControlUsageService

public class ParentalControlUsageService extends Object
  • Constructor Details

  • Method Details

    • init

      public void init()
    • startUsage

      public boolean startUsage(Device device)
    • stopUsage

      public void stopUsage(Device device)
    • getUsageAccount

      public UsageAccount getUsageAccount(Device device)
    • getUsageAccount

      public UsageAccount getUsageAccount(Integer userId)
    • getUsageAccount

      public UsageAccount getUsageAccount(UserModule user)
    • addBonusTimeForToday

      public UserProfileModule addBonusTimeForToday(int profileId, int min)
      Allows to add a positive or negative number as bonus time for a given profile. The overall bonus time must be positive. A negative bonus could result in bad user experience. If bonus is large negative number The parent would have to continuously click on "+10 min" until the value is positive again. So to reduce the actual online time for that day, the parent has to update the profile's online time in the settings.
      Parameters:
      profileId - the profile to which the bonus is added
      min - bonus time in minutes
      Returns:
      the updated user profile