mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +00:00
Added a method to clear controller in cas
This commit is contained in:
@@ -220,6 +220,9 @@ public final class ChoiceAuthorityServiceImpl implements ChoiceAuthorityService
|
|||||||
return controller;
|
return controller;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearController() {
|
||||||
|
controller.clear();
|
||||||
|
}
|
||||||
private void loadChoiceAuthorityConfigurations() {
|
private void loadChoiceAuthorityConfigurations() {
|
||||||
// Get all configuration keys starting with a given prefix
|
// Get all configuration keys starting with a given prefix
|
||||||
List<String> propKeys = configurationService.getPropertyKeys(CHOICES_PLUGIN_PREFIX);
|
List<String> propKeys = configurationService.getPropertyKeys(CHOICES_PLUGIN_PREFIX);
|
||||||
|
@@ -168,4 +168,6 @@ public interface ChoiceAuthorityService {
|
|||||||
|
|
||||||
public ChoiceAuthority getChoiceAuthorityByAuthorityName(String authorityName);
|
public ChoiceAuthority getChoiceAuthorityByAuthorityName(String authorityName);
|
||||||
|
|
||||||
|
public void clearController();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -19,6 +19,7 @@ import org.apache.solr.client.solrj.response.QueryResponse;
|
|||||||
import org.dspace.app.rest.test.AbstractControllerIntegrationTest;
|
import org.dspace.app.rest.test.AbstractControllerIntegrationTest;
|
||||||
import org.dspace.authority.PersonAuthorityValue;
|
import org.dspace.authority.PersonAuthorityValue;
|
||||||
import org.dspace.authority.factory.AuthorityServiceFactory;
|
import org.dspace.authority.factory.AuthorityServiceFactory;
|
||||||
|
import org.dspace.content.authority.service.ChoiceAuthorityService;
|
||||||
import org.dspace.core.service.PluginService;
|
import org.dspace.core.service.PluginService;
|
||||||
import org.dspace.services.ConfigurationService;
|
import org.dspace.services.ConfigurationService;
|
||||||
import org.hamcrest.Matchers;
|
import org.hamcrest.Matchers;
|
||||||
@@ -35,6 +36,9 @@ public class AuthorityRestRepositoryIT extends AbstractControllerIntegrationTest
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PluginService pluginService;
|
private PluginService pluginService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ChoiceAuthorityService cas;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setup() throws Exception {
|
public void setup() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
@@ -53,8 +57,11 @@ public class AuthorityRestRepositoryIT extends AbstractControllerIntegrationTest
|
|||||||
configurationService.setProperty("authority.author.indexer.field.1",
|
configurationService.setProperty("authority.author.indexer.field.1",
|
||||||
"dc.contributor.author");
|
"dc.contributor.author");
|
||||||
|
|
||||||
|
|
||||||
|
//TODO Comments
|
||||||
pluginService.clearNamedPluginClasses();
|
pluginService.clearNamedPluginClasses();
|
||||||
|
cas.clearController();
|
||||||
|
|
||||||
PersonAuthorityValue person1 = new PersonAuthorityValue();
|
PersonAuthorityValue person1 = new PersonAuthorityValue();
|
||||||
person1.setId(String.valueOf(UUID.randomUUID()));
|
person1.setId(String.valueOf(UUID.randomUUID()));
|
||||||
person1.setLastName("Shirasaka");
|
person1.setLastName("Shirasaka");
|
||||||
|
Reference in New Issue
Block a user