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 Summary
FieldsModifier and TypeFieldDescriptionprotected org.opencastproject.db.DBSessionprotected org.opencastproject.db.DBSessionFactoryprotected javax.persistence.EntityManagerFactoryThe factory used to generate the entity managerstatic final StringJPA persistence unit nameprotected org.opencastproject.security.api.SecurityServiceOpencast's security service -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()org.opencastproject.annotation.api.AnnotationaddAnnotation(org.opencastproject.annotation.api.Annotation a) org.opencastproject.annotation.api.AnnotationchangeAnnotation(org.opencastproject.annotation.api.Annotation a) voidorg.opencastproject.annotation.api.AnnotationgetAnnotation(long id) org.opencastproject.annotation.api.AnnotationListgetAnnotations(int offset, int limit) org.opencastproject.annotation.api.AnnotationListgetAnnotationsByDay(String day, int offset, int limit) org.opencastproject.annotation.api.AnnotationListgetAnnotationsByMediapackageId(String mediapackageId, int offset, int limit) org.opencastproject.annotation.api.AnnotationListgetAnnotationsByType(String type, int offset, int limit) org.opencastproject.annotation.api.AnnotationListgetAnnotationsByTypeAndDay(String type, String day, int offset, int limit) org.opencastproject.annotation.api.AnnotationListgetAnnotationsByTypeAndMediapackageId(String type, String mediapackageId, int offset, int limit) booleanremoveAnnotation(org.opencastproject.annotation.api.Annotation a) voidsetDBSessionFactory(org.opencastproject.db.DBSessionFactory dbSessionFactory) voidsetSecurityService(org.opencastproject.security.api.SecurityService securityService) Sets the opencast security service
-
Field Details
-
PERSISTENCE_UNIT
JPA persistence unit name- See Also:
-
emf
protected javax.persistence.EntityManagerFactory emfThe 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 securityServiceOpencast'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:
addAnnotationin interfaceorg.opencastproject.annotation.api.AnnotationService
-
removeAnnotation
public boolean removeAnnotation(org.opencastproject.annotation.api.Annotation a) - Specified by:
removeAnnotationin interfaceorg.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:
changeAnnotationin interfaceorg.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:
getAnnotationin interfaceorg.opencastproject.annotation.api.AnnotationService- Throws:
org.opencastproject.util.NotFoundException
-
getAnnotations
public org.opencastproject.annotation.api.AnnotationList getAnnotations(int offset, int limit) - Specified by:
getAnnotationsin interfaceorg.opencastproject.annotation.api.AnnotationService
-
getAnnotationsByTypeAndMediapackageId
public org.opencastproject.annotation.api.AnnotationList getAnnotationsByTypeAndMediapackageId(String type, String mediapackageId, int offset, int limit) - Specified by:
getAnnotationsByTypeAndMediapackageIdin interfaceorg.opencastproject.annotation.api.AnnotationService
-
getAnnotationsByMediapackageId
public org.opencastproject.annotation.api.AnnotationList getAnnotationsByMediapackageId(String mediapackageId, int offset, int limit) - Specified by:
getAnnotationsByMediapackageIdin interfaceorg.opencastproject.annotation.api.AnnotationService
-
getAnnotationsByTypeAndDay
public org.opencastproject.annotation.api.AnnotationList getAnnotationsByTypeAndDay(String type, String day, int offset, int limit) - Specified by:
getAnnotationsByTypeAndDayin interfaceorg.opencastproject.annotation.api.AnnotationService
-
getAnnotationsByDay
public org.opencastproject.annotation.api.AnnotationList getAnnotationsByDay(String day, int offset, int limit) - Specified by:
getAnnotationsByDayin interfaceorg.opencastproject.annotation.api.AnnotationService
-
getAnnotationsByType
public org.opencastproject.annotation.api.AnnotationList getAnnotationsByType(String type, int offset, int limit) - Specified by:
getAnnotationsByTypein interfaceorg.opencastproject.annotation.api.AnnotationService
-