ca.shiftfocus.krispii.core.services

ComponentServiceDefault

Related Doc: package services

class ComponentServiceDefault extends ComponentService

Linear Supertypes
ComponentService, Service[Fail], Lifting[Fail], Serialized, FutureMonad, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ComponentServiceDefault
  2. ComponentService
  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 ComponentServiceDefault(db: DB, scalaCache: ScalaCachePool, authService: AuthService, projectService: ProjectService, schoolService: SchoolService, componentRepository: ComponentRepository)

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. def addToPart(componentId: UUID, partId: UUID): Future[\/[Fail, Component]]

    Add a component to a specific part.

    Add a component to a specific part.

    This associates a component with a project part. When that part is enabled for a course, users in that course will be able to access that component in their enabled components list.

    componentId

    the unique ID of the component to add

    partId

    the unique ID of the part to add the component to

    Definition Classes
    ComponentServiceDefaultComponentService
  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. val authService: AuthService

  7. implicit def cache: ScalaCachePool

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val componentRepository: ComponentRepository

  10. implicit def conn: Connection

  11. def createAudio(ownerId: UUID, title: String, questions: String, thingsToThinkAbout: String, soundcloudId: String): Future[\/[Fail, Component]]

  12. def createText(ownerId: UUID, title: String, questions: String, thingsToThinkAbout: String, content: String): Future[\/[Fail, Component]]

  13. def createVideo(ownerId: UUID, title: String, questions: String, thingsToThinkAbout: String, vimeoId: String, height: Int, width: Int): Future[\/[Fail, Component]]

  14. val db: DB

    Database connection (pool).

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

    Definition Classes
    ComponentServiceDefaultService
  15. def delete(id: UUID, version: Long): Future[\/[Fail, Component]]

  16. def detaggify(text: String): String

    Replace "tags" in a text block with the approriate HTML embed code.

    Replace "tags" in a text block with the approriate HTML embed code.

    Scans text for tags, and then replaces them with the appropriate components.

    text
    returns

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

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

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

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

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

    Find a single component by ID.

    Find a single component by ID.

    id

    the unique ID of the component to load.

    returns

    an optional component

    Definition Classes
    ComponentServiceDefaultComponentService
  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. final def isInstanceOf[T0]: Boolean

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

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

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

    Definition Classes
    Lifting
  29. def list: Future[\/[Fail, IndexedSeq[Component]]]

    List all components.

    List all components.

    returns

    an array of components

    Definition Classes
    ComponentServiceDefaultComponentService
  30. def listByPart(partId: UUID): Future[\/[Fail, IndexedSeq[Component]]]

    List components by part ID.

    List components by part ID.

    partId

    the unique ID of the part to filter by

    returns

    an array of components

    Definition Classes
    ComponentServiceDefaultComponentService
  31. def listByProject(projectId: UUID, forceAll: Boolean = false): Future[\/[Fail, IndexedSeq[Component]]]

    List components by project and user, thus listing "enabled" components.

    List components by project and user, thus listing "enabled" components.

    A user can view components that are enabled in any of their courses.

    projectId

    the unique ID of the part to filter by

    returns

    an array of components

    Definition Classes
    ComponentServiceDefaultComponentService
  32. final def ne(arg0: AnyRef): Boolean

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

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

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

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

    Definition Classes
    Lifting
  37. val projectService: ProjectService

  38. def removeFromPart(componentId: UUID, partId: UUID): Future[\/[Fail, Component]]

    Remove a component from a specific part.

    Remove a component from a specific part.

    This disassociates a component with a project part. When that part is enabled for a course, users in that course will be able to access that component in their enabled components list.

    componentId

    the unique ID of the component to remove

    partId

    the unique ID of the part to remove the component from

    returns

    the operation was successful

    Definition Classes
    ComponentServiceDefaultComponentService
  39. val scalaCache: ScalaCachePool

  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 updateAudio(id: UUID, version: Long, ownerId: UUID, title: Option[String], questions: Option[String], thingsToThinkAbout: Option[String], soundcloudId: Option[String]): Future[\/[Fail, Component]]

  47. def updateText(id: UUID, version: Long, ownerId: UUID, title: Option[String], questions: Option[String], thingsToThinkAbout: Option[String], content: Option[String]): Future[\/[Fail, Component]]

  48. def updateVideo(id: UUID, version: Long, ownerId: UUID, title: Option[String], questions: Option[String], thingsToThinkAbout: Option[String], vimeoId: Option[String], width: Option[Int], height: Option[Int]): Future[\/[Fail, Component]]

  49. def userCanAccess(component: Component, user: User): Future[\/[Fail, Boolean]]

    Can a given user access a given component.

    Can a given user access a given component.

    returns

    Definition Classes
    ComponentServiceDefaultComponentService
  50. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ComponentService

Inherited from Service[Fail]

Inherited from Lifting[Fail]

Inherited from Serialized

Inherited from FutureMonad

Inherited from AnyRef

Inherited from Any

Ungrouped