Class LmsUtil
java.lang.Object
ch.tocco.nice2.optional.lms.impl.util.LmsUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
calcPercentageValue
(long pageCount, long pageTotal) static boolean
static boolean
static void
checkSubscriptionNotNull
(Principal principal, Entity objectEntity, @Nullable Entity subscription) static Entity
createPageTrackingEntity
(Entity userSubscription, Entity pageEntity, Context context) static Entity
getLmsObject
(String objectKey, Context context) static Entity
getObjectEntity
(Entity pageEntity) static Entity
getPageEntity
(String pageKey, Context context) static @Nullable Entity
getPageTrackingEntity
(Entity userSubscription, Entity pageEntity, QueryBuilderFactory queryBuilderFactory, Context ctx) static Status
static Entity
getStatusEntity
(Status status, Context persistCtx) static Entity
getUserEntity
(Entity principalEntity) static @Nullable Entity
getUserSubscription
(Entity user, Entity subscription, QueryBuilderFactory queryBuilderFactory, Context context)
-
Method Details
-
getLmsObject
-
getPageEntity
-
createPageTrackingEntity
public static Entity createPageTrackingEntity(Entity userSubscription, Entity pageEntity, Context context) throws InterruptedException - Throws:
InterruptedException
-
getStatusEntity
-
getUserEntity
-
calcPercentageValue
public static int calcPercentageValue(long pageCount, long pageTotal) -
getObjectEntity
-
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
-
canOpen
-
getStatus
-
checkSubscriptionNotNull
-