Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/exports/OutputHelper.java @ 8254:c87c87544cc6
Made call context injectors a list of comma separated classes.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 10 Sep 2014 12:42:39 +0200 |
parents | 724081af301c |
children | 4d99606a844e |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/OutputHelper.java Wed Sep 10 10:02:46 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/OutputHelper.java Wed Sep 10 12:42:39 2014 +0200 @@ -55,7 +55,7 @@ this.identifier = identifier; } - private static ContextInjector getContextInjector(CallContext context, String out) { + private static List<ContextInjector> getContextInjectors(CallContext context, String out) { RiverContext flysContext = context instanceof RiverContext ? (RiverContext)context : (RiverContext)context.globalContext(); @@ -69,7 +69,7 @@ GeneratorLookup.Item item = generators.getGenerator(out); return item != null - ? item.getContextInjector() + ? item.getContextInjectors() : null; } /** @@ -102,7 +102,7 @@ List<ArtifactAndFacet> dataProviders = doBlackboardPass(themeList, context, outName); - ContextInjector ci = getContextInjector(context, outName); + List<ContextInjector> cis = getContextInjectors(context, outName); try { for (int i = 0, T = themeList.size(); i < T; i++) { @@ -131,8 +131,11 @@ continue; } - if (ci != null) { - ci.injectContext(context, dataProviders.get(i).getArtifact(), request); + if (cis != null) { + for (ContextInjector ci: cis) { + ci.injectContext( + context, dataProviders.get(i).getArtifact(), request); + } } if (outName.equals("sq_overview")) {