Fix small issues

This commit is contained in:
Jelle Pelgrims
2019-08-13 13:06:51 +02:00
parent d2470286a6
commit 1831c4f92d
3 changed files with 11 additions and 119 deletions

View File

@@ -135,7 +135,7 @@ public class CollectionHarvestSettingsController {
harvestedCollectionService.delete(context, harvestedCollection);
} else if (harvestedCollectionRest.getHarvestType() != HarvestTypeEnum.NONE.getValue()) {
List<String> errors = testHarvestSettings(collection, harvestedCollectionRest);
List<String> errors = testHarvestSettings(harvestedCollectionRest);
if (errors.size() == 0) {
if (harvestedCollection == null) {
@@ -159,8 +159,7 @@ public class CollectionHarvestSettingsController {
* @param harvestedCollectionRest A object containg the harvest settings to be tested
* @return
*/
private List<String> testHarvestSettings(Collection collection,
HarvestedCollectionRest harvestedCollectionRest) {
private List<String> testHarvestSettings(HarvestedCollectionRest harvestedCollectionRest) {
int harvestType = harvestedCollectionRest.getHarvestType();
String metadataConfigId = harvestedCollectionRest.getMetadataConfigId();

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
default-lazy-init="true">
<!-- Replace harvestCollectionService with a mocked service -->
<bean class="org.dspace.harvest.MockHarvestedCollectionServiceImpl" id="org.dspace.harvest.service.HarvestedCollectionService"/>
</beans>

View File

@@ -1,116 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
default-lazy-init="true">
<!-- ******************** -->
<!-- Service declarations -->
<!-- ******************** -->
<bean class="org.dspace.app.requestitem.RequestItemServiceImpl"/>
<bean class="org.dspace.app.itemexport.ItemExportServiceImpl"/>
<!--Ensure that bean remains prototype ! Uses setters to set certain properties such as should is pass through workflow-->
<bean class="org.dspace.app.itemimport.ItemImportServiceImpl" scope="prototype"/>
<!--Ensure that bean remains prototype ! -->
<bean class="org.dspace.app.mediafilter.MediaFilterServiceImpl" scope="prototype"/>
<bean class="org.dspace.app.sfx.SFXFileReaderServiceImpl" scope="prototype"/>
<bean class="org.dspace.app.util.MetadataExposureServiceImpl"/>
<bean class="org.dspace.app.util.OpenSearchServiceImpl"/>
<bean class="org.dspace.app.util.WebAppServiceImpl"/>
<bean class="org.dspace.authenticate.AuthenticationServiceImpl"/>
<bean class="org.dspace.authorize.AuthorizeServiceImpl"/>
<bean class="org.dspace.authorize.ResourcePolicyServiceImpl"/>
<bean class="org.dspace.authority.AuthorityValueServiceImpl"/>
<bean class="org.dspace.authority.AuthorityServiceImpl"/>
<bean class="org.dspace.checker.ChecksumHistoryServiceImpl"/>
<bean class="org.dspace.checker.ChecksumResultServiceImpl"/>
<bean class="org.dspace.checker.MostRecentChecksumServiceImpl"/>
<bean class="org.dspace.checker.SimpleReporterServiceImpl"/>
<bean class="org.dspace.content.CollectionServiceImpl"/>
<bean class="org.dspace.content.BitstreamFormatServiceImpl"/>
<bean class="org.dspace.content.BitstreamServiceImpl"/>
<bean class="org.dspace.content.BundleServiceImpl"/>
<bean class="org.dspace.content.CommunityServiceImpl"/>
<bean class="org.dspace.content.InstallItemServiceImpl"/>
<bean class="org.dspace.content.ItemServiceImpl"/>
<bean class="org.dspace.content.MetadataFieldServiceImpl"/>
<bean class="org.dspace.content.MetadataSchemaServiceImpl"/>
<bean class="org.dspace.content.MetadataValueServiceImpl"/>
<bean class="org.dspace.content.SiteServiceImpl"/>
<bean class="org.dspace.content.SupervisedItemServiceImpl"/>
<bean class="org.dspace.content.WorkspaceItemServiceImpl"/>
<bean class="org.dspace.content.RelationshipServiceImpl"/>
<bean class="org.dspace.content.EntityTypeServiceImpl"/>
<bean class="org.dspace.content.EntityServiceImpl"/>
<bean class="org.dspace.content.RelationshipTypeServiceImpl"/>
<bean class="org.dspace.content.authority.ChoiceAuthorityServiceImpl"/>
<bean class="org.dspace.content.authority.MetadataAuthorityServiceImpl" lazy-init="true"/>
<!-- Ensure PluginService is initialized properly via init() method -->
<bean class="org.dspace.core.LegacyPluginServiceImpl" init-method="init"/>
<bean class="org.dspace.core.LicenseServiceImpl"/>
<bean class="org.dspace.core.NewsServiceImpl">
<property name="acceptableFilenames">
<list>
<value>news-top.html</value>
<value>news-side.html</value>
</list>
</property>
</bean>
<!-- Ensure WorkflowCuratorService is initialized properly via init() method -->
<bean class="org.dspace.curate.WorkflowCuratorServiceImpl" init-method="init"/>
<bean class="org.dspace.disseminate.CitationDocumentServiceImpl"/>
<!-- Ensure EmbargoService is initialized properly via init() method -->
<bean class="org.dspace.embargo.EmbargoServiceImpl" init-method="init"/>
<bean class="org.dspace.eperson.AccountServiceImpl"/>
<bean class="org.dspace.eperson.EPersonServiceImpl"/>
<bean class="org.dspace.eperson.GroupServiceImpl"/>
<bean class="org.dspace.eperson.RegistrationDataServiceImpl"/>
<bean class="org.dspace.eperson.SubscribeServiceImpl"/>
<bean class="org.dspace.eperson.SupervisorServiceImpl"/>
<bean class="org.dspace.event.EventServiceImpl"/>
<bean class="org.dspace.handle.HandleServiceImpl"/>
<!-- Replace harvestCollectionService with a mocked service -->
<bean class="org.dspace.harvest.MockHarvestedCollectionServiceImpl" id="org.dspace.harvest.service.HarvestedCollectionService"/>
<bean class="org.dspace.harvest.HarvestedItemServiceImpl"/>
<bean class="org.dspace.harvest.HarvestSchedulingServiceImpl"/>
<bean class="org.dspace.identifier.DOIServiceImpl"/>
<bean class="org.dspace.license.CreativeCommonsServiceImpl"/>
<bean id="spiderDetectorService" class="org.dspace.statistics.util.SpiderDetectorServiceImpl"/>
<bean id="clientInfoService" class="org.dspace.service.impl.ClientInfoServiceImpl"/>
<bean class="org.dspace.versioning.VersionHistoryServiceImpl"/>
<!-- Configurable workflow services -->
<bean class="org.dspace.xmlworkflow.storedcomponents.ClaimedTaskServiceImpl"/>
<bean class="org.dspace.xmlworkflow.storedcomponents.CollectionRoleServiceImpl"/>
<bean class="org.dspace.xmlworkflow.storedcomponents.InProgressUserServiceImpl"/>
<bean class="org.dspace.xmlworkflow.storedcomponents.PoolTaskServiceImpl"/>
<bean class="org.dspace.xmlworkflow.storedcomponents.WorkflowItemRoleServiceImpl"/>
<bean class="org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItemServiceImpl"/>
<bean class="org.dspace.xmlworkflow.XmlWorkflowServiceImpl"/>
<bean class="org.dspace.xmlworkflow.WorkflowRequirementsServiceImpl"/>
<bean class="org.dspace.xmlworkflow.XmlWorkflowFactoryImpl"/>
</beans>