mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-11-15 10:20:47 +00:00
More on HER-1901 - support ${launch-id} interpolation on W/ARCWriterProcessor storePaths
* WriterPoolProcessor.java, ARCWriterProcessor.java, WARCWriterProcessor.java
change type of storePaths to List<ConfigPath> and handle appropriately
* ConfigPathConfigurer.java
fixupPaths() - old code did not touch WriterPoolProcessor storePaths, since they're deeply nested inside the bean, but they need to be remembered for later interpolation of ${launch-id}, so add special handling
This commit is contained in:
1 parent
d5b299d1ef
commit
4d966ae70b
4 files changed
+29
-16
No files matched your search
@@ -22,9 +22,11 @@ package org.archive.spring;
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.archive.modules.writer.WriterPoolProcessor;
|
||||
import org.springframework.beans.BeanWrapperImpl;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
@@ -125,6 +127,16 @@ implements
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// we want to remember writer pool store paths for later interpolation
|
||||
// (but their base dirs are taken care of elsewhere)
|
||||
if (bean instanceof WriterPoolProcessor) {
|
||||
List<ConfigPath> storePaths = ((WriterPoolProcessor) bean).getStorePaths();
|
||||
for (int i = 0; i < storePaths.size(); i++) {
|
||||
remember(beanName + "." + "storePaths[" + i + "]", storePaths.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
if(bean instanceof PathFixupListener) {
|
||||
((PathFixupListener)bean).pathsFixedUp();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user