mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 06:53:09 +00:00
Merge branch 'feature-jcloud-store-7.4' into feature-jcloud-store-7.6
This commit is contained in:
@@ -90,6 +90,11 @@ public class BitstreamStorageServiceImpl implements BitstreamStorageService, Ini
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIncomingExternal(int incoming) {
|
||||
this.incoming = incoming;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
for (Map.Entry<Integer, BitStoreService> storeEntry : stores.entrySet()) {
|
||||
|
@@ -191,4 +191,11 @@ public interface BitstreamStorageService {
|
||||
@Nullable
|
||||
Long getLastModified(Bitstream bitstream) throws IOException;
|
||||
|
||||
|
||||
/**
|
||||
* Sets the number for the incoming store
|
||||
* @param incoming
|
||||
*/
|
||||
public void setIncomingExternal(int incoming);
|
||||
|
||||
}
|
||||
|
@@ -13,6 +13,8 @@ import org.dspace.content.factory.ContentServiceFactory;
|
||||
import org.dspace.content.service.BitstreamFormatService;
|
||||
import org.dspace.services.ConfigurationService;
|
||||
import org.dspace.services.factory.DSpaceServicesFactory;
|
||||
import org.dspace.storage.bitstore.factory.StorageServiceFactory;
|
||||
import org.dspace.storage.bitstore.service.BitstreamStorageService;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -30,6 +32,9 @@ public class BitstreamJCloudBitstoreTest extends BitstreamTest {
|
||||
private final ConfigurationService configurationService
|
||||
= DSpaceServicesFactory.getInstance().getConfigurationService();
|
||||
|
||||
protected BitstreamStorageService bitstreamService = StorageServiceFactory.getInstance()
|
||||
.getBitstreamStorageService();
|
||||
|
||||
|
||||
/**
|
||||
* This method will be run before every test as per @Before. It will
|
||||
@@ -41,7 +46,7 @@ public class BitstreamJCloudBitstoreTest extends BitstreamTest {
|
||||
@Before
|
||||
@Override
|
||||
public void init() {
|
||||
configurationService.setProperty("assetstore.index.primary", "2");
|
||||
bitstreamService.setIncomingExternal(2);
|
||||
super.init();
|
||||
}
|
||||
|
||||
@@ -65,7 +70,7 @@ public class BitstreamJCloudBitstoreTest extends BitstreamTest {
|
||||
@After
|
||||
@Override
|
||||
public void destroy() {
|
||||
configurationService.setProperty("assetstore.index.primary", "0");
|
||||
bitstreamService.setIncomingExternal(0);
|
||||
super.destroy();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user