Class LmsUtil

java.lang.Object
ch.tocco.nice2.optional.lms.impl.util.LmsUtil

public final class LmsUtil extends Object
  • Method Details

    • getLmsObject

      public static Entity getLmsObject(String objectKey, Context context)
    • getPageEntity

      public static Entity getPageEntity(String pageKey, Context context)
    • createPageTrackingEntity

      public static Entity createPageTrackingEntity(Entity userSubscription, Entity pageEntity, Context context) throws InterruptedException
      Throws:
      InterruptedException
    • getStatusEntity

      public static Entity getStatusEntity(Status status, Context persistCtx)
    • getUserEntity

      public static Entity getUserEntity(Entity principalEntity)
    • calcPercentageValue

      public static int calcPercentageValue(long pageCount, long pageTotal)
    • getObjectEntity

      public static Entity getObjectEntity(Entity pageEntity)
    • getUserSubscription

      @Nullable public static @Nullable Entity getUserSubscription(Entity user, Entity subscription, QueryBuilderFactory queryBuilderFactory, Context context)
    • getPageTrackingEntity

      @Nullable public static @Nullable Entity getPageTrackingEntity(Entity userSubscription, Entity pageEntity, QueryBuilderFactory queryBuilderFactory, Context ctx)
    • canRepeat

      public static boolean canRepeat(Entity userSubscription)
    • canOpen

      public static boolean canOpen(Status status, Entity subscription)
    • getStatus

      public static Status getStatus(Entity userSubscription)
    • checkSubscriptionNotNull

      public static void checkSubscriptionNotNull(Principal principal, Entity objectEntity, @Nullable @Nullable Entity subscription)