Class AnnotationServiceJpaImpl

java.lang.Object
org.opencastproject.annotation.impl.AnnotationServiceJpaImpl
All Implemented Interfaces:
org.opencastproject.annotation.api.AnnotationService

public class AnnotationServiceJpaImpl extends Object implements org.opencastproject.annotation.api.AnnotationService
JPA-based implementation of the AnnotationService
  • Field Details

    • PERSISTENCE_UNIT

      public static final String PERSISTENCE_UNIT
      JPA persistence unit name
      See Also:
    • emf

      protected javax.persistence.EntityManagerFactory emf
      The factory used to generate the entity manager
    • dbSessionFactory

      protected org.opencastproject.db.DBSessionFactory dbSessionFactory
    • db

      protected org.opencastproject.db.DBSession db
    • securityService

      protected org.opencastproject.security.api.SecurityService securityService
      Opencast's security service
  • Constructor Details

    • AnnotationServiceJpaImpl

      public AnnotationServiceJpaImpl()
  • Method Details

    • setDBSessionFactory

      public void setDBSessionFactory(org.opencastproject.db.DBSessionFactory dbSessionFactory)
    • activate

      public void activate()
    • deactivate

      public void deactivate()
    • setSecurityService

      public void setSecurityService(org.opencastproject.security.api.SecurityService securityService)
      Sets the opencast security service
      Parameters:
      securityService - the securityService to set
    • addAnnotation

      public org.opencastproject.annotation.api.Annotation addAnnotation(org.opencastproject.annotation.api.Annotation a)
      Specified by:
      addAnnotation in interface org.opencastproject.annotation.api.AnnotationService
    • removeAnnotation

      public boolean removeAnnotation(org.opencastproject.annotation.api.Annotation a)
      Specified by:
      removeAnnotation in interface org.opencastproject.annotation.api.AnnotationService
    • changeAnnotation

      public org.opencastproject.annotation.api.Annotation changeAnnotation(org.opencastproject.annotation.api.Annotation a) throws org.opencastproject.util.NotFoundException
      Specified by:
      changeAnnotation in interface org.opencastproject.annotation.api.AnnotationService
      Throws:
      org.opencastproject.util.NotFoundException
    • getAnnotation

      public org.opencastproject.annotation.api.Annotation getAnnotation(long id) throws org.opencastproject.util.NotFoundException
      Specified by:
      getAnnotation in interface org.opencastproject.annotation.api.AnnotationService
      Throws:
      org.opencastproject.util.NotFoundException
    • getAnnotations

      public org.opencastproject.annotation.api.AnnotationList getAnnotations(int offset, int limit)
      Specified by:
      getAnnotations in interface org.opencastproject.annotation.api.AnnotationService
    • getAnnotationsByTypeAndMediapackageId

      public org.opencastproject.annotation.api.AnnotationList getAnnotationsByTypeAndMediapackageId(String type, String mediapackageId, int offset, int limit)
      Specified by:
      getAnnotationsByTypeAndMediapackageId in interface org.opencastproject.annotation.api.AnnotationService
    • getAnnotationsByMediapackageId

      public org.opencastproject.annotation.api.AnnotationList getAnnotationsByMediapackageId(String mediapackageId, int offset, int limit)
      Specified by:
      getAnnotationsByMediapackageId in interface org.opencastproject.annotation.api.AnnotationService
    • getAnnotationsByTypeAndDay

      public org.opencastproject.annotation.api.AnnotationList getAnnotationsByTypeAndDay(String type, String day, int offset, int limit)
      Specified by:
      getAnnotationsByTypeAndDay in interface org.opencastproject.annotation.api.AnnotationService
    • getAnnotationsByDay

      public org.opencastproject.annotation.api.AnnotationList getAnnotationsByDay(String day, int offset, int limit)
      Specified by:
      getAnnotationsByDay in interface org.opencastproject.annotation.api.AnnotationService
    • getAnnotationsByType

      public org.opencastproject.annotation.api.AnnotationList getAnnotationsByType(String type, int offset, int limit)
      Specified by:
      getAnnotationsByType in interface org.opencastproject.annotation.api.AnnotationService