mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +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;
|
||||
}
|
||||
|
||||
public void clearController() {
|
||||
controller.clear();
|
||||
}
|
||||
private void loadChoiceAuthorityConfigurations() {
|
||||
// Get all configuration keys starting with a given prefix
|
||||
List<String> propKeys = configurationService.getPropertyKeys(CHOICES_PLUGIN_PREFIX);
|
||||
|
@@ -168,4 +168,6 @@ public interface ChoiceAuthorityService {
|
||||
|
||||
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.authority.PersonAuthorityValue;
|
||||
import org.dspace.authority.factory.AuthorityServiceFactory;
|
||||
import org.dspace.content.authority.service.ChoiceAuthorityService;
|
||||
import org.dspace.core.service.PluginService;
|
||||
import org.dspace.services.ConfigurationService;
|
||||
import org.hamcrest.Matchers;
|
||||
@@ -35,6 +36,9 @@ public class AuthorityRestRepositoryIT extends AbstractControllerIntegrationTest
|
||||
@Autowired
|
||||
private PluginService pluginService;
|
||||
|
||||
@Autowired
|
||||
private ChoiceAuthorityService cas;
|
||||
|
||||
@Before
|
||||
public void setup() throws Exception {
|
||||
super.setUp();
|
||||
@@ -53,8 +57,11 @@ public class AuthorityRestRepositoryIT extends AbstractControllerIntegrationTest
|
||||
configurationService.setProperty("authority.author.indexer.field.1",
|
||||
"dc.contributor.author");
|
||||
|
||||
|
||||
//TODO Comments
|
||||
pluginService.clearNamedPluginClasses();
|
||||
|
||||
cas.clearController();
|
||||
|
||||
PersonAuthorityValue person1 = new PersonAuthorityValue();
|
||||
person1.setId(String.valueOf(UUID.randomUUID()));
|
||||
person1.setLastName("Shirasaka");
|
||||
|
Reference in New Issue
Block a user