mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +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
|
@Override
|
||||||
public void afterPropertiesSet() throws Exception {
|
public void afterPropertiesSet() throws Exception {
|
||||||
for (Map.Entry<Integer, BitStoreService> storeEntry : stores.entrySet()) {
|
for (Map.Entry<Integer, BitStoreService> storeEntry : stores.entrySet()) {
|
||||||
|
@@ -191,4 +191,11 @@ public interface BitstreamStorageService {
|
|||||||
@Nullable
|
@Nullable
|
||||||
Long getLastModified(Bitstream bitstream) throws IOException;
|
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.content.service.BitstreamFormatService;
|
||||||
import org.dspace.services.ConfigurationService;
|
import org.dspace.services.ConfigurationService;
|
||||||
import org.dspace.services.factory.DSpaceServicesFactory;
|
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.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@@ -30,6 +32,9 @@ public class BitstreamJCloudBitstoreTest extends BitstreamTest {
|
|||||||
private final ConfigurationService configurationService
|
private final ConfigurationService configurationService
|
||||||
= DSpaceServicesFactory.getInstance().getConfigurationService();
|
= DSpaceServicesFactory.getInstance().getConfigurationService();
|
||||||
|
|
||||||
|
protected BitstreamStorageService bitstreamService = StorageServiceFactory.getInstance()
|
||||||
|
.getBitstreamStorageService();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will be run before every test as per @Before. It will
|
* This method will be run before every test as per @Before. It will
|
||||||
@@ -41,7 +46,7 @@ public class BitstreamJCloudBitstoreTest extends BitstreamTest {
|
|||||||
@Before
|
@Before
|
||||||
@Override
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
configurationService.setProperty("assetstore.index.primary", "2");
|
bitstreamService.setIncomingExternal(2);
|
||||||
super.init();
|
super.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +70,7 @@ public class BitstreamJCloudBitstoreTest extends BitstreamTest {
|
|||||||
@After
|
@After
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
configurationService.setProperty("assetstore.index.primary", "0");
|
bitstreamService.setIncomingExternal(0);
|
||||||
super.destroy();
|
super.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user