-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfiguration.html
1223 lines (982 loc) · 45 KB
/
configuration.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 - Configuration</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 current">
<a class="reference internal current" href="configuration.html"
>Configuration</a
>
<ul>
<li class="toctree-l2">
<a class="reference internal" href="#!acceptAll">!acceptAll</a>
<li class="toctree-l2">
<a class="reference internal" href="#!alwaysAllowedAssertion">!alwaysAllowedAssertion</a>
<li class="toctree-l2">
<a class="reference internal" href="#!andAssertion">!andAssertion</a>
<li class="toctree-l2">
<a class="reference internal" href="#!certificateStore">!certificateStore</a>
<li class="toctree-l2">
<a class="reference internal" href="#!configuration">!configuration</a>
<li class="toctree-l2">
<a class="reference internal" href="#!credential">!credential</a>
<li class="toctree-l2">
<a class="reference internal" href="#!dnsMatch">!dnsMatch</a>
<li class="toctree-l2">
<a class="reference internal" href="#!hostnameMatch">!hostnameMatch</a>
<li class="toctree-l2">
<a class="reference internal" href="#!ipMatch">!ipMatch</a>
<li class="toctree-l2">
<a class="reference internal" href="#!localMatch">!localMatch</a>
<li class="toctree-l2">
<a class="reference internal" href="#!mergeSource">!mergeSource</a>
<li class="toctree-l2">
<a class="reference internal" href="#!pdfConfig">!pdfConfig</a>
<li class="toctree-l2">
<a class="reference internal" href="#!proxy">!proxy</a>
<li class="toctree-l2">
<a class="reference internal" href="#!roleAccessAssertion">!roleAccessAssertion</a>
<li class="toctree-l2">
<a class="reference internal" href="#!s3reportStorage">!s3reportStorage</a>
<li class="toctree-l2">
<a class="reference internal" href="#!smtpConfig">!smtpConfig</a>
<li class="toctree-l2">
<a class="reference internal" href="#!template">!template</a>
<li class="toctree-l2">
<a class="reference internal" href="#!updatePdfConfigUpdate">!updatePdfConfigUpdate</a>
<li class="toctree-l2">
<a class="reference internal" href="#!urlImage">!urlImage</a>
<li class="toctree-l2">
<a class="reference internal" href="#!zoomLevels">!zoomLevels</a>
</li>
</ul>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="layers.html">Map Layers</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="processors.html">Processors</a>
</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>Configuration</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>Configuration</h1>
<div class="section"><p>
This section lists the available configuration components that can be used in the YAML configuration file.
</p>
<p>
<strong>Example <code>config.yaml</code></strong>
</p>
<div class="highlight-yaml">
<div class="highlight">
<pre>
throwErrorOnExtraParameters: true
certificateStore: !certificateStore
...
credentials:
- !credential
...
proxies:
- !proxy
...
templates:
A4 Landscape: !template
...</pre
>
</div>
</div>
</div>
<div class="section" id="!acceptAll">
<h1>!acceptAll<a class="headerlink" href="#!acceptAll" title="Permalink to this headline">¶</a></h1>
<div class="block">A matcher that always returns true. </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>reject</code> </dt>
<dd><div class="block">Reverses the matcher. Instead of accepting an URI when the URI matches, the URI is rejected.</div></dd>
</dl>
</div>
<div class="section" id="!alwaysAllowedAssertion">
<h1>!alwaysAllowedAssertion<a class="headerlink" href="#!alwaysAllowedAssertion" title="Permalink to this headline">¶</a></h1>
<div class="block">This assertion always allows access.</div> </div>
<div class="section" id="!andAssertion">
<h1>!andAssertion<a class="headerlink" href="#!andAssertion" title="Permalink to this headline">¶</a></h1>
<div class="block">An access assertion that throws fails if any of the encapsulated assertions fail.</div>
<h3>Configuration</h3>
<dl>
<dt><code>predicates</code> </dt>
<dd><div class="block">Set all the Predicates/AccessAssertion that have to all pass in order for this assertion to
pass.
<p>An exception is thrown if this method is called more than once.</p></div></dd>
</dl>
</div>
<div class="section" id="!certificateStore">
<h1>!certificateStore<a class="headerlink" href="#!certificateStore" title="Permalink to this headline">¶</a></h1>
<div class="block">A configuration object for configuring a custom certificate/trust store.
<p>It is a uri to a java jks keystore file along with the password for unlocking the store.</p></div>
<h3>Configuration</h3>
<dl>
<dt><code>configuration</code> </dt>
<dd><div class="block"><span class="descfrm-type-label">Description copied from interface: <code><a shape="rect" href="../config/HasConfiguration.html#setConfiguration(org.mapfish.print.config.Configuration)">HasConfiguration</a></code></span></div></dd>
</dl>
<dl>
<dt><code>password</code> </dt>
<dd><div class="block">The password for unlocking the certificate store.</div></dd>
</dl>
<dl>
<dt><code>uri</code> </dt>
<dd><div class="block">The uri to the certificate store. It is a uri to a java jks keystore file along with the
password for unlocking the store.</div></dd>
</dl>
</div>
<div class="section" id="!configuration">
<h1>!configuration<a class="headerlink" href="#!configuration" title="Permalink to this headline">¶</a></h1>
<div class="block">The Main Configuration Bean.</div>
<h3>Configuration</h3>
<dl>
<dt><code>access</code> </dt>
<dd><div class="block">The roles required to access this configuration/app. If empty or not set then it is a
<em>public</em> app. If there are many roles then a user must have one of the roles in order to
access the configuration/app.
<p>The security (how authentication/authorization is done) is configured in the
/WEB-INF/classes/mapfish-spring-security.xml
</p><p>Any user without the required role will get an error when trying to access any of the
templates and no templates will be listed in the capabilities requests.</p></div></dd>
</dl>
<dl>
<dt><code>allowedReferers</code> </dt>
<dd><div class="block">The matchers used to authorize the incoming requests in function of the referrer. For example:
<div class="highlight"><pre> allowedReferers:<br> - !hostnameMatch<br> host: example.com<br> allowSubDomains: true</pre></div><p>By default, the referrer is not checked</p></div></dd>
</dl>
<dl>
<dt><code>certificateStore</code> </dt>
<dd><div class="block">The configuration for locating a custom certificate store. This is only required if the default
certificate store which ships with all java installations does not contain the certificates
needed by this server. Usually it is to accept a self-signed certificate, for example on a test
server.</div></dd>
</dl>
<dl>
<dt><code>configurationFile</code> </dt>
<dd></dd>
</dl>
<dl>
<dt><code>credentials</code> </dt>
<dd><div class="block">Http credentials to be used when making http requests.
<p>If a proxy needs credentials you don't need to configure it here because the proxy
configuration object also has options for declaring the credentials.</p></div></dd>
</dl>
<dl>
<dt><code>defaultStyle</code> </dt>
<dd><div class="block">Set the default styles. the case of the keys are not important. The retrieval will be case
insensitive.</div></dd>
</dl>
<dl>
<dt><code>defaultToSvg</code> </dt>
<dd><div class="block">If true then all vector layers (and other parts of the system that can be either SVG or Bitmap,
like scalebar) will be rendered as SVG (unless layer specifically indicates useSvg as false).
<p>The default is false.</p></div></dd>
</dl>
<dl>
<dt><code>fileLoaderManager</code> </dt>
<dd><div class="block">Set file loader manager.</div></dd>
</dl>
<dl>
<dt><code>jdbcDrivers</code> </dt>
<dd><div class="block">Set the JDBC drivers that are required to connect to the databases in the configuration. JDBC
drivers are needed (for example) when database sources are used in templates. For example if in
one of the template you have:
<div class="highlight"><pre> jdbcUrl: "jdbc:postgresql://localhost:5432/morges_dpfe"</pre></div><p>then you need to add:
</p><div class="highlight"><pre> jdbcDrivers: [org.postgresql.Driver]</pre></div><p>or
</p><div class="highlight"><pre> jdbcDrivers:<br> - org.postgresql.Driver</pre></div></div></dd>
</dl>
<dl>
<dt><code>opaqueTileErrorColor</code> </dt>
<dd><div class="block">Color used for tiles in error on opaque layers.</div></dd>
</dl>
<dl>
<dt><code>outputFilename</code> </dt>
<dd><div class="block">The default output file name of the report. This can be overridden by <a shape="rect" href="Template.html#setOutputFilename(java.lang.String)"><code>Template.setOutputFilename(String)</code></a> and the outputFilename parameter
in the request JSON.
<p>This can be a string and can also have a date section in the string that will be filled when
the report is created for example a section with ${<dateFormatString>} will be replaced
with the current date formatted in the way defined by the <dateFormatString> string. The
format rules are the rules in <a shape="rect" href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html">
java.text.SimpleDateFormat</a> (do a google search if the link above is broken).
</p><p>Example: <code>outputFilename: print-${dd-MM-yyyy}</code> should output: <code><br> print-22-11-2014.pdf</code></p><p>Note: the suffix will be appended to the end of the name.</p></div></dd>
</dl>
<dl>
<dt><code>pdfConfig</code> </dt>
<dd><div class="block">Configure various properties related to the reports generated as PDFs.</div></dd>
</dl>
<dl>
<dt><code>proxies</code> </dt>
<dd><div class="block">Configuration for proxying http requests. Each proxy can be configured with authentication and
with the uris that they apply to.
<p>See <a shape="rect" href="../http/HttpProxy.html" title="class in org.mapfish.print.http"><code>HttpProxy</code></a> for details on how to configure them.</p></div></dd>
</dl>
<dl>
<dt><code>resourceBundle</code> </dt>
<dd><div class="block">Set the resource bundle name.</div></dd>
</dl>
<dl>
<dt><code>smtp</code> </dt>
<dd></dd>
</dl>
<dl>
<dt><code>styles</code> </dt>
<dd><div class="block">Set the named styles defined in the configuration for this.</div></dd>
</dl>
<dl>
<dt><code>templates</code> </dt>
<dd><div class="block">Set the configuration of the named template.</div></dd>
</dl>
<dl>
<dt><code>throwErrorOnExtraParameters</code> </dt>
<dd><div class="block">If true and the request JSON has extra parameters in the layers definition, exceptions will be
thrown. Otherwise the information will be logged.</div></dd>
</dl>
<dl>
<dt><code>transparentTileErrorColor</code> </dt>
<dd><div class="block">Color used for tiles in error on transparent layers.</div></dd>
</dl>
</div>
<div class="section" id="!credential">
<h1>!credential<a class="headerlink" href="#!credential" title="Permalink to this headline">¶</a></h1>
<div class="block">Represents a set of credentials to use for an http request. These can be configured in the
Configuration yaml file.
<p><em>Note: proxies are also HttpCredentials and when searching for credentials, the proxies
will also be searched for credentials.</em></p></div>
<h3>Configuration</h3>
<dl>
<dt><code>matchers</code> </dt>
<dd><div class="block">Matchers are used to choose which requests the credentials apply to.</div></dd>
</dl>
<dl>
<dt><code>password</code> </dt>
<dd><div class="block">The password for authenticating with the credentials.
<p>This is optional</p></div></dd>
</dl>
<dl>
<dt><code>username</code> </dt>
<dd><div class="block">The username for authenticating with the credentials.
<p>This is optional</p></div></dd>
</dl>
</div>
<div class="section" id="!dnsMatch">
<h1>!dnsMatch<a class="headerlink" href="#!dnsMatch" title="Permalink to this headline">¶</a></h1>
<div class="block">Allows to check that a given URL matches a DNS address (textual format). The actual comparison is
performed on numerical IP addresses. The configured DNS host address is transformed into
numerical IP addresses during application startup. The urls to be compared are transformed during
the print processing.
<p>Example 1: Accept any www.camptocamp.com url
</p><div class="highlight"><pre> - !dnsMatch<br> host: www.camptocamp.com</pre></div><p>Example 2: Accept any www.camptocamp.com url (port == -1 accepts any port)
</p><div class="highlight"><pre> - !dnsMatch<br> host: www.camptocamp.com<br> port: -1</pre></div><p>Example 3: Accept any www.camptocamp.com url on port 80 only
</p><div class="highlight"><pre> - !dnsMatch<br> host: www.camptocamp.com<br> port: 80</pre></div>
Example 4: Accept www.camptocamp.com urls with paths that start with /print/.
<p>If the regular expression give does not start with / then it will be added because all paths
start with /
</p><div class="highlight"><pre> - !dnsMatch<br> host: www.camptocamp.com<br> pathRegex: /print/.+</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>host</code> </dt>
<dd><div class="block">Set the host.</div></dd>
</dl>
<dl>
<dt><code>pathRegex</code> </dt>
<dd><div class="block">The regular expression used to verify the path of the uri as is expected. All paths start with
/.
<p>The regular expression used are the ones supported by java: <a shape="rect" href="http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html">
http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html </a></p></div></dd>
</dl>
<dl>
<dt><code>port</code> </dt>
<dd></dd>
</dl>
<dl>
<dt><code>reject</code> </dt>
<dd><div class="block">Reverses the matcher. Instead of accepting an URI when the URI matches, the URI is rejected.</div></dd>
</dl>
</div>
<div class="section" id="!hostnameMatch">
<h1>!hostnameMatch<a class="headerlink" href="#!hostnameMatch" title="Permalink to this headline">¶</a></h1>
<div class="block">Allows to check that a given URL matches a hostname literally (textual match).
<p>Example 1: Accept any www.camptocamp.com url
</p><div class="highlight"><pre> - !hostnameMatch<br> host: www.camptocamp.com</pre></div><p>Example 2: Accept any www.camptocamp.com url (port == -1 accepts any port)
</p><div class="highlight"><pre> - !hostnameMatch<br> host: www.camptocamp.com<br> port: -1</pre></div><p>Example 3: Accept any www.camptocamp.com url on port 80 only
</p><div class="highlight"><pre> - !hostnameMatch<br> host: www.camptocamp.com<br> port: 80</pre></div>
Example 4: Accept www.camptocamp.com urls with paths that start with /print/.
<p>If the regular expression give does not start with / then it will be added because all paths
start with /
</p><div class="highlight"><pre> - !hostnameMatch<br> host: www.camptocamp.com<br> pathRegex: /print/.+</pre></div></div>
<h3>Configuration</h3>
<dl>
<dt><code>allowSubDomains</code> </dt>
<dd><div class="block">Set if sub-domains are allowed.</div></dd>
</dl>
<dl>
<dt><code>host</code> </dt>
<dd><div class="block">Set the host.</div></dd>
</dl>
<dl>
<dt><code>pathRegex</code> </dt>
<dd><div class="block">The regular expression used to verify the path of the uri as is expected. All paths start with
/.
<p>The regular expression used are the ones supported by java: <a shape="rect" href="http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html">
http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html </a></p></div></dd>
</dl>
<dl>
<dt><code>port</code> </dt>
<dd></dd>
</dl>
<dl>
<dt><code>reject</code> </dt>
<dd><div class="block">Reverses the matcher. Instead of accepting an URI when the URI matches, the URI is rejected.</div></dd>
</dl>
</div>
<div class="section" id="!ipMatch">
<h1>!ipMatch<a class="headerlink" href="#!ipMatch" title="Permalink to this headline">¶</a></h1>
<div class="block">Compares ip address string and mask string by using <a shape="rect" href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/InetAddress.html" title="class or interface in java.net" class="external-link"><code>InetAddress</code></a> comparison.
<p>Example 1: accept any uri whose host matches the ip of www.camptocamp.com
</p><div class="highlight"><pre> - !ipMatch<br> ip: www.camptocamp.com</pre></div><p>Example 2: accept any uri whose host ip starts with 192.1
</p><div class="highlight"><pre> - !ipMatch<br> ip: 192.1.0.0<br> mask: 255.255.0.0</pre></div><p>Example 3: accept any uri whose host ip starts with 192.1 and restricts to port 80
</p><div class="highlight"><pre> - !ipMatch<br> ip: 192.1.0.0<br> mask: 255.255.0.0<br> port: 80</pre></div><p>Example 4: accept any uri whose host ip starts with 192.1 and and allows any port (-1 is any
port)
</p><div class="highlight"><pre> - !ipMatch<br> ip: 192.1.0.0<br> mask: 255.255.0.0<br> port: -1</pre></div><p>Example 5: accept any uri whose host ip starts with 192.1 and restricts to paths that start
with /print/
</p><div class="highlight"><pre> - !ipMatch<br> ip: 192.1.0.0<br> mask: 255.255.0.0<br> pathRegex: /print/.+</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>ip</code> </dt>
<dd><div class="block">Set the allowed ip address for this matcher.</div></dd>
</dl>
<dl>
<dt><code>mask</code> </dt>
<dd><div class="block">Set the Mask to apply to the ip address obtained from the URI that is being tested.</div></dd>
</dl>
<dl>
<dt><code>pathRegex</code> </dt>
<dd><div class="block">The regular expression used to verify the path of the uri as is expected. All paths start with
/.
<p>The regular expression used are the ones supported by java: <a shape="rect" href="http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html">
http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html </a></p></div></dd>
</dl>
<dl>
<dt><code>port</code> </dt>
<dd></dd>
</dl>
<dl>
<dt><code>reject</code> </dt>
<dd><div class="block">Reverses the matcher. Instead of accepting an URI when the URI matches, the URI is rejected.</div></dd>
</dl>
</div>
<div class="section" id="!localMatch">
<h1>!localMatch<a class="headerlink" href="#!localMatch" title="Permalink to this headline">¶</a></h1>
<div class="block">Allows to check that a given URL is served by one of the local network interface or one of its
aliases.
<p>Example 1: Accept any localhost url
</p><div class="highlight"><pre> - localMatch {}</pre></div><p>Example 2: Accept any localhost url (port == -1 accepts any port)
</p><div class="highlight"><pre> - localMatch<br> port: -1</pre></div><p>Example 3: Accept any localhost url on port 80 only
</p><div class="highlight"><pre> - localMatch<br> port: 80</pre></div><p>Example 4: Accept localhost urls with paths that start with /print/.
</p><p>If the regular expression given does not start with / then it will be added because all paths
start with /.
</p><div class="highlight"><pre> - localMatch<br> pathRegex: /print/.+</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>pathRegex</code> </dt>
<dd><div class="block">The regular expression used to verify the path of the uri as is expected. All paths start with
/.
<p>The regular expression used are the ones supported by java: <a shape="rect" href="http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html">
http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html </a></p></div></dd>
</dl>
<dl>
<dt><code>port</code> </dt>
<dd></dd>
</dl>
<dl>
<dt><code>reject</code> </dt>
<dd><div class="block">Reverses the matcher. Instead of accepting an URI when the URI matches, the URI is rejected.</div></dd>
</dl>
</div>
<div class="section" id="!mergeSource">
<h1>!mergeSource<a class="headerlink" href="#!mergeSource" title="Permalink to this headline">¶</a></h1>
<div class="block">Describes the objects used as sources for a merged data source (see <a shape="rect" href="processors.html#!mergeDataSources">!mergeDataSources</a> processor).
</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/merged_datasource"
target="_blank"
class="fa fa-book"
> merged_datasource</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>fields</code> </dt>
<dd><div class="block">The names of each field in the DataSource. See <a shape="rect" href="MergeDataSourceProcessor.SourceType.html" title="enum class in org.mapfish.print.processor.jasper"><code>MergeDataSourceProcessor.SourceType</code></a> for instructions on
how to declare the fields</div></dd>
</dl>
<dl>
<dt><code>key</code> </dt>
<dd><div class="block">The key to use when looking for the object among the attributes and the processor output
values.</div></dd>
</dl>
<dl>
<dt><code>type</code> </dt>
<dd><div class="block">The type of source. See <a shape="rect" href="MergeDataSourceProcessor.SourceType.html" title="enum class in org.mapfish.print.processor.jasper"><code>MergeDataSourceProcessor.SourceType</code></a> for the options.</div></dd>
</dl>
</div>
<div class="section" id="!pdfConfig">
<h1>!pdfConfig<a class="headerlink" href="#!pdfConfig" title="Permalink to this headline">¶</a></h1>
<div class="block">A Configuration object for containing metadata that will be embedded in the PDF and parameters to
use when encoding the PDF.
<p>Naturally this only applies to reports that are exported as PDFs.
</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/config_aliases_defaults"
target="_blank"
class="fa fa-book"
> config_aliases_defaults</a
> <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>author</code> </dt>
<dd><div class="block">Set the author of the PDF.</div></dd>
</dl>
<dl>
<dt><code>compressed</code> </dt>
<dd><div class="block">If this property is set to true then the resulting PDF will be a compressed PDF. By default the
PDF is not compressed.</div></dd>
</dl>
<dl>
<dt><code>creator</code> </dt>
<dd><div class="block">Set the creator of the PDF.</div></dd>
</dl>
<dl>
<dt><code>keywords</code> </dt>
<dd><div class="block">The keywords to include in the PDF metadata.</div></dd>
</dl>
<dl>
<dt><code>subject</code> </dt>
<dd><div class="block">Set the subject of the PDF.</div></dd>
</dl>
<dl>
<dt><code>title</code> </dt>
<dd><div class="block">Set the title of the PDF.</div></dd>
</dl>
</div>
<div class="section" id="!proxy">
<h1>!proxy<a class="headerlink" href="#!proxy" title="Permalink to this headline">¶</a></h1>
<div class="block">This configuration object configures the proxies to be used by the system. This is configured as
one of the root elements of the config.yaml
<p>Example - Proxy all requests except localhost and www.camptocamp.org:
</p><div class="highlight"><pre> proxies:<br> - !proxy<br> scheme: http<br> host: proxy.host.com<br> port: 8888<br> username: username<br> password: xyzpassword<br> matchers:<br> - !localMatch<br> reject: true<br> - !dnsMatch<br> host: www.camptocamp.org<br> reject: true<br> - !acceptAll {}</pre></div></div>
<h3>Configuration</h3>
<dl>
<dt><code>host</code> </dt>
<dd><div class="block">The host of the proxy. Can be a hostname or ip address.
<p>This is required.</p></div></dd>
</dl>
<dl>
<dt><code>matchers</code> </dt>
<dd><div class="block">Matchers are used to choose which requests this proxy applies to.</div></dd>
</dl>
<dl>
<dt><code>password</code> </dt>
<dd><div class="block">The password for authenticating with the proxy.
<p>This is optional</p></div></dd>
</dl>
<dl>
<dt><code>port</code> </dt>
<dd><div class="block">The host of the proxy. Can be a hostname or ip address.
<p>This is optional. The default value is 80.</p></div></dd>
</dl>
<dl>
<dt><code>scheme</code> </dt>
<dd><div class="block">The scheme (http, https) of the proxy.
<p>This is optional, default is http if no username and https if there is a password</p></div></dd>
</dl>
<dl>
<dt><code>username</code> </dt>
<dd><div class="block">The username for authenticating with the proxy.
<p>This is optional</p></div></dd>
</dl>
</div>
<div class="section" id="!roleAccessAssertion">
<h1>!roleAccessAssertion<a class="headerlink" href="#!roleAccessAssertion" title="Permalink to this headline">¶</a></h1>
<div class="block">An access assertion that verifies that the current user has the required roles.</div>
<h3>Configuration</h3>
<dl>
<dt><code>requiredRoles</code> </dt>
<dd><div class="block">Set the roles required to allow access. If not roles then the user must be logged in but does
not have to have any particular role.
<p>This method may only be called once, any subsequent calls will result in errors.</p></div></dd>
</dl>
</div>
<div class="section" id="!s3reportStorage">
<h1>!s3reportStorage<a class="headerlink" href="#!s3reportStorage" title="Permalink to this headline">¶</a></h1>
<div class="block">Configuration for storing the reports in a S3 compatible storage.
<p>By default, authentication is done using the <code>DefaultAWSCredentialsProviderChain</code> which
uses Environment Variables, Java System Properties, Credential profiles file, ...</p></div>
<h3>Configuration</h3>
<dl>
<dt><code>accessKey</code> </dt>
<dd><div class="block">To set the access key.</div></dd>
</dl>
<dl>
<dt><code>bucket</code> </dt>
<dd><div class="block">The S3 bucket to use.</div></dd>
</dl>
<dl>
<dt><code>endpointUrl</code> </dt>
<dd><div class="block">To override the endpoint URL (for non-Amazon, S3 compatible servers).</div></dd>
</dl>
<dl>
<dt><code>prefix</code> </dt>
<dd><div class="block">The key prefix to use.</div></dd>
</dl>
<dl>
<dt><code>region</code> </dt>
<dd><div class="block">To set the region to use.</div></dd>
</dl>
<dl>
<dt><code>retentionDays</code> </dt>
<dd><div class="block">The number of day the reports must be kept.
<p>Passed this delay, they will be deleted and the links included in the corresponding emails
will become invalid. Defaults to 7 days.</p></div></dd>
</dl>
<dl>
<dt><code>secretKey</code> </dt>
<dd><div class="block">To set the secret key.</div></dd>
</dl>
</div>
<div class="section" id="!smtpConfig">
<h1>!smtpConfig<a class="headerlink" href="#!smtpConfig" title="Permalink to this headline">¶</a></h1>
<div class="block">Email sending configuration.
<p>This configuration is needed only if reports are to be sent to the user by email.</p></div>
<h3>Configuration</h3>
<dl>
<dt><code>body</code> </dt>
<dd><div class="block">The default email body. <br clear="none"></br>
This can be changed by the <code>smtp</code>.<code>body</code> property in the request.
<p>If you have setup a storage, you must put a "{url}" marker where the URL to fetch the report
should be put.</p></div></dd>
</dl>
<dl>
<dt><code>errorBody</code> </dt>
<dd><div class="block">The default email body in case of error. <br clear="none"></br>
This can be changed by the <code>smtp</code>.<code>body</code> property in the request.
<p>The error message can be places in the text using a "{message}" marker.</p></div></dd>
</dl>
<dl>
<dt><code>errorSubject</code> </dt>
<dd><div class="block">The default email subject in case of error. <br clear="none"></br>
This can be changed by the <code>smtp</code>.<code>errorSubject</code> property in the request.</div></dd>
</dl>
<dl>
<dt><code>fromAddress</code> </dt>
<dd><div class="block">The email address used as "From:" in every email.</div></dd>
</dl>
<dl>
<dt><code>host</code> </dt>
<dd><div class="block">The SMTP server hostname.</div></dd>
</dl>
<dl>
<dt><code>password</code> </dt>
<dd><div class="block">If auth is needed, the password.</div></dd>
</dl>
<dl>
<dt><code>port</code> </dt>
<dd><div class="block">The TCP port of the SMTP server.</div></dd>
</dl>
<dl>
<dt><code>ssl</code> </dt>
<dd><div class="block">True for enabling SSL. <br clear="none"></br>
Cannot be enabled at the same time as <code>starttls</code></div></dd>
</dl>
<dl>
<dt><code>starttls</code> </dt>
<dd><div class="block">True to use STARTTLS.</div></dd>
</dl>
<dl>
<dt><code>storage</code> </dt>
<dd><div class="block">The report storage facility to use. <br clear="none"></br>
By default, attaches the report in an email. But, for big files, this is not practical. This
can be used to configure a storage.</div></dd>
</dl>
<dl>
<dt><code>subject</code> </dt>
<dd><div class="block">The default email subject. <br clear="none"></br>
This can be changed by the <code>smtp</code>.<code>subject</code> property in the request.</div></dd>
</dl>
<dl>
<dt><code>username</code> </dt>
<dd><div class="block">If auth is needed, the username.</div></dd>
</dl>
</div>
<div class="section" id="!template">
<h1>!template<a class="headerlink" href="#!template" title="Permalink to this headline">¶</a></h1>
<div class="block">Represents a report template configuration.</div>
<h3>Configuration</h3>
<dl>
<dt><code>access</code> </dt>
<dd><div class="block">The roles required to access this template. If empty or not set then it is a <em>public</em>
template. If there are many roles then a user must have one of the roles in order to access the
template.
<p>The security (how authentication/authorization is done) is configured in the
/WEB-INF/classes/mapfish-spring-security.xml
</p><p>Any user without the required role will get an error when trying to access the template and
the template will not be visible in the capabilities requests.</p></div></dd>
</dl>
<dl>
<dt><code>attributes</code> </dt>
<dd><div class="block">Set the attributes for this template.</div></dd>
</dl>
<dl>
<dt><code>configuration</code> </dt>
<dd><div class="block"><span class="descfrm-type-label">Description copied from interface: <code><a shape="rect" href="HasConfiguration.html#setConfiguration(org.mapfish.print.config.Configuration)">HasConfiguration</a></code></span></div></dd>
</dl>
<dl>
<dt><code>jdbcDrivers</code> </dt>
<dd></dd>
</dl>
<dl>
<dt><code>jdbcPassword</code> </dt>
<dd></dd>
</dl>
<dl>
<dt><code>jdbcUrl</code> </dt>
<dd></dd>
</dl>
<dl>