forked from mapfish/mapfish-print-doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
processors.html
2536 lines (2040 loc) · 99.2 KB
/
processors.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MapFish Print 3 Documentation - Processors</title>
<link rel="stylesheet" href="css/sphinx_rtd_theme.css" type="text/css" />
<link rel="stylesheet" href="css/readthedocs-doc-embed.css" type="text/css" />
<link rel="stylesheet" href="css/custom.css" type="text/css" />
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> MapFish Print 3</a>
</div>
<div
class="wy-menu wy-menu-vertical"
data-spy="affix"
role="navigation"
aria-label="main navigation"
>
<ul class="current">
<li class="toctree-l1 ">
<a class="reference internal " href="index.html">Introduction</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="jasperreports.html"
>JasperReports</a
>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="api.html">Web API</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="attributes.html">Attributes</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="configuration.html"
>Configuration</a
>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="layers.html">Map Layers</a>
</li>
<li class="toctree-l1 current">
<a class="reference internal current" href="processors.html">Processors</a>
<ul>
<li class="toctree-l2">
<a class="reference internal" href="#!addBackgroundLayers">!addBackgroundLayers</a>
<li class="toctree-l2">
<a class="reference internal" href="#!addHeaders">!addHeaders</a>
<li class="toctree-l2">
<a class="reference internal" href="#!addOverlayLayers">!addOverlayLayers</a>
<li class="toctree-l2">
<a class="reference internal" href="#!configureHttpRequests">!configureHttpRequests</a>
<li class="toctree-l2">
<a class="reference internal" href="#!createDataSource">!createDataSource</a>
<li class="toctree-l2">
<a class="reference internal" href="#!createMap">!createMap</a>
<li class="toctree-l2">
<a class="reference internal" href="#!createMapPages">!createMapPages</a>
<li class="toctree-l2">
<a class="reference internal" href="#!createNorthArrow">!createNorthArrow</a>
<li class="toctree-l2">
<a class="reference internal" href="#!createOverviewMap">!createOverviewMap</a>
<li class="toctree-l2">
<a class="reference internal" href="#!createScalebar">!createScalebar</a>
<li class="toctree-l2">
<a class="reference internal" href="#!dateFormat">!dateFormat</a>
<li class="toctree-l2">
<a class="reference internal" href="#!forwardHeaders">!forwardHeaders</a>
<li class="toctree-l2">
<a class="reference internal" href="#!mapUri">!mapUri</a>
<li class="toctree-l2">
<a class="reference internal" href="#!mergeDataSources">!mergeDataSources</a>
<li class="toctree-l2">
<a class="reference internal" href="#!prepareLegend">!prepareLegend</a>
<li class="toctree-l2">
<a class="reference internal" href="#!prepareTable">!prepareTable</a>
<li class="toctree-l2">
<a class="reference internal" href="#!reportBuilder">!reportBuilder</a>
<li class="toctree-l2">
<a class="reference internal" href="#!restrictUris">!restrictUris</a>
<li class="toctree-l2">
<a class="reference internal" href="#!setFeatures">!setFeatures</a>
<li class="toctree-l2">
<a class="reference internal" href="#!setStyle">!setStyle</a>
<li class="toctree-l2">
<a class="reference internal" href="#!setTiledWms">!setTiledWms</a>
<li class="toctree-l2">
<a class="reference internal" href="#!setWmsCustomParam">!setWmsCustomParam</a>
<li class="toctree-l2">
<a class="reference internal" href="#!updatePdfConfig">!updatePdfConfig</a>
<li class="toctree-l2">
<a class="reference internal" href="#!useHttpForHttps">!useHttpForHttps</a>
</li>
</ul>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="fileloaders.html">File-Loaders</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="outputformats.html"
>Output Formats</a
>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="styles.html">Styles</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="tableimages.html"
>Images in tables</a
>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="download.html">Download</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="docker.html">Docker</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="scaling.html">Horizontal scaling</a>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">MapFish Print 3</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>Processors</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/mapfish/mapfish-print" class="fa fa-github">
mapfish/mapfish-print</a
>
</li>
</ul>
<hr />
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Processors</h1>
<div class="section"><p>
This page lists all the <em>processors </em> available in the Mapfish Print distribution. The documentation
consists of several parts:
</p>
<ul>
<li>
<b>Description</b>: the full description for each processor can be found by expanding one of the list
elements.
</li>
<li>
<b>Configuration</b>: the configuration options are also listed when a processor element is expanded. A
configuration option is a value that can be set on the processor in the configuration yaml file. These
options are consistent across all print jobs because they are not provided by the client.
</li>
<li>
<b>Input</b>: the required input values of the processor are listed when the processor element is in
expanded form. Input values are either <a href="attributes.html">attributes</a> or the output values of
other processors.
</li>
<li>
<b>Output</b>: the output values of the processors are also listed when a processor element is expanded.
As the name implies, the output values are the data the processor produces and is the input of other
processors or the input parameters of the outputFormat template.
</li>
</ul>
<p>
A processor's main responsibility is to take the <a href="attributes.html">attributes</a> for the print job
and producing the parameters required by the <a href="outputformats.html"> output format</a> to produce the
report.
</p>
<p>
While many processors are responsible for directly producing the parameters required by the
<a href="outputformats.html">output format</a>, some processors be considered <em>support</em> processors. A
support processor is a processor that in some way prepares attributes for the <em>primary</em> processors.
For example, there are processors that can add layers to the map so that all maps will have the layers
(reducing the data the client needs to send.) Another example are several processors which configure how
http requests are make (add cookies, headers, remap URLs, etc...)
</p>
<p>
A processor usually has inputs and outputs, in the simple case an input is one of the attributes and the
outputs all map to parameters in the Jasper template. Each input and output have default names and often
these are sufficient.
</p>
<p>
However consider the case where a report had two maps (or legends or....). In this case the default input
and output parameter names are not sufficient because the input attributes need to be mapped to the correct
processor and the output values need to be mapped to the correct parameters in the templates. In order to
account for this case, processors have the configuration options: <code>inputMapper</code> and
<code>outputMapper</code>.
</p>
<p>
<code>inputMapper</code> and <code>outputMapper</code> configuration parameters can be configured as
follows:
</p>
<div class="highlight-yaml">
<div class="highlight">
<pre>
- !createMap
inputMapper: {attributeName: defaultInputParamName}
outputMapper: {defaultOutputName: templateParamName}</pre
>
</div>
</div>
Or if the there are multiple mappings that need to be made :
<div class="highlight-yaml">
<div class="highlight">
<pre>
- processorName
inputMapper : {
attributeName1 : inputName1
attributeName2 : inputName2
}</pre
>
</div>
</div>
</div>
<div class="section" id="!addBackgroundLayers">
<h1>!addBackgroundLayers<a class="headerlink" href="#!addBackgroundLayers" title="Permalink to this headline">¶</a></h1>
<div class="block">This processor adds the configured set of layers to the map.
<p>This is useful when all maps should have a default set of background layers or overlays added
to those that the client sends for printing.
</p><p>This can simplify the client so the client only needs to be concerned with the data layers.
</p><p>See also: <a shape="rect" href="attributes.html#!staticLayers">!staticLayers</a> attribute
</p></div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/add_overlay_layer"
target="_blank"
class="fa fa-book"
> add_overlay_layer</a
> <a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/report"
target="_blank"
class="fa fa-book"
> report</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>inputMapper</code> </dt>
<dd><div class="block">The input mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> inputMapper: {attributeName: defaultInputParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>inputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each input value. This provides a simple way to make all input values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>outputMapper</code> </dt>
<dd><div class="block">The output mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> outputMapper: {defaultOutputName: templateParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>outputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each output value. This provides a simple way to make all output values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>position</code> </dt>
<dd><div class="block">Set the position enumeration which indicates where the layers should be added to the map:
<a shape="rect" href="AddStaticLayersProcessor.StaticLayerPosition.html" title="enum in org.mapfish.print.processor.map"><code>AddStaticLayersProcessor.StaticLayerPosition</code></a>.</div></dd>
</dl>
<dl>
<dt><code>prefix</code> </dt>
<dd><div class="block">The prefix to apply to each value. This provides a simple way to make all input and output
values have unique values.</div></dd>
</dl>
<h3>Inputs</h3>
<dl>
<dt><code>map</code> required</dt>
<dd><div class="block">The map to update with the static layers.</div></dd>
</dl>
<dl>
<dt><code>staticLayers</code> required</dt>
<dd><div class="block">The attribute containing the static layers to add to the map.</div></dd>
</dl>
</div>
<div class="section" id="!addHeaders">
<h1>!addHeaders<a class="headerlink" href="#!addHeaders" title="Permalink to this headline">¶</a></h1>
<div class="block">This processor allows adding static headers to an http request.
<p>Example: add a Cookie header with multiple header values and add header2 with only one value
</p><div class="highlight"><pre> - !addHeaders<br> headers:<br> Cookie: [cookie-value, cookie-value2]<br> Header2: header2-value</pre></div><p>Can be applied conditionally using matchers, like in <a shape="rect" href="RestrictUrisProcessor.html" title="class in org.mapfish.print.processor.http"><code>RestrictUrisProcessor</code></a> (<a shape="rect" href="processors.html#!restrictUris">!restrictUris</a> ). </p></div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/http_processors"
target="_blank"
class="fa fa-book"
> http_processors</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>headers</code> </dt>
<dd><div class="block">A map of the header key value pairs. Keys are strings and values are either list of strings or
a string.</div></dd>
</dl>
<dl>
<dt><code>inputMapper</code> </dt>
<dd><div class="block">The input mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> inputMapper: {attributeName: defaultInputParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>inputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each input value. This provides a simple way to make all input values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>matchers</code> </dt>
<dd><div class="block">The matchers used to select the urls that are going to be modified by the processor. For
example:
<div class="highlight"><pre> - !restrictUris<br> matchers:<br> - !localMatch<br> dummy: true<br> - !ipMatch<br> ip: www.camptocamp.org<br> - !dnsMatch<br> host: mapfish-geoportal.demo-camptocamp.com<br> port: 80<br> - !dnsMatch<br> host: labs.metacarta.com<br> port: 80<br> - !dnsMatch<br> host: terraservice.net<br> port: 80<br> - !dnsMatch<br> host: tile.openstreetmap.org<br> port: 80<br> - !dnsMatch<br> host: www.geocat.ch<br> port: 80</pre></div></div></dd>
</dl>
<dl>
<dt><code>outputMapper</code> </dt>
<dd><div class="block">The output mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> outputMapper: {defaultOutputName: templateParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>outputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each output value. This provides a simple way to make all output values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>prefix</code> </dt>
<dd><div class="block">The prefix to apply to each value. This provides a simple way to make all input and output
values have unique values.</div></dd>
</dl>
<h3>Inputs</h3>
<dl>
<dt><code>clientHttpRequestFactoryProvider</code> required</dt>
<dd><div class="block">The object for creating requests. There should always be an instance in the values object so it
does not need to be created.</div></dd>
</dl>
</div>
<div class="section" id="!addOverlayLayers">
<h1>!addOverlayLayers<a class="headerlink" href="#!addOverlayLayers" title="Permalink to this headline">¶</a></h1>
<div class="block">This processor adds the configured set of layers to the map.
<p>This is useful when all maps should have a default set of background layers or overlays added
to those that the client sends for printing.
</p><p>This can simplify the client so the client only needs to be concerned with the data layers.
</p><p>See also: <a shape="rect" href="attributes.html#!staticLayers">!staticLayers</a> attribute
</p></div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/add_overlay_layer"
target="_blank"
class="fa fa-book"
> add_overlay_layer</a
> <a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/report"
target="_blank"
class="fa fa-book"
> report</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>inputMapper</code> </dt>
<dd><div class="block">The input mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> inputMapper: {attributeName: defaultInputParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>inputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each input value. This provides a simple way to make all input values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>outputMapper</code> </dt>
<dd><div class="block">The output mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> outputMapper: {defaultOutputName: templateParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>outputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each output value. This provides a simple way to make all output values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>position</code> </dt>
<dd><div class="block">Set the position enumeration which indicates where the layers should be added to the map:
<a shape="rect" href="AddStaticLayersProcessor.StaticLayerPosition.html" title="enum in org.mapfish.print.processor.map"><code>AddStaticLayersProcessor.StaticLayerPosition</code></a>.</div></dd>
</dl>
<dl>
<dt><code>prefix</code> </dt>
<dd><div class="block">The prefix to apply to each value. This provides a simple way to make all input and output
values have unique values.</div></dd>
</dl>
<h3>Inputs</h3>
<dl>
<dt><code>map</code> required</dt>
<dd><div class="block">The map to update with the static layers.</div></dd>
</dl>
<dl>
<dt><code>staticLayers</code> required</dt>
<dd><div class="block">The attribute containing the static layers to add to the map.</div></dd>
</dl>
</div>
<div class="section" id="!configureHttpRequests">
<h1>!configureHttpRequests<a class="headerlink" href="#!configureHttpRequests" title="Permalink to this headline">¶</a></h1>
<div class="block">A processor that wraps several <a shape="rect" href="AbstractClientHttpRequestFactoryProcessor.html" title="class in org.mapfish.print.processor.http"><code>AbstractClientHttpRequestFactoryProcessor</code></a>s.
<p>This makes it more convenient to configure multiple processors that modify <a shape="rect" href="../../http/MfClientHttpRequestFactory.html" title="interface in org.mapfish.print.http"><code>MfClientHttpRequestFactory</code></a> objects.
</p><p>Consider the case where you need to:
</p><ul><li>Restrict allowed URIS using the !restrictUris processor
</li><li>Forward all headers from print request to all requests using !forwardHeaders
</li><li>Change the url using the !mapUri processor
</li></ul><p>In this case the !mapUri processor must execute before the !restrictUris processor but it is
difficult to enforce this, the inputMapping and outputMapping must be carefully designed in order
to do it. The following should work but compare it with the example below:
</p><div class="highlight"><pre> - !mapUri<br> mapping:<br> (http)://localhost(.*): "$1://127.0.0.1$2"<br> outputMapper: {clientHttpRequestFactoryProvider: clientHttpRequestFactoryMapped}<br> - !forwardHeaders<br> all: true<br> inputMapper: {clientHttpRequestFactoryMapped :clientHttpRequestFactoryProvider}<br> outputMapper: {clientHttpRequestFactoryProvider: clientHttpRequestFactoryWithHeaders}<br> - !restrictUris<br> matchers: [!localMatch {}]<br> inputMapper: {clientHttpRequestFactoryWithHeaders:clientHttpRequestFactoryProvider}<br> </pre></div><p>The recommended way to write the above configuration is as follows:
</p><div class="highlight"><pre> - !configureHttpRequests<br> httpProcessors:<br> - !mapUri<br> mapping:<br> (http)://localhost(.*): "$1://127.0.0.1$2"<br> - !forwardHeaders<br> all: true<br> - !restrictUris<br> matchers: [!localMatch {}]</pre></div>
</div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/http_processors"
target="_blank"
class="fa fa-book"
> http_processors</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>httpProcessors</code> </dt>
<dd><div class="block">Sets all the http processors that will executed by this processor.</div></dd>
</dl>
<dl>
<dt><code>inputMapper</code> </dt>
<dd><div class="block">The input mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> inputMapper: {attributeName: defaultInputParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>inputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each input value. This provides a simple way to make all input values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>outputMapper</code> </dt>
<dd><div class="block">The output mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> outputMapper: {defaultOutputName: templateParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>outputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each output value. This provides a simple way to make all output values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>prefix</code> </dt>
<dd><div class="block">The prefix to apply to each value. This provides a simple way to make all input and output
values have unique values.</div></dd>
</dl>
<h3>Inputs</h3>
<dl>
<dt><code>clientHttpRequestFactoryProvider</code> required</dt>
<dd><div class="block">The object for creating requests. There should always be an instance in the values object so it
does not need to be created.</div></dd>
</dl>
<dl>
<dt><code>values</code> required</dt>
<dd><div class="block">The values.</div></dd>
</dl>
</div>
<div class="section" id="!createDataSource">
<h1>!createDataSource<a class="headerlink" href="#!createDataSource" title="Permalink to this headline">¶</a></h1>
<div class="block">A processor that will process a <a shape="rect" href="../../attribute/DataSourceAttribute.DataSourceAttributeValue.html" title="class in org.mapfish.print.attribute"><code>DataSourceAttribute.DataSourceAttributeValue</code></a> and construct a single
Jasper DataSource from the input values in the <a shape="rect" href="../../attribute/DataSourceAttribute.DataSourceAttributeValue.html" title="class in org.mapfish.print.attribute"><code>DataSourceAttribute.DataSourceAttributeValue</code></a> input object.
<p>The <a shape="rect" href="../../attribute/DataSourceAttribute.DataSourceAttributeValue.html" title="class in org.mapfish.print.attribute"><code>DataSourceAttribute.DataSourceAttributeValue</code></a> has an
array of maps, each map in the array equates to a row in the Jasper DataSource.
</p><p>The DataSourceProcessor can be configured with processors which will be used to transform each
map in the input array before constructing the final DataSource row.
</p><p>For example, each map in the array could be <a shape="rect" href="../../attribute/map/MapAttribute.MapAttributeValues.html" title="class in org.mapfish.print.attribute.map"><code>MapAttribute.MapAttributeValues</code></a> and the DataSourceProcessor
could be configured with !createMap processor. In this scenario each element in the array would
be transformed by the !createMap processor and thus each row of the resulting DataSource will
contain the map subreport created by the !createMap processor.
</p><p>An additional point to remember is that (as with the normal execution) in addition to the
output of the processors, the attributes in the input map will also be columns in the row. This
means that the jasper report that makes use of the resulting DataSource will have access to both
the results of the processor as well as the input values (unless overwritten by the processor
output).
</p><p>If the reportKey is defined (and reportTemplate) then a the reportTemplate jrxml file will be
compiled (as required by all jrxml files) and an additional column will be added to each row
[reportKey] : [compiled reportTemplate File]
</p><p>If reportKey is defined the reportTemplate must also be defined (and vice-versa).
</p><p>See also: <a shape="rect" href="attributes.html#!datasource">!datasource</a> attribute
[[examples=verboseExample,datasource_dynamic_tables,datasource_many_dynamictables_legend,
datasource_multiple_maps,customDynamicReport,report]]</p></div>
<h3>Configuration</h3>
<dl>
<dt><code>attributes</code> </dt>
<dd><div class="block">All the attributes needed either by the processors for each datasource row or by the jasper
template.</div></dd>
</dl>
<dl>
<dt><code>copyAttributes</code> </dt>
<dd><div class="block">The attributes that will be copied from the previous level.</div></dd>
</dl>
<dl>
<dt><code>inputMapper</code> </dt>
<dd><div class="block">The input mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> inputMapper: {attributeName: defaultInputParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>inputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each input value. This provides a simple way to make all input values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>outputMapper</code> </dt>
<dd><div class="block">The output mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> outputMapper: {defaultOutputName: templateParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>outputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each output value. This provides a simple way to make all output values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>prefix</code> </dt>
<dd><div class="block">The prefix to apply to each value. This provides a simple way to make all input and output
values have unique values.</div></dd>
</dl>
<dl>
<dt><code>processors</code> </dt>
<dd><div class="block">All the processors that will executed for each value retrieved from the <a shape="rect" href="../../output/Values.html" title="class in org.mapfish.print.output"><code>Values</code></a> object with the datasource name. All output values from the
processor graph will be the datasource values.
<p>Each value retrieved from values with the datasource name will be the input of the processor
graph and all the output values for that execution will be the values of a single row in the
datasource. The Jasper template can use any of the values in its detail band.</p></div></dd>
</dl>
<dl>
<dt><code>reportKey</code> </dt>
<dd><div class="block">The key/name to use when putting the path to the compiled subreport in each row of the
datasource. This is required if <a shape="rect" href="#reportTemplate"><code>reportTemplate</code></a> has been set. The path to the compiled
subreport will be added to each row in the datasource with this value as the key. This allows
the containing report to reference the subreport in each row.</div></dd>
</dl>
<dl>
<dt><code>reportTemplate</code> </dt>
<dd><div class="block">The path to the report template used to render each row of the data. This is only required if a
subreport needs to be compiled and is referenced in the containing report's detail section.
<p>The path should be relative to the configuration directory</p></div></dd>
</dl>
<h3>Inputs</h3>
<dl>
<dt><code>datasource</code> required</dt>
<dd><div class="block">The data that will be processed by this processor in order to create a Jasper DataSource
object.</div></dd>
</dl>
<dl>
<dt><code>template</code> required</dt>
<dd><div class="block">The values object with all values. This is required in order to run sub-processor graph</div></dd>
</dl>
<dl>
<dt><code>values</code> required</dt>
<dd><div class="block">The values object with all values. This is required in order to run sub-processor graph</div></dd>
</dl>
<h3>Outputs</h3>
<dl>
<dt><code>jrDataSource</code> required</dt>
<dd><div class="block">The datasource to be assigned to a report or sub-report detail/table section.</div></dd>
</dl>
</div>
<div class="section" id="!createMap">
<h1>!createMap<a class="headerlink" href="#!createMap" title="Permalink to this headline">¶</a></h1>
<div class="block">A processor to render a map that can be embedded as a sub-report into a JasperReports template.
<p>See also: <a shape="rect" href="attributes.html#!map">!map</a> attribute </p></div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/verboseExample"
target="_blank"
class="fa fa-book"
> verboseExample</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>inputMapper</code> </dt>
<dd><div class="block">The input mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> inputMapper: {attributeName: defaultInputParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>inputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each input value. This provides a simple way to make all input values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>outputMapper</code> </dt>
<dd><div class="block">The output mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> outputMapper: {defaultOutputName: templateParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>outputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each output value. This provides a simple way to make all output values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>prefix</code> </dt>
<dd><div class="block">The prefix to apply to each value. This provides a simple way to make all input and output
values have unique values.</div></dd>
</dl>
<h3>Inputs</h3>
<dl>
<dt><code>clientHttpRequestFactoryProvider</code> required</dt>
<dd><div class="block">A factory for making http requests. This is added to the values by the framework and
therefore does not need to be set in configuration</div></dd>
</dl>
<dl>
<dt><code>map</code> required</dt>
<dd><div class="block">The required parameters for the map.</div></dd>
</dl>
<dl>
<dt><code>outputFormat</code> </dt>
<dd><div class="block">The output format.</div></dd>
</dl>
<dl>
<dt><code>tempTaskDirectory</code> required</dt>
<dd><div class="block">The path to the temporary directory for the print task.</div></dd>
</dl>
<dl>
<dt><code>template</code> required</dt>
<dd><div class="block">The template containing this table processor.</div></dd>
</dl>
<h3>Outputs</h3>
<dl>
<dt><code>layerGraphics</code> required</dt>
<dd><div class="block">The paths to a graphic for each layer.</div></dd>
</dl>
<dl>
<dt><code>mapContext</code> required</dt>
<dd><div class="block">The map parameters used after zooming and all other calculations that are made.</div></dd>
</dl>
<dl>
<dt><code>mapSubReport</code> required</dt>
<dd><div class="block">The path to the compiled sub-report for the map.</div></dd>
</dl>
</div>
<div class="section" id="!createMapPages">
<h1>!createMapPages<a class="headerlink" href="#!createMapPages" title="Permalink to this headline">¶</a></h1>
<div class="block">Processor used to display a map on multiple pages.
<p>This processor will take the defined <a shape="rect" href="attributes.html#!map">map attribute</a> and
using the geometry defined in the <a shape="rect" href="attributes.html#!map">map attribute's</a> area of
interest, will create an Iterable<Values> each of which contains:
</p><ul><li>a new definition of a <a shape="rect" href="attributes.html#!map">map attribute</a></li><li>name value which is a string that roughly describes which part of the main map this sub-map
is
</li><li>left value which is the name of the sub-map to the left of the current map
</li><li>right value which is the name of the sub-map to the right of the current map
</li><li>top value which is the name of the sub-map to the top of the current map
</li><li>bottom value which is the name of the sub-map to the bottom of the current map
</li></ul><p>The iterable of values can be consumed by a <a shape="rect" href="processors.html#!createDataSource">!createDataSource</a> processor and as a result be put
in the report (or one of the sub-reports) table. One must be careful as this can result in truly
giant reports.
</p><p>See also: <a shape="rect" href="attributes.html#!paging">!paging</a> attribute </p></div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/paging"
target="_blank"
class="fa fa-book"
> paging</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>inputMapper</code> </dt>
<dd><div class="block">The input mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> inputMapper: {attributeName: defaultInputParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>inputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each input value. This provides a simple way to make all input values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>outputMapper</code> </dt>
<dd><div class="block">The output mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> outputMapper: {defaultOutputName: templateParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>outputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each output value. This provides a simple way to make all output values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>prefix</code> </dt>
<dd><div class="block">The prefix to apply to each value. This provides a simple way to make all input and output
values have unique values.</div></dd>
</dl>
<h3>Inputs</h3>
<dl>
<dt><code>map</code> required</dt>
<dd><div class="block">The required parameters for the map.</div></dd>
</dl>
<dl>
<dt><code>paging</code> required</dt>
<dd><div class="block">Attributes that define how each page/sub-map will be generated. It defines the scale and how
to render the area of interest, etc...</div></dd>
</dl>
<h3>Outputs</h3>
<dl>
<dt><code>datasource</code> required</dt>
<dd><div class="block">Resulting list of values for the maps.</div></dd>
</dl>
</div>
<div class="section" id="!createNorthArrow">
<h1>!createNorthArrow<a class="headerlink" href="#!createNorthArrow" title="Permalink to this headline">¶</a></h1>
<div class="block">Processor to create a north-arrow for a map.
<p>The north-arrow is rotated according to the rotation of the associated map.
</p><p>Example configuration:
</p><div class="highlight"><pre> attributes:<br> ...<br> northArrow: !northArrow<br> size: 50<br> default:<br> graphic: "file://NorthArrow_10.svg"<br><br> processors:<br> ...<br> - !createNorthArrow {}</pre></div><p>See also: <a shape="rect" href="attributes.html#!northArrow">!northArrow</a> attribute
</p></div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/verboseExample"
target="_blank"
class="fa fa-book"
> verboseExample</a
> <a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/print_osm_new_york_nosubreports"
target="_blank"
class="fa fa-book"
> print_osm_new_york_nosubreports</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>inputMapper</code> </dt>
<dd><div class="block">The input mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> inputMapper: {attributeName: defaultInputParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>inputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each input value. This provides a simple way to make all input values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>outputMapper</code> </dt>
<dd><div class="block">The output mapper. See "Processors" to know more. Example:
<div class="highlight"><pre> outputMapper: {defaultOutputName: templateParamName}</pre></div></div></dd>
</dl>
<dl>
<dt><code>outputPrefix</code> </dt>
<dd><div class="block">The prefix to apply to each output value. This provides a simple way to make all output values
have unique values.</div></dd>
</dl>
<dl>
<dt><code>prefix</code> </dt>
<dd><div class="block">The prefix to apply to each value. This provides a simple way to make all input and output
values have unique values.</div></dd>
</dl>
<h3>Inputs</h3>
<dl>
<dt><code>clientHttpRequestFactoryProvider</code> required</dt>
<dd><div class="block">The factory to use for making http requests.</div></dd>
</dl>
<dl>
<dt><code>map</code> required</dt>
<dd><div class="block">The map the north arrow is created for.</div></dd>
</dl>
<dl>
<dt><code>northArrow</code> required</dt>
<dd><div class="block">The parameters for the north arrow.</div></dd>
</dl>
<dl>
<dt><code>tempTaskDirectory</code> required</dt>
<dd><div class="block">The path to the temporary directory for the print task.</div></dd>
</dl>
<dl>
<dt><code>template</code> required</dt>
<dd><div class="block">The containing template.</div></dd>
</dl>