DS-3059 Replacing getProperty with getArrayProperty

This commit is contained in:
Bram Luyten
2016-02-20 18:16:18 +01:00
parent 0b80302624
commit 3a9cfbb46c
14 changed files with 35 additions and 39 deletions

View File

@@ -77,9 +77,10 @@ public class DayTableEmbargoSetter extends DefaultEmbargoSetter
{
Properties termProps = new Properties();
String terms = DSpaceServicesFactory.getInstance().getConfigurationService().getProperty("embargo.terms.days");
if (terms != null && terms.length() > 0) {
for (String term : terms.split(",")) {
String terms[] = DSpaceServicesFactory.getInstance().getConfigurationService().getArrayProperty("embargo.terms.days");
if (terms != null) {
for (String term : terms) {
String[] parts = term.trim().split(":");
termProps.setProperty(parts[0].trim(), parts[1].trim());
}