ca.shiftfocus.krispii.core.services

ScheduleServiceDefault

Related Doc: package services

class ScheduleServiceDefault extends ScheduleService

Linear Supertypes
ScheduleService, Service[Fail], Lifting[Fail], Serialized, FutureMonad, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ScheduleServiceDefault
  2. ScheduleService
  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 ScheduleServiceDefault(db: DB, scalaCache: ScalaCache, authService: AuthService, schoolService: SchoolService, projectService: ProjectService, courseScheduleRepository: CourseScheduleRepository, courseScheduleExceptionRepository: CourseScheduleExceptionRepository)

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

  6. implicit def cache: ScalaCache

  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. implicit def conn: Connection

  9. val courseScheduleExceptionRepository: CourseScheduleExceptionRepository

  10. val courseScheduleRepository: CourseScheduleRepository

  11. def createSchedule(courseId: UUID, day: LocalDate, startTime: LocalTime, endTime: LocalTime, description: String): Future[\/[Fail, CourseSchedule]]

    Create a new course schedule.

    Create a new course schedule.

    courseId

    the ID of the course this scheduled time belongs to

    day

    the date on which this schedule is scheduled

    startTime

    the time of day that the schedule starts

    endTime

    the time of day that the schedule ends

    description

    a brief description may be entered

    returns

    the newly created course schedule

    Definition Classes
    ScheduleServiceDefaultScheduleService
  12. def createScheduleException(userId: UUID, courseId: UUID, day: LocalDate, startTime: LocalTime, endTime: LocalTime, description: String): Future[\/[Fail, CourseScheduleException]]

    userId
    courseId
    day
    startTime
    endTime
    description
    returns

    Definition Classes
    ScheduleServiceDefaultScheduleService
  13. val db: DB

    Database connection (pool).

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

    Definition Classes
    ScheduleServiceDefaultService
  14. def deleteSchedule(id: UUID, version: Long): Future[\/[Fail, CourseSchedule]]

    Deletes a course schedule.

    Deletes a course schedule.

    id

    the ID of the schedule to delete

    version

    the current version of the schedule for optimistic offline lock

    returns

    a boolean indicating success or failure

    Definition Classes
    ScheduleServiceDefaultScheduleService
  15. def deleteScheduleException(id: UUID, version: Long): Future[\/[Fail, CourseScheduleException]]

    id
    version
    returns

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

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def findSchedule(id: UUID): Future[\/[Fail, CourseSchedule]]

    Find a schedule by its id.

    Find a schedule by its id.

    id
    returns

    Definition Classes
    ScheduleServiceDefaultScheduleService
  21. def findScheduleException(id: UUID): Future[\/[Fail, CourseScheduleException]]

    Find a specific schedule exception object by ID.

    Find a specific schedule exception object by ID.

    id

    the unique identifier

    returns

    a future disjunction containing either a failure, or the schedule exception

    Definition Classes
    ScheduleServiceDefaultScheduleService
  22. implicit val futureMonad: Monad[Future]

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

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

    Definition Classes
    AnyRef → Any
  25. def isCourseScheduledForUser(courseId: UUID, userId: UUID, currentDay: LocalDate, currentTime: LocalTime): Future[\/[Fail, Boolean]]

    courseId
    userId
    currentDay
    currentTime
    returns

    Definition Classes
    ScheduleServiceDefaultScheduleService
  26. def isCourseScheduledForUser(courseSlug: String, userId: UUID, currentDay: LocalDate, currentTime: LocalTime): Future[\/[Fail, Boolean]]

    courseSlug
    userId
    currentDay
    currentTime
    returns

    Definition Classes
    ScheduleServiceDefaultScheduleService
  27. final def isInstanceOf[T0]: Boolean

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

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

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

    Definition Classes
    Lifting
  31. def listScheduleExceptionsByCourse(courseId: UUID): Future[\/[Fail, IndexedSeq[CourseScheduleException]]]

    Lists schedule exceptions for all students for one course.

    Lists schedule exceptions for all students for one course.

    courseId
    returns

    Definition Classes
    ScheduleServiceDefaultScheduleService
  32. def listSchedulesByCourse(id: UUID): Future[\/[Fail, IndexedSeq[CourseSchedule]]]

    List all schedules for a specific course.

    List all schedules for a specific course.

    id

    the UUID of the course to list for.

    returns

    a vector of the given course's schedules

    Definition Classes
    ScheduleServiceDefaultScheduleService
  33. final def ne(arg0: AnyRef): Boolean

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

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

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

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

    Definition Classes
    Lifting
  38. val projectService: ProjectService

  39. val scalaCache: ScalaCache

  40. val schoolService: SchoolService

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

    Definition Classes
    Serialized
  42. 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
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  44. def toString(): String

    Definition Classes
    AnyRef → Any
  45. 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
  46. def updateSchedule(id: UUID, version: Long, courseId: Option[UUID], day: Option[LocalDate], startTime: Option[LocalTime], endTime: Option[LocalTime], description: Option[String]): Future[\/[Fail, CourseSchedule]]

    Update an existing course schedule.

    Update an existing course schedule.

    courseId

    the ID of the course this scheduled time belongs to

    day

    the date on which this schedule is scheduled

    startTime

    the time of day that the schedule starts

    endTime

    the time of day that the schedule ends

    description

    a brief description may be entered

    returns

    the newly created course schedule

    Definition Classes
    ScheduleServiceDefaultScheduleService
  47. def updateScheduleException(id: UUID, version: Long, day: Option[LocalDate], startTime: Option[LocalTime], endTime: Option[LocalTime], description: Option[String]): Future[\/[Fail, CourseScheduleException]]

    id
    version
    day
    startTime
    endTime
    description
    returns

    Definition Classes
    ScheduleServiceDefaultScheduleService
  48. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ScheduleService

Inherited from Service[Fail]

Inherited from Lifting[Fail]

Inherited from Serialized

Inherited from FutureMonad

Inherited from AnyRef

Inherited from Any

Ungrouped