Class AwsAssetDatabaseImpl
java.lang.Object
org.opencastproject.assetmanager.aws.persistence.AwsAssetDatabaseImpl
- All Implemented Interfaces:
AwsAssetDatabase
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.opencastproject.db.DBSessionprotected org.opencastproject.db.DBSessionFactoryprotected javax.persistence.EntityManagerFactoryFactory used to createEntityManagers for transactionsstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) OSGi callback.voiddeactivate(org.osgi.service.component.ComponentContext cc) OSGi callback.voiddeleteMapping(org.opencastproject.assetmanager.api.storage.StoragePath path) findAllByMediaPackage(String mpId) findMapping(org.opencastproject.assetmanager.api.storage.StoragePath path) findMappingsByKey(String objectKey) findMappingsByMediaPackageAndVersion(org.opencastproject.assetmanager.api.storage.StoragePath path) voidsetDBSessionFactory(org.opencastproject.db.DBSessionFactory dbSessionFactory) voidsetEntityManagerFactory(javax.persistence.EntityManagerFactory emf) OSGi DIstoreMapping(org.opencastproject.assetmanager.api.storage.StoragePath path, String objectKey, String objectVersion)
-
Field Details
-
PERSISTENCE_UNIT
- See Also:
-
emf
protected javax.persistence.EntityManagerFactory emfFactory used to createEntityManagers for transactions -
dbSessionFactory
protected org.opencastproject.db.DBSessionFactory dbSessionFactory -
db
protected org.opencastproject.db.DBSession db
-
-
Constructor Details
-
AwsAssetDatabaseImpl
public AwsAssetDatabaseImpl()
-
-
Method Details
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) OSGi callback. -
deactivate
public void deactivate(org.osgi.service.component.ComponentContext cc) OSGi callback. Closes entity manager factory. -
setEntityManagerFactory
public void setEntityManagerFactory(javax.persistence.EntityManagerFactory emf) OSGi DI -
setDBSessionFactory
public void setDBSessionFactory(org.opencastproject.db.DBSessionFactory dbSessionFactory) -
storeMapping
public AwsAssetMapping storeMapping(org.opencastproject.assetmanager.api.storage.StoragePath path, String objectKey, String objectVersion) throws AwsAssetDatabaseException - Specified by:
storeMappingin interfaceAwsAssetDatabase- Throws:
AwsAssetDatabaseException
-
deleteMapping
public void deleteMapping(org.opencastproject.assetmanager.api.storage.StoragePath path) throws AwsAssetDatabaseException - Specified by:
deleteMappingin interfaceAwsAssetDatabase- Throws:
AwsAssetDatabaseException
-
findMapping
public AwsAssetMapping findMapping(org.opencastproject.assetmanager.api.storage.StoragePath path) throws AwsAssetDatabaseException - Specified by:
findMappingin interfaceAwsAssetDatabase- Throws:
AwsAssetDatabaseException
-
findMappingsByKey
- Specified by:
findMappingsByKeyin interfaceAwsAssetDatabase- Throws:
AwsAssetDatabaseException
-
findMappingsByMediaPackageAndVersion
public List<AwsAssetMapping> findMappingsByMediaPackageAndVersion(org.opencastproject.assetmanager.api.storage.StoragePath path) throws AwsAssetDatabaseException - Specified by:
findMappingsByMediaPackageAndVersionin interfaceAwsAssetDatabase- Throws:
AwsAssetDatabaseException
-
findAllByMediaPackage
- Specified by:
findAllByMediaPackagein interfaceAwsAssetDatabase- Throws:
AwsAssetDatabaseException
-