ca.shiftfocus.krispii.core.services

WorkServiceDefault

Related Doc: package services

class WorkServiceDefault extends WorkService

Linear Supertypes
WorkService, Service[Fail], Lifting[Fail], Serialized, FutureMonad, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. WorkServiceDefault
  2. WorkService
  3. Service
  4. Lifting
  5. Serialized
  6. FutureMonad
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new WorkServiceDefault(db: DB, authService: AuthService, schoolService: SchoolService, projectService: ProjectService, documentService: DocumentService, componentService: ComponentService, workRepository: WorkRepository, taskFeedbackRepository: TaskFeedbackRepository, taskScratchpadRepository: TaskScratchpadRepository, componentScratchpadRepository: ComponentScratchpadRepository)

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. val authService: AuthService

    Definition Classes
    WorkServiceDefaultWorkService
  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val componentScratchpadRepository: ComponentScratchpadRepository

    Definition Classes
    WorkServiceDefaultWorkService
  8. val componentService: ComponentService

    Definition Classes
    WorkServiceDefaultWorkService
  9. implicit def conn: Connection

  10. def createFeedback(studentId: UUID, taskId: UUID): Future[\/[Fail, TaskFeedback]]

    Create a teacher's feedback for a student's work on a task.

    Create a teacher's feedback for a student's work on a task.

    studentId
    taskId
    returns

    Definition Classes
    WorkServiceDefaultWorkService
  11. def createLongAnswerWork(userId: UUID, taskId: UUID, isComplete: Boolean): Future[\/[Fail, LongAnswerWork]]

    Create a long-answer work item.

    Create a long-answer work item.

    Use this method when entering student work on a task for the first time (in a given course).

    userId

    the unique id of the user the work belongs to

    taskId

    the unique id of the task the work is for

    isComplete

    whether the student is finished with the task

    returns

    a future disjunction containing either a work, or a failure

    Definition Classes
    WorkServiceDefaultWorkService
  12. def createMatchingWork(userId: UUID, taskId: UUID, isComplete: Boolean): Future[\/[Fail, MatchingWork]]

    Create a matching work item.

    Create a matching work item.

    Use this method when entering student work on a task for the first time (in a given course).

    userId

    the id of the student whose work is being entered

    taskId

    the task for which the work was done

    isComplete

    whether the student is finished with the task

    returns

    the newly created work

    Definition Classes
    WorkServiceDefaultWorkService
  13. def createMultipleChoiceWork(userId: UUID, taskId: UUID, isComplete: Boolean): Future[\/[Fail, MultipleChoiceWork]]

    Create a multiple-choice work item.

    Create a multiple-choice work item.

    Use this method when entering student work on a task for the first time (in a given course).

    userId

    the id of the student whose work is being entered

    taskId

    the task for which the work was done

    isComplete

    whether the student is finished with the task

    returns

    the newly created work

    Definition Classes
    WorkServiceDefaultWorkService
  14. def createOrderingWork(userId: UUID, taskId: UUID, isComplete: Boolean): Future[\/[Fail, OrderingWork]]

    Create an ordering work item.

    Create an ordering work item.

    Use this method when entering student work on a task for the first time (in a given course).

    userId

    the id of the student whose work is being entered

    taskId

    the task for which the work was done

    isComplete

    whether the student is finished with the task

    returns

    the newly created work

    Definition Classes
    WorkServiceDefaultWorkService
  15. def createShortAnswerWork(userId: UUID, taskId: UUID, isComplete: Boolean): Future[\/[Fail, ShortAnswerWork]]

    Create a short-answer work item.

    Create a short-answer work item.

    Use this method when entering student work on a task for the first time (in a given course).

    userId

    the id of the student whose work is being entered

    taskId

    the task for which the work was done

    isComplete

    whether the student is finished with the task

    returns

    the newly created work

    Definition Classes
    WorkServiceDefaultWorkService
  16. def createTaskScratchpad(userId: UUID, taskId: UUID): Future[\/[Fail, TaskScratchpad]]

    Create a new task task scratchpad.

    Create a new task task scratchpad.

    userId

    the unique ID of the user whose component scratchpad it is

    taskId

    the unique ID of the task this task scratchpad is for

    returns

    the updated task scratchpad

    Definition Classes
    WorkServiceDefaultWorkService
  17. val db: DB

    Database connection (pool).

    Database connection (pool). Services will take connections from this pool when making repository calls.

    Definition Classes
    WorkServiceDefaultService
  18. val documentService: DocumentService

    Definition Classes
    WorkServiceDefaultWorkService
  19. implicit def eitherRunner[B](eithert: EitherT[Future, Fail, B]): Future[\/[Fail, B]]

    Definition Classes
    Lifting
  20. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  22. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. def findFeedback(studentId: UUID, taskId: UUID): Future[\/[Fail, TaskFeedback]]

    Find a teacher's feedback for a student's work on a task.

    Find a teacher's feedback for a student's work on a task.

    studentId
    taskId
    returns

    Definition Classes
    WorkServiceDefaultWorkService
  24. def findTaskScratchpad(userId: UUID, taskId: UUID): Future[\/[Fail, TaskScratchpad]]

    Find the latest revision of a user's task scratchpad to a task.

    Find the latest revision of a user's task scratchpad to a task.

    userId

    the unique ID of the user to list for

    taskId

    the task within which to search for task scratchpads

    returns

    an optional response

    Definition Classes
    WorkServiceDefaultWorkService
  25. def findWork(userId: UUID, taskId: UUID, version: Long): Future[\/[Fail, Work]]

    Find a specific revision of a user's work, for a task, in a course.

    Find a specific revision of a user's work, for a task, in a course.

    userId

    the unique id of the user to filter by

    taskId

    the unique id of the task to filter by

    version

    the version of the work to find

    returns

    a future disjunction containing either a work, or a failure

    Definition Classes
    WorkServiceDefaultWorkService
  26. def findWork(userId: UUID, taskId: UUID): Future[\/[Fail, Work]]

    Find the latest revision of a user's work, for a task, in a course.

    Find the latest revision of a user's work, for a task, in a course.

    userId

    the unique id of the user to filter by

    taskId

    the unique id of the task to filter by

    returns

    a future disjunction containing either a work, or a failure

    Definition Classes
    WorkServiceDefaultWorkService
  27. def findWork(workId: UUID): Future[\/[Fail, Work]]

    Find the latest revision of a user's work, for a task, in a course.

    Find the latest revision of a user's work, for a task, in a course.

    workId

    the unique id of the work to find

    returns

    a future disjunction containing either a work, or a failure

    Definition Classes
    WorkServiceDefaultWorkService
  28. def forceComplete(taskId: UUID, justThis: Boolean = true): Future[\/[Fail, Unit]]

    Definition Classes
    WorkServiceDefaultWorkService
  29. implicit val futureMonad: Monad[Future]

    Definition Classes
    FutureMonad
  30. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  31. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  32. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  33. def lift[B]: (Future[\/[Fail, B]]) ⇒ EitherT[Future, Fail, B]

    Definition Classes
    Lifting
  34. def liftSeq[B](fIntermediate: Future[IndexedSeq[\/[Fail, B]]])(implicit ec: ExecutionContext): EitherT[Future, Fail, IndexedSeq[B]]

    Definition Classes
    Lifting
  35. def liftSeq[B](interList: IndexedSeq[Future[\/[Fail, B]]])(implicit ec: ExecutionContext): EitherT[Future, Fail, IndexedSeq[B]]

    Definition Classes
    Lifting
  36. def listFeedbacks(taskId: UUID): Future[\/[Fail, IndexedSeq[TaskFeedback]]]

    Find a teacher's feedback for a student's work on a task.

    Find a teacher's feedback for a student's work on a task.

    taskId
    returns

    Definition Classes
    WorkServiceDefaultWorkService
  37. def listFeedbacks(studentId: UUID, projectId: UUID): Future[\/[Fail, IndexedSeq[TaskFeedback]]]

    studentId
    projectId
    returns

    Definition Classes
    WorkServiceDefaultWorkService
  38. def listTaskScratchpads(userId: UUID, projectId: UUID): Future[\/[Fail, IndexedSeq[TaskScratchpad]]]

    List all of a user's task scratchpads in a project.

    List all of a user's task scratchpads in a project.

    userId

    the unique ID of the user to list for

    projectId

    the project within which to search for task scratchpads

    returns

    a vector of responses

    Definition Classes
    WorkServiceDefaultWorkService
  39. def listWork(taskId: UUID): Future[\/[Fail, IndexedSeq[Work]]]

    List the latest revision of all of a user's work in a project for a specific course.

    List the latest revision of all of a user's work in a project for a specific course.

    returns

    a future disjunction containing either a list of work, or a failure

    Definition Classes
    WorkServiceDefaultWorkService
  40. def listWork(userId: UUID, projectId: UUID): Future[\/[Fail, IndexedSeq[Work]]]

    List the latest revision of all of a user's work in a project for a specific course.

    List the latest revision of all of a user's work in a project for a specific course.

    userId

    the unique id of the user to filter by

    projectId

    the unique id of the project to filter by

    returns

    a future disjunction containing either a list of work, or a failure

    Definition Classes
    WorkServiceDefaultWorkService
  41. def listWorkRevisions(userId: UUID, taskId: UUID): Future[\/[Fail, Either[DocumentWork, IndexedSeq[ListWork[_ >: Int with Match]]]]]

    List all of a user's work revisions for a specific task in a specific course.

    List all of a user's work revisions for a specific task in a specific course.

    userId

    the unique id of the user to filter by

    taskId

    the unique id of the task to filter by

    returns

    a future disjunction containing either a list of work, or a failure

    Definition Classes
    WorkServiceDefaultWorkService
  42. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  43. final def notify(): Unit

    Definition Classes
    AnyRef
  44. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  45. def predicate(fCondition: Future[Boolean])(fail: Fail)(implicit ec: ExecutionContext): EitherT[Future, Fail, Unit]

    Definition Classes
    Lifting
  46. def predicate(condition: Boolean)(fail: Fail): EitherT[Future, Fail, Unit]

    Definition Classes
    Lifting
  47. val projectService: ProjectService

    Definition Classes
    WorkServiceDefaultWorkService
  48. val schoolService: SchoolService

    Definition Classes
    WorkServiceDefaultWorkService
  49. def serialized[E, R, L[E] <: IndexedSeq[E]](collection: L[E])(fn: (E) ⇒ Future[R])(implicit ec: ExecutionContext): Future[IndexedSeq[R]]

    Definition Classes
    Serialized
  50. def serializedT[E, R, L[E] <: IndexedSeq[E]](collection: L[E])(fn: (E) ⇒ Future[\/[Fail, R]])(implicit ec: ExecutionContext): Future[\/[Fail, IndexedSeq[R]]]

    Definition Classes
    Lifting
  51. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  52. val taskFeedbackRepository: TaskFeedbackRepository

    Definition Classes
    WorkServiceDefaultWorkService
  53. val taskScratchpadRepository: TaskScratchpadRepository

    Definition Classes
    WorkServiceDefaultWorkService
  54. def toString(): String

    Definition Classes
    AnyRef → Any
  55. def transactional[A](f: (Connection) ⇒ Future[A]): Future[A]

    Takes a function that returns a future, and runs it inside a database transaction.

    Takes a function that returns a future, and runs it inside a database transaction.

    Definition Classes
    Service
  56. def updateLongAnswerWork(userId: UUID, taskId: UUID, isComplete: Boolean): Future[\/[Fail, LongAnswerWork]]

    Update a long answer work.

    Update a long answer work.

    Because the contents of the work are handled by the Document service, this method only serves to update the work's completed status.

    Definition Classes
    WorkServiceDefaultWorkService
  57. def updateMatchingWork(userId: UUID, taskId: UUID, version: Long, response: IndexedSeq[Match], isComplete: Boolean): Future[\/[Fail, MatchingWork]]

    Definition Classes
    WorkServiceDefaultWorkService
  58. def updateMultipleChoiceWork(userId: UUID, taskId: UUID, version: Long, response: IndexedSeq[Int], isComplete: Boolean): Future[\/[Fail, MultipleChoiceWork]]

    Definition Classes
    WorkServiceDefaultWorkService
  59. def updateOrderingWork(userId: UUID, taskId: UUID, version: Long, response: IndexedSeq[Int], isComplete: Boolean): Future[\/[Fail, OrderingWork]]

    Definition Classes
    WorkServiceDefaultWorkService
  60. def updateShortAnswerWork(userId: UUID, taskId: UUID, isComplete: Boolean): Future[\/[Fail, ShortAnswerWork]]

    Update a short answer work.

    Update a short answer work.

    Because the contents of the work are handled by the Document service, this method only serves to update the work's completed status.

    Definition Classes
    WorkServiceDefaultWorkService
  61. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  62. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. val workRepository: WorkRepository

    Definition Classes
    WorkServiceDefaultWorkService

Inherited from WorkService

Inherited from Service[Fail]

Inherited from Lifting[Fail]

Inherited from Serialized

Inherited from FutureMonad

Inherited from AnyRef

Inherited from Any

Ungrouped