use of org.opencastproject.assetmanager.impl.AbstractAssetManager in project opencast by opencast.
the class SchedulerServiceImplTest method mkAssetManager.
AssetManager mkAssetManager() throws Exception {
final PersistenceEnv penv = PersistenceEnvs.mk(mkEntityManagerFactory("org.opencastproject.assetmanager.impl"));
final Database db = new Database(penv);
return new AbstractAssetManager() {
@Override
public HttpAssetProvider getHttpAssetProvider() {
// identity provider
return new HttpAssetProvider() {
@Override
public Snapshot prepareForDelivery(Snapshot snapshot) {
return snapshot;
}
};
}
@Override
public Database getDb() {
return db;
}
@Override
protected Workspace getWorkspace() {
return workspace;
}
@Override
public AssetStore getAssetStore() {
return mkAssetStore();
}
@Override
protected String getCurrentOrgId() {
return DefaultOrganization.DEFAULT_ORGANIZATION_ID;
}
};
}
use of org.opencastproject.assetmanager.impl.AbstractAssetManager in project opencast by opencast.
the class TestTasksEndpoint method mkAssetManager.
AssetManager mkAssetManager(final Workspace workspace) throws Exception {
final PersistenceEnv penv = PersistenceEnvs.mk(mkEntityManagerFactory("org.opencastproject.assetmanager.impl"));
final Database db = new Database(penv);
return new AbstractAssetManager() {
@Override
public HttpAssetProvider getHttpAssetProvider() {
// identity provider
return new HttpAssetProvider() {
@Override
public Snapshot prepareForDelivery(Snapshot snapshot) {
return snapshot;
}
};
}
@Override
public Database getDb() {
return db;
}
@Override
protected Workspace getWorkspace() {
return workspace;
}
@Override
public AssetStore getAssetStore() {
return mkAssetStore(workspace);
}
@Override
protected String getCurrentOrgId() {
return DefaultOrganization.DEFAULT_ORGANIZATION_ID;
}
};
}
Aggregations